KVM: VMX: blocked-by-sti must not defer NMI injections
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 11 May 2010 13:16:46 +0000 (15:16 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 13 May 2010 04:31:37 +0000 (01:31 -0300)
commitf8c5fae16649445e15656667f72bd51d777f7766
treec4744f5024da012bbe9658dc4e80601fb3197281
parentfe19c5a46b4c519153fddd4d5efe32a3e4cfa694
KVM: VMX: blocked-by-sti must not defer NMI injections

As the processor may not consider GUEST_INTR_STATE_STI as a reason for
blocking NMI, it could return immediately with EXIT_REASON_NMI_WINDOW
when we asked for it. But as we consider this state as NMI-blocking, we
can run into an endless loop.

Resolve this by allowing NMI injection if just GUEST_INTR_STATE_STI is
active (originally suggested by Gleb). Intel confirmed that this is
safe, the processor will never complain about NMI injection in this
state.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
KVM-Stable-Tag
Acked-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c