Re: [PATCH 1/3] KVM: VMX: Move the shared "IRQs off" exit handler(s) to common code
From: Sean Christopherson
Date: Mon Aug 17 2026 - 09:59:14 EST
On Mon, Aug 17, 2026, Binbin Wu wrote:
> On 8/15/2026 12:11 AM, Sean Christopherson wrote:
> > Move vmx_handle_exit_irqoff() and its helpers to common.h / main.c to
> > capture that it's a common handler and to allow guarding against incorrectly
> > using to_vmx(), and to allow for
> ^
> It appears to have been abruptly truncated here?
Ya, apparently I saw something shiny and forgot to get back to this. In hindsight,
I probably should have spammed v2 right away given how egregious some of these
goofs were, it probably would have been a net positive. Anyways, this is what I
ended up with for a full changelog:
KVM: VMX: Move the shared "IRQs off" exit handler(s) to common code
Move vmx_handle_exit_irqoff() and its helpers to common.h / main.c to
capture that it's a common handler and to allow guarding against incorrectly
using to_vmx().
Opportunistically use a "vt" prefix instead of "vmx" to communicate that
it's a shared handler.
No functional change intended.
> > Cc: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
> > Cc: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
> > Cc: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
> > Cc: Kai Huang <kai.huang@xxxxxxxxx>
> > Cc: Yan Zhao <yan.y.zhao@xxxxxxxxx>
> > Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
>
> [...]
>
> > +
> > +static void vmx_handle_exit_irqoff(struct kvm_vcpu *vcpu)
>
> Since it's moved to the common code, is it better to rename it
> to vt_handle_exit_irqoff()?
Yeah, Sashiko pointed out that I was being dense as well.