Changeset 79528 in vbox
- Timestamp:
- Jul 4, 2019 2:07:03 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131812
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r79518 r79528 2462 2462 IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_ALL); 2463 2463 2464 /* Ensure VM-entry interruption information valid bit isn't set. */ 2465 Assert(!VMX_ENTRY_INT_INFO_IS_VALID(pVmcs->u32EntryIntInfo)); 2464 /* 2465 * Ensure VM-entry interruption information valid bit is cleared. 2466 * 2467 * We do it here on every VM-exit so that even premature VM-exits (e.g. those caused 2468 * by invalid-guest state or machine-check exceptions) also clear this bit. 2469 * 2470 * See Intel spec. 27.2 "Recording VM-exit Information And Updating VM-entry control fields". 2471 */ 2472 if (VMX_ENTRY_INT_INFO_IS_VALID(pVmcs->u32EntryIntInfo)) 2473 pVmcs->u32EntryIntInfo &= ~VMX_ENTRY_INT_INFO_VALID; 2466 2474 2467 2475 /* … … 2471 2479 pVmcs->u32RoExitReason = uExitReason; 2472 2480 pVmcs->u64RoExitQual.u = u64ExitQual; 2481 2473 2482 Log3(("vmexit: uExitReason=%#RX32 u64ExitQual=%#RX64 cs:rip=%04x:%#RX64\n", uExitReason, pVmcs->u64RoExitQual.u, 2474 2483 pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip)); … … 7065 7074 7066 7075 int rc = TRPMAssertTrap(pVCpu, uVector, enmTrapType); 7067 AssertRCReturn(rc, rc); 7068 7069 if (fErrCodeValid) 7070 TRPMSetErrorCode(pVCpu, uErrCode); 7071 7072 if ( enmTrapType == TRPM_TRAP 7073 && uVector == X86_XCPT_PF) 7074 TRPMSetFaultAddress(pVCpu, GCPtrFaultAddress); 7075 else if (enmTrapType == TRPM_SOFTWARE_INT) 7076 TRPMSetInstrLength(pVCpu, cbInstr); 7077 7078 return VINF_SUCCESS; 7076 if (RT_SUCCESS(rc)) 7077 { 7078 if (fErrCodeValid) 7079 TRPMSetErrorCode(pVCpu, uErrCode); 7080 7081 if ( enmTrapType == TRPM_TRAP 7082 && uVector == X86_XCPT_PF) 7083 TRPMSetFaultAddress(pVCpu, GCPtrFaultAddress); 7084 else if (enmTrapType == TRPM_SOFTWARE_INT) 7085 TRPMSetInstrLength(pVCpu, cbInstr); 7086 } 7087 7088 return rc; 7079 7089 } 7080 7090 … … 7105 7115 if (fEntryIntInfoValid) 7106 7116 { 7117 int rc; 7107 7118 uint8_t const uType = VMX_ENTRY_INT_INFO_TYPE(uEntryIntInfo); 7108 7119 if (uType == VMX_ENTRY_INT_INFO_TYPE_OTHER_EVENT) … … 7110 7121 Assert(VMX_ENTRY_INT_INFO_VECTOR(uEntryIntInfo) == VMX_ENTRY_INT_INFO_VECTOR_MTF); 7111 7122 VMCPU_FF_SET(pVCpu, VMCPU_FF_VMX_MTF); 7112 return VINF_SUCCESS; 7113 } 7114 7115 int rc = iemVmxVmentryInjectTrpmEvent(pVCpu, uEntryIntInfo, pVmcs->u32EntryXcptErrCode, pVmcs->u32EntryInstrLen, 7123 rc = VINF_SUCCESS; 7124 } 7125 else 7126 { 7127 rc = iemVmxVmentryInjectTrpmEvent(pVCpu, uEntryIntInfo, pVmcs->u32EntryXcptErrCode, pVmcs->u32EntryInstrLen, 7116 7128 pVCpu->cpum.GstCtx.cr2); 7117 if (RT_SUCCESS(rc)) 7118 { 7119 /* 7120 * We need to clear the VM-entry interruption information field's valid bit on VM-exit. 7121 * 7122 * However, we do it here on VM-entry because while it continues to not be visible to 7123 * guest software until VM-exit, when HM looks at the VMCS to continue nested-guest 7124 * execution using hardware-assisted VT-x, it can simply copy the VM-entry interruption 7125 * information field. 7126 * 7127 * See Intel spec. 24.8.3 "VM-Entry Controls for Event Injection". 7128 */ 7129 pVmcs->u32EntryIntInfo &= ~VMX_ENTRY_INT_INFO_VALID; 7130 } 7129 } 7130 7131 /* 7132 * We need to clear the VM-entry interruption information field's valid bit on VM-exit. 7133 * 7134 * However, we do it here on VM-entry as well because while it isn't visible to guest 7135 * software until VM-exit, when and if HM looks at the VMCS to continue nested-guest 7136 * execution using hardware-assisted VT-x, it will not be try to inject the event again. 7137 * 7138 * See Intel spec. 24.8.3 "VM-Entry Controls for Event Injection". 7139 */ 7140 pVmcs->u32EntryIntInfo &= ~VMX_ENTRY_INT_INFO_VALID; 7131 7141 return rc; 7132 7142 } -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r79519 r79528 1860 1860 EmuFeat.fVmxSecondaryExecCtls = 1; 1861 1861 EmuFeat.fVmxVirtApicAccess = 0; 1862 EmuFeat.fVmxEpt = 0; 1862 EmuFeat.fVmxEpt = 0; /* Cannot be disabled if unrestricted guest is enabled. */ 1863 1863 EmuFeat.fVmxDescTableExit = 1; 1864 1864 EmuFeat.fVmxRdtscp = 1; … … 1891 1891 EmuFeat.fVmxExitLoadEferMsr = 1; 1892 1892 EmuFeat.fVmxSavePreemptTimer = 0; 1893 EmuFeat.fVmxExitSaveEferLma = 1; 1893 EmuFeat.fVmxExitSaveEferLma = 1; /* Cannot be disabled if unrestricted guest is enabled. */ 1894 1894 EmuFeat.fVmxIntelPt = 0; 1895 1895 EmuFeat.fVmxVmwriteAll = 0; /** @todo NSTVMX: enable this when nested VMCS shadowing is enabled. */
Note:
See TracChangeset
for help on using the changeset viewer.