KVM: inject NMI after IRET from a previous NMI, not before.
authorGleb Natapov <gleb@redhat.com>
Mon, 11 May 2009 10:35:52 +0000 (13:35 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:59 +0000 (11:48 +0300)
commit44c11430b52cbad0a467bc023a802d122dfd285c
tree1be73025a2019b6de60836cbaa56bf5c8cb6f9db
parent6a8b1d13121f8226783987dc7ddd861ee2245410
KVM: inject NMI after IRET from a previous NMI, not before.

If NMI is received during handling of another NMI it should be injected
immediately after IRET from previous NMI handler, but SVM intercept IRET
before instruction execution so we can't inject pending NMI at this
point and there is not way to request exit when NMI window opens. This
patch fix SVM code to open NMI window after IRET by single stepping over
IRET instruction.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c