Re: [PATCH 5/6] KVM: x86/VMX: add kvm_vmx_reinject_nmi_irq() for NMI/IRQ reinjection

Peter Zijlstra
2022-11-11T12:10:47Z

On Fri, Nov 11, 2022 at 12:57:58PM +0100, Paolo Bonzini wrote:
> On 11/11/22 11:45, Peter Zijlstra wrote:
> > > What is "correct" in this context?
> >
> > I don't know since I don't really speak virt, but I could image the
> > regset that would match the vmrun (or whatever intel decided to call
> > that again) instruction.
>
> Right now it is not exactly that but close. The RIP is somewhere in
> vmx_do_interrupt_nmi_irqoff; CS/SS are correct (i.e. it's not like they
> point to guest values!) and other registers including RSP and RFLAGS are
> consistent with the RIP.

*phew*, that sounds a *lot* better than 'random'. And yes, that should
do.

Another thing; these patches appear to be about system vectors and
everything, but what I understand from Andrew is that VMX is only screwy
vs NMI, not regular interrupts/exceptions, so where does that come from?

SVM specifically fixed the NMI wonkyness with their Global Interrupt
flag thingy.