KVM: nVMX: Do not inject NMI vmexits when L2 has a pending interrupt
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 7 Mar 2014 19:03:14 +0000 (20:03 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 Mar 2014 07:41:46 +0000 (08:41 +0100)
commit220c56729766444f3dd823f740a147ca6d82c4c6
tree9777e200c55a58c11afd8727a9b702fc843dd268
parentf4124500c2c13eb1208c6143b3f6d469709dea10
KVM: nVMX: Do not inject NMI vmexits when L2 has a pending interrupt

According to SDM 27.2.3, IDT vectoring information will not be valid on
vmexits caused by external NMIs. So we have to avoid creating such
scenarios by delaying EXIT_REASON_EXCEPTION_NMI injection as long as we
have a pending interrupt because that one would be migrated to L1's IDT
vectoring info on nested exit.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c