Re: [PATCH 1/3] KVM: VMX: Move the shared "IRQs off" exit handler(s) to common code

Sean Christopherson <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
> > Cc: Xiaoyao Li <[email protected]>
> > Cc: Binbin Wu <[email protected]>
> > Cc: Kai Huang <[email protected]>
> > Cc: Yan Zhao <[email protected]>
> > Signed-off-by: Sean Christopherson <[email protected]>
> 
> [...]
> 
> > +
> > +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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.