@@ -3268,16 +3268,18 @@ static void vmx_complete_interrupts(struct vcpu_vmx *vmx)
exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
if (cpu_has_virtual_nmis()) {
- unblock_nmi = (exit_intr_info & INTR_INFO_UNBLOCK_NMI) != 0;
- vector = exit_intr_info & INTR_INFO_VECTOR_MASK;
/*
* SDM 3: 25.7.1.2
* Re-set bit "block by NMI" before VM entry if vmexit caused by
* a guest IRET fault.
*/
- if (unblock_nmi && vector != DF_VECTOR)
- vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO,
+ if (exit_intr_info & INTR_INFO_VALID_MASK) {
+ unblock_nmi = !!(exit_intr_info & INTR_INFO_UNBLOCK_NMI);
+ vector = exit_intr_info & INTR_INFO_VECTOR_MASK;
+ if (unblock_nmi && vector != DF_VECTOR)
+ vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO,
GUEST_INTR_STATE_NMI);
+ }
} else if (unlikely(vmx->soft_vnmi_blocked))
vmx->vnmi_blocked_time +=
ktime_to_ns(ktime_sub(ktime_get(), vmx->entry_time));
Thx, eddie commit ad4a9829c8d5b30995f008e32774bd5f555b7e9f Author: root <root@eddie-wb.localdomain> Date: Thu Apr 2 11:16:03 2009 +0800 Check valid bit of VM_EXIT_INTR_INFO before unblock nmi. Signed-off-by: Eddie Dong <Eddie.Dong@intel.com>