aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayato Ohhashi <[email protected]>2020-07-21 16:12:31 +0000
committerIngo Molnar <[email protected]>2020-07-25 15:49:41 +0200
commit898ec52d2ba05915aaedcdb21bff2e944c883cb8 (patch)
treeffbc8924e513eb3f801698cea48b127c8f64839f
parent23ee3e4e5bd27bdbc0f1785eef7209ce872794c7 (diff)
x86/xen/time: Set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()
If the TSC frequency is known from the pvclock page, the TSC frequency does not need to be recalibrated. We can avoid recalibration by setting X86_FEATURE_TSC_KNOWN_FREQ. Signed-off-by: Hayato Ohhashi <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--arch/x86/xen/time.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index c8897aad13cd..91f5b330dcc6 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -39,6 +39,7 @@ static unsigned long xen_tsc_khz(void)
struct pvclock_vcpu_time_info *info =
&HYPERVISOR_shared_info->vcpu_info[0].time;
+ setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
return pvclock_tsc_khz(info);
}