- Timestamp:
- Jun 5, 2019 6:25:09 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r78962 r78978 8811 8811 if ( pVmxTransient->fIsNestedGuest 8812 8812 && CPUMIsGuestVmxPinCtlsSet(pVCpu, pCtx, VMX_PIN_CTLS_NMI_EXIT)) 8813 { 8814 VBOXSTRICTRC rcStrict = IEMExecVmxVmexitNmi(pVCpu); 8815 if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE) 8816 return rcStrict; 8817 } 8813 return IEMExecVmxVmexitXcptNmi(pVCpu); 8818 8814 #endif 8819 8815 hmR0VmxSetPendingXcptNmi(pVCpu); … … 15805 15801 uint32_t const uExtIntType = VMX_EXIT_INT_INFO_TYPE(uExitIntInfo); 15806 15802 15803 /* 15804 * Make sure not to use stale/previous VM-exit instruction length since we read the 15805 * instruction length from the VMCS below only for software exceptions and privileged 15806 * software exceptions but we pass it for all exception VM-exits below. 15807 */ 15808 pVmxTransient->cbInstr = 0; 15809 15807 15810 switch (uExtIntType) 15808 15811 { … … 15820 15823 * Privileged software exceptions: 15821 15824 * Figure out if the exception must be delivered to the guest or the nested-guest. 15825 * 15826 * For VM-exits due to software exceptions (those generated by INT3 or INTO) and privileged 15827 * software exceptions (those generated by INT1/ICEBP) we need to supply the VM-exit instruction 15828 * length. 15822 15829 */ 15830 case VMX_EXIT_INT_INFO_TYPE_SW_XCPT: 15831 case VMX_EXIT_INT_INFO_TYPE_PRIV_SW_XCPT: 15832 { 15833 rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 15834 RT_FALL_THRU(); 15835 } 15823 15836 case VMX_EXIT_INT_INFO_TYPE_HW_XCPT: 15824 15837 { 15825 #if 0 15826 /* Page-faults are subject to masking using its error code. */ 15827 uint32_t fXcptBitmap = pVmcs->u32XcptBitmap; 15838 rc = hmR0VmxReadExitIntErrorCodeVmcs(pVmxTransient); 15839 AssertRCReturn(rc, rc); 15840 15841 uint8_t const uVector = VMX_EXIT_INT_INFO_VECTOR(uExitIntInfo); 15842 bool const fIntercept = CPUMIsGuestVmxXcptInterceptSet(pVCpu, &pVCpu->cpum.GstCtx, uVector, 15843 pVmxTransient->uExitIntErrorCode); 15844 if (fIntercept) 15845 { 15846 rc = hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient); 15847 rc |= hmR0VmxReadIdtVectoringInfoVmcs(pVmxTransient); 15848 rc |= hmR0VmxReadIdtVectoringErrorCodeVmcs(pVmxTransient); 15849 AssertRCReturn(rc, rc); 15850 15851 VMXVEXITINFO ExitInfo; 15852 RT_ZERO(ExitInfo); 15853 ExitInfo.cbInstr = pVmxTransient->cbInstr; 15854 ExitInfo.u64Qual = pVmxTransient->uExitQual; 15855 15856 VMXVEXITEVENTINFO ExitEventInfo; 15857 RT_ZERO(ExitInfo); 15858 ExitEventInfo.uExitIntInfo = pVmxTransient->uExitIntInfo; 15859 ExitEventInfo.uExitIntErrCode = pVmxTransient->uExitIntErrorCode; 15860 ExitEventInfo.uIdtVectoringInfo = pVmxTransient->uIdtVectoringInfo; 15861 ExitEventInfo.uIdtVectoringErrCode = pVmxTransient->uIdtVectoringErrorCode; 15862 15863 return IEMExecVmxVmexitXcpt(pVCpu, &ExitInfo, &ExitEventInfo); 15864 } 15865 15866 /* If it was a #PF and the nested-guest is not intercepting it, forward it to the guest. */ 15828 15867 if (uVector == X86_XCPT_PF) 15829 15868 { 15830 uint32_t const fXcptPFMask = pVmcs->u32XcptPFMask; 15831 uint32_t const fXcptPFMatch = pVmcs->u32XcptPFMatch; 15832 if ((uErrCode & fXcptPFMask) != fXcptPFMatch) 15833 fXcptBitmap ^= RT_BIT(X86_XCPT_PF); 15869 if (pVCpu->CTX_SUFF(pVM)->hm.s.fNestedPaging) 15870 { 15871 rc = hmR0VmxReadExitIntErrorCodeVmcs(pVmxTransient); 15872 rc |= hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient); 15873 AssertRCReturn(rc, rc); 15874 15875 hmR0VmxSetPendingEvent(pVCpu, VMX_ENTRY_INT_INFO_FROM_EXIT_INT_INFO(uExitIntInfo), 0 /* cbInstr */, 15876 pVmxTransient->uExitIntErrorCode, pVmxTransient->uExitQual); 15877 } 15878 return hmR0VmxExitXcptPF(pVCpu, pVmxTransient); 15834 15879 } 15835 15836 /* Consult the exception bitmap for all other hardware exceptions. */15837 Assert(uVector <= X86_XCPT_LAST);15838 if (fXcptBitmap & RT_BIT(uVector))15839 fIntercept = true;15840 #endif15841 15880 break; 15842 15881 } -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r78926 r78978 2236 2236 && CPUMIsGuestVmxPinCtlsSet(pVCpu, &pVCpu->cpum.GstCtx, VMX_PIN_CTLS_NMI_EXIT)) 2237 2237 { 2238 rc2 = VBOXSTRICTRC_VAL(IEMExecVmxVmexit Nmi(pVCpu));2238 rc2 = VBOXSTRICTRC_VAL(IEMExecVmxVmexitXcptNmi(pVCpu)); 2239 2239 Assert(rc2 != VINF_VMX_INTERCEPT_NOT_ACTIVE); 2240 2240 UPDATE_RC();
Note:
See TracChangeset
for help on using the changeset viewer.