]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: VMX: Handle forced exit due to preemption timer in fastpath
authorSean Christopherson <seanjc@google.com>
Fri, 15 Aug 2025 00:25:30 +0000 (17:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:13 +0000 (16:28 +0200)
commit1c1158aceaf2611346dfc903a8efa5c6cd87b23d
tree9dd1ab330af9b087b4c14da4c59a78d793b22362
parent1fc288e74cf31c700cfadf30e39867fec8da541b
KVM: VMX: Handle forced exit due to preemption timer in fastpath

[ Upstream commit 11776aa0cfa7d007ad1799b1553bdcbd830e5010 ]

Handle VMX preemption timer VM-Exits due to KVM forcing an exit in the
exit fastpath, i.e. avoid calling back into handle_preemption_timer() for
the same exit.  There is no work to be done for forced exits, as the name
suggests the goal is purely to get control back in KVM.

In addition to shaving a few cycles, this will allow cleanly separating
handle_fastpath_preemption_timer() from handle_preemption_timer(), e.g.
it's not immediately obvious why _apparently_ calling
handle_fastpath_preemption_timer() twice on a "slow" exit is necessary:
the "slow" call is necessary to handle exits from L2, which are excluded
from the fastpath by vmx_vcpu_run().

Link: https://lore.kernel.org/r/20240110012705.506918-4-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