Skip to content

Commit 898ec52

Browse files
o8vmIngo Molnar
authored andcommitted
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]
1 parent 23ee3e4 commit 898ec52

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/xen/time.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static unsigned long xen_tsc_khz(void)
3939
struct pvclock_vcpu_time_info *info =
4040
&HYPERVISOR_shared_info->vcpu_info[0].time;
4141

42+
setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
4243
return pvclock_tsc_khz(info);
4344
}
4445

0 commit comments

Comments
 (0)