]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: VMX: Re-enter guest in fastpath for "spurious" preemption timer exits
authorSean Christopherson <seanjc@google.com>
Fri, 15 Aug 2025 00:25:29 +0000 (17:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:13 +0000 (16:28 +0200)
commit1fc288e74cf31c700cfadf30e39867fec8da541b
treeec00a242dd3e8e8564422489225a5283c610c199
parentbaf9c96e4e9d6e6e59eaccbfee5387de97042f58
KVM: VMX: Re-enter guest in fastpath for "spurious" preemption timer exits

[ Upstream commit e6b5d16bbd2d4c8259ad76aa33de80d561aba5f9 ]

Re-enter the guest in the fast path if VMX preeemption timer VM-Exit was
"spurious", i.e. if KVM "soft disabled" the timer by writing -1u and by
some miracle the timer expired before any other VM-Exit occurred.  This is
just an intermediate step to cleaning up the preemption timer handling,
optimizing these types of spurious VM-Exits is not interesting as they are
extremely rare/infrequent.

Link: https://lore.kernel.org/r/20240110012705.506918-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/vmx/vmx.c