Re: [PATCH] x86/acrn: Set X86_FEATURE_TSC_KNOWN_FREQ

From: Fei Li
Date: Tue Oct 25 2022 - 23:28:27 EST


On 2022-10-25 at 15:22:58 +0200, Peter Zijlstra wrote:
> On Tue, Oct 25, 2022 at 04:41:47PM +0800, Fei Li wrote:
> > Avoiding recalibration by setting X86_FEATURE_TSC_KNOWN_FREQ.
> > This patch also removes `inline` for acrn_get_tsc_khz() since
> > it doesn't make sense.
>
Hi Peter

Thanks for your comments.

> Can we have a few words on how this is supposed to work at all?

If the TSC frequency is known from the acrn_get_tsc_khz(),
the TSC frequency does not need to be recalibrated.

We can avoid recalibration by setting X86_FEATURE_TSC_KNOWN_FREQ.
>
> Supposedly the HV is providing host rate through this ACRN CPUID leaf?
ACRN would provide the calibrated TSC frequency, not just the
host rate through this CPUID leaf.

> How does it deal with systems where TSC isn't known stable?
>