public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] KVM: Remove HIGH_RES_TIMERS dependency
@ 2024-08-21 13:51 Steven Rostedt
  2024-08-28 19:34 ` Sean Christopherson
  2024-09-05 16:19 ` Paolo Bonzini
  0 siblings, 2 replies; 6+ messages in thread
From: Steven Rostedt @ 2024-08-21 13:51 UTC (permalink / raw)
  To: LKML
  Cc: kvm, Sean Christopherson, Paolo Bonzini, Thomas Gleixner,
	x86@kernel.org, Joel Fernandes, Suleiman Souhlal, Vineeth Pillai,
	Borislav Petkov, Anna-Maria Behnsen, Peter Zijlstra, Viresh Kumar,
	Frederic Weisbecker

From: Steven Rostedt <rostedt@goodmis.org>

Commit 92b5265d38f6a ("KVM: Depend on HIGH_RES_TIMERS") added a dependency
to high resolution timers with the comment:

    KVM lapic timer and tsc deadline timer based on hrtimer,
    setting a leftmost node to rb tree and then do hrtimer reprogram.
    If hrtimer not configured as high resolution, hrtimer_enqueue_reprogram
    do nothing and then make kvm lapic timer and tsc deadline timer fail.

That was back in 2012, where hrtimer_start_range_ns() would do the
reprogramming with hrtimer_enqueue_reprogram(). But as that was a nop with
high resolution timers disabled, this did not work. But a lot has changed
in the last 12 years.

For example, commit 49a2a07514a3a ("hrtimer: Kick lowres dynticks targets on
timer enqueue") modifies __hrtimer_start_range_ns() to work with low res
timers. There's been lots of other changes that make low res work.

I added this change to my main server that runs all my VMs (my mail
server, my web server, my ssh server) and disabled HIGH_RES_TIMERS and the
system has been running just fine for over a month.

ChromeOS has tested this before as well, and it hasn't seen any issues with
running KVM with high res timers disabled.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 arch/x86/kvm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 472a1537b7a9..c65127e796a9 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -19,7 +19,6 @@ if VIRTUALIZATION
 
 config KVM
 	tristate "Kernel-based Virtual Machine (KVM) support"
-	depends on HIGH_RES_TIMERS
 	depends on X86_LOCAL_APIC
 	select KVM_COMMON
 	select KVM_GENERIC_MMU_NOTIFIER
-- 
2.43.0


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

end of thread, other threads:[~2024-09-05 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-21 13:51 [RFC][PATCH] KVM: Remove HIGH_RES_TIMERS dependency Steven Rostedt
2024-08-28 19:34 ` Sean Christopherson
2024-09-04  7:35   ` Suleiman Souhlal
2024-09-04 13:25     ` Paolo Bonzini
2024-09-05  7:23       ` Suleiman Souhlal
2024-09-05 16:19 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox