]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
vmx: fix handling of NMI VMEXIT.
authorTim Deegan <tim@xen.org>
Thu, 28 Feb 2013 12:42:15 +0000 (12:42 +0000)
committerTim Deegan <tim@xen.org>
Thu, 28 Feb 2013 14:00:18 +0000 (14:00 +0000)
commit7dd3b06ff031c9a8c727df16c5def2afb382101c
tree4617d15f3520481f0629bb3deacf1709993ffb90
parentf0fc1e8294a963528556b0862c06bb3fcf7c390a
vmx: fix handling of NMI VMEXIT.

Call do_nmi() directly and explicitly re-enable NMIs rather than
raising an NMI through the APIC. Since NMIs are disabled after the
VMEXIT, the raised NMI would be blocked until the next IRET
instruction (i.e. the next real interrupt, or after scheduling a PV
guest) and in the meantime the guest will spin taking NMI VMEXITS.

Also, handle NMIs before re-enabling interrupts, since if we handle an
interrupt (and therefore IRET) before calling do_nmi(), we may end up
running the NMI handler with NMIs enabled.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vmx/vmx.c