The following commit has been merged into the x86/vmware branch of tip: Commit-ID: 0b4a285e2c65c2c9449c6eccb87298e385213e7b Gitweb: https://git.kernel.org/tip/0b4a285e2c65c2c9449c6eccb87298e385213e7b Author: Alexey Makhalov <amakhalov@xxxxxxxxxx> AuthorDate: Mon, 04 Jan 2021 16:47:52 -08:00 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitterDate: Sun, 28 Mar 2021 21:11:43 +02:00 x86/vmware: Avoid TSC recalibration when frequency is known When the TSC frequency is known because it is retrieved from the hypervisor, skip TSC refined calibration by setting X86_FEATURE_TSC_KNOWN_FREQ. Signed-off-by: Alexey Makhalov <amakhalov@xxxxxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20210105004752.131069-1-amakhalov@xxxxxxxxxx --- arch/x86/kernel/cpu/vmware.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index c6ede3b..8316411 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86/kernel/cpu/vmware.c @@ -378,6 +378,8 @@ static void __init vmware_set_capabilities(void) { setup_force_cpu_cap(X86_FEATURE_CONSTANT_TSC); setup_force_cpu_cap(X86_FEATURE_TSC_RELIABLE); + if (vmware_tsc_khz) + setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ); if (vmware_hypercall_mode == CPUID_VMWARE_FEATURES_ECX_VMCALL) setup_force_cpu_cap(X86_FEATURE_VMCALL); else if (vmware_hypercall_mode == CPUID_VMWARE_FEATURES_ECX_VMMCALL)