Changeset 52066 in vbox for trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
- Timestamp:
- Jul 17, 2014 7:02:33 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95068
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r52065 r52066 3524 3524 3525 3525 /* 3526 * NMIs to the guest are inhibited until the guest executes an IRET. We only 3527 * bother with virtual-NMI blocking when we have support for virtual NMIs in the 3528 * CPU, otherwise setting this would block host-NMIs and IRET will not clear the 3529 * blocking. 3526 * NMIs to the guest are blocked after an NMI is injected until the guest executes an IRET. We only 3527 * bother with virtual-NMI blocking when we have support for virtual NMIs in the CPU, otherwise 3528 * setting this would block host-NMIs and IRET will not clear the blocking. 3530 3529 * 3531 3530 * See Intel spec. 26.6.1 "Interruptibility state". See @bugref{7445}. 3532 3531 */ 3533 if ( VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_ INHIBIT_NMIS)3532 if ( VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_BLOCK_NMIS) 3534 3533 && (pVCpu->hm.s.vmx.u32PinCtls & VMX_VMCS_CTRL_PIN_EXEC_VIRTUAL_NMI)) 3535 3534 { … … 5831 5830 * See Intel spec. 30.7.1.2 "Resuming Guest Software after Handling an Exception". See @bugref{7445}. 5832 5831 */ 5833 Assert(VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_ INHIBIT_NMIS));5834 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_ INHIBIT_NMIS);5832 Assert(VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_BLOCK_NMIS)); 5833 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_BLOCK_NMIS); 5835 5834 enmReflect = VMXREFLECTXCPT_XCPT; 5836 5835 } … … 5915 5914 { 5916 5915 /* 5917 * Execution of IRET caused this fault when NMI blocking was in effect . We need to reset the block-by-NMI field so5918 * that NMIs remain blocked until the IRET execution is completed.5916 * Execution of IRET caused this fault when NMI blocking was in effect (i.e we're in the guest NMI handler). 5917 * We need to reset the block-by-NMI field so that NMIs remain blocked until the IRET execution is completed. 5919 5918 * See Intel spec. 30.7.1.2 "Resuming guest software after handling an exception". 5920 5919 */ 5921 if (!VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_ INHIBIT_NMIS))5922 VMCPU_FF_SET(pVCpu, VMCPU_FF_ INHIBIT_NMIS);5920 if (!VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_BLOCK_NMIS)) 5921 VMCPU_FF_SET(pVCpu, VMCPU_FF_BLOCK_NMIS); 5923 5922 } 5924 5923 … … 6127 6126 if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)) 6128 6127 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 6129 if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INHIBIT_NMIS)) 6130 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_NMIS); 6128 6129 if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_BLOCK_NMIS)) 6130 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_BLOCK_NMIS); 6131 6131 } 6132 6132 else … … 6145 6145 6146 6146 if (uIntrState & VMX_VMCS_GUEST_INTERRUPTIBILITY_STATE_BLOCK_NMI) 6147 VMCPU_FF_SET(pVCpu, VMCPU_FF_INHIBIT_NMIS); 6148 else if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INHIBIT_NMIS)) 6149 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_NMIS); 6147 { 6148 if (!VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_BLOCK_NMIS)) 6149 VMCPU_FF_SET(pVCpu, VMCPU_FF_BLOCK_NMIS); 6150 } 6151 else if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_BLOCK_NMIS)) 6152 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_BLOCK_NMIS); 6150 6153 } 6151 6154 } … … 9932 9935 } 9933 9936 9934 Assert(!VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_ INHIBIT_NMIS));9937 Assert(!VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_BLOCK_NMIS)); 9935 9938 9936 9939 /*
Note:
See TracChangeset
for help on using the changeset viewer.