KVM: VMX: Fix interrupt loss during race with NMI
commitbd2b3ca7686d9470b1b58df631daa03179486182
authorAvi Kivity <avi@redhat.com>
Thu, 20 Nov 2008 09:47:18 +0000 (20 11:47 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 23 Nov 2008 12:52:29 +0000 (23 14:52 +0200)
tree73c041f6ecc0ae4616835b751fbb8d619bf3c196
parent3eb77d5116d78cce5b9fa9eb19d012bc636116b6
KVM: VMX: Fix interrupt loss during race with NMI

If an interrupt cannot be injected for some reason (say, page fault
when fetching the IDT descriptor), the interrupt is marked for
reinjection.  However, if an NMI is queued at this time, the NMI
will be injected instead and the NMI will be lost.

Fix by deferring the NMI injection until the interrupt has been
injected successfully.

Analyzed by Jan Kiszka.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c