diff options
author | Alexey Makhalov <amakhalov@vmware.com> | 2021-01-04 16:47:52 -0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-03-28 21:11:43 +0200 |
commit | 0b4a285e2c65c2c9449c6eccb87298e385213e7b (patch) | |
tree | 93ab4f5be23536db332a8dab89fced14e905740e /arch/x86/kernel/cpu/vmware.c | |
parent | 0d02ec6b3136c73c09e7859f0d0e4e2c4c07b49b (diff) | |
download | lwn-0b4a285e2c65c2c9449c6eccb87298e385213e7b.tar.gz lwn-0b4a285e2c65c2c9449c6eccb87298e385213e7b.zip |
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@vmware.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210105004752.131069-1-amakhalov@vmware.com
Diffstat (limited to 'arch/x86/kernel/cpu/vmware.c')
-rw-r--r-- | arch/x86/kernel/cpu/vmware.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index c6ede3b3d302..83164110ccc5 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) |