All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/vmware: avoid TSC recalibration
@ 2021-01-05  0:47 ` Alexey Makhalov
  0 siblings, 0 replies; 7+ messages in thread
From: Alexey Makhalov @ 2021-01-05  0:47 UTC (permalink / raw)
  To: linux-kernel, virtualization, hpa, bp, mingo, tglx, pv-drivers, sdeep
  Cc: Alexey Makhalov

When TSC frequency is known (retrieved from hypervisor), we should skip
TSC refined calibration by setting X86_FEATURE_TSC_KNOWN_FREQ.

Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
---
 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 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)
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-28 19:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05  0:47 [PATCH] x86/vmware: avoid TSC recalibration Alexey Makhalov
2021-01-05  0:47 ` Alexey Makhalov
2021-01-05 13:06 ` Vitaly Kuznetsov
2021-01-05 13:06   ` Vitaly Kuznetsov
2021-03-15 22:24   ` Alexey Makhalov
2021-03-15 22:24     ` Alexey Makhalov
2021-03-28 19:14 ` [tip: x86/vmware] x86/vmware: Avoid TSC recalibration when frequency is known tip-bot2 for Alexey Makhalov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.