Re: [PATCH v6 11/51] x86/tsc: Add dedicated hypervisor hooks for getting known TSC/CPU frequencies

David Woodhouse <[email protected]>
Newsgroups org.xenproject.lists.xen-devel,dev.linux.lists.linux-coco,dev.linux.lists.virtualization,org.kernel.vger.kvm,org.kernel.vger.linux-hyperv,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 2026-08-06 at 16:35 -0700, Sean Christopherson wrote:
> Add dedicated hypervisor hooks for getting known TSC/CPU frequencies
> instead of overriding seemingly generic platform hooks, and explicitly
> prioritize hypervisor-provided frequencies over native methods, but do NOT
> clobber the frequency obtained from trusted firmware.  While shuffling the
> hooks around is arguably "six of one, half dozen of the other", scoping
> them to x86_hyper_init makes their purpose more obvious, and allows for
> explicitly defining the priority of sources (as is done here).
>
> As is already done when trusted firmware provides the TSC frequency, ignore
> tsc_early_khz if the exact TSC frequency was obtained from the hypervisor,
> as attempting to refine the TSC frequency when running in a VM is all but
> guaranteed to cause problems sooner or later due to the calibration sources
> being emulated devices in the vast majority of setups.
>
> Cc: David Woodhouse <[email protected]>
> Reviewed-by: Michael Kelley <[email protected]>
> Signed-off-by: Sean Christopherson <[email protected]>

Reviewed-by: David Woodhouse <[email protected]>
smime.p7s (application/pkcs7-signature, 6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.