Changeset 76041 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 7, 2018 8:35:21 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r76004 r76041 16044 16044 16045 16045 /** 16046 * Interface for HM and EM to emulate the VMLAUNCH/VMRESUME instruction. 16047 * 16048 * @returns Strict VBox status code. 16049 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 16050 * @param cbInstr The instruction length in bytes. 16051 * @param uInstrId The instruction ID (VMXINSTRID_VMLAUNCH or 16052 * VMXINSTRID_VMRESUME). 16053 * @thread EMT(pVCpu) 16054 */ 16055 VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedVmlaunchVmresume(PVMCPU pVCpu, uint8_t cbInstr, VMXINSTRID uInstrId) 16056 { 16057 IEMEXEC_ASSERT_INSTR_LEN_RETURN(cbInstr, 3); 16058 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMENTRY_MASK); 16059 16060 iemInitExec(pVCpu, false /*fBypassHandlers*/); 16061 VBOXSTRICTRC rcStrict = iemVmxVmlaunchVmresume(pVCpu, cbInstr, uInstrId); 16062 if (pVCpu->iem.s.cActiveMappings) 16063 iemMemRollback(pVCpu); 16064 return iemExecStatusCodeFiddling(pVCpu, rcStrict); 16065 } 16066 16067 16068 /** 16046 16069 * Interface for HM and EM to emulate the VMXON instruction. 16047 16070 * … … 16080 16103 { 16081 16104 IEMEXEC_ASSERT_INSTR_LEN_RETURN(cbInstr, 3); 16082 IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HM_VMX_MASK);16105 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK | CPUMCTX_EXTRN_HM_VMX_MASK); 16083 16106 16084 16107 iemInitExec(pVCpu, false /*fBypassHandlers*/); -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r76040 r76041 2831 2831 return VINF_EM_RAW_EMULATE_INSTR; 2832 2832 # else 2833 IEM_CTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK); 2834 2833 2835 PVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 2834 2836 Assert(pVmcs); … … 7152 7154 * @param uInstrId The instruction identity (VMXINSTRID_VMLAUNCH or 7153 7155 * VMXINSTRID_VMRESUME). 7154 * @param pExitInfo Pointer to the VM-exit instruction information struct.7155 * Optional, can be NULL.7156 7156 * 7157 7157 * @remarks Common VMX instruction checks are already expected to by the caller, 7158 7158 * i.e. CR4.VMXE, Real/V86 mode, EFER/CS.L checks. 7159 7159 */ 7160 IEM_STATIC VBOXSTRICTRC iemVmxVmlaunchVmresume(PVMCPU pVCpu, uint8_t cbInstr, VMXINSTRID uInstrId , PCVMXVEXITINFO pExitInfo)7160 IEM_STATIC VBOXSTRICTRC iemVmxVmlaunchVmresume(PVMCPU pVCpu, uint8_t cbInstr, VMXINSTRID uInstrId) 7161 7161 { 7162 7162 # if defined(VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM) && !defined(IN_RING3) 7163 RT_NOREF 4(pVCpu, cbInstr, uInstrId, pExitInfo);7163 RT_NOREF3(pVCpu, cbInstr, uInstrId); 7164 7164 return VINF_EM_RAW_EMULATE_INSTR; 7165 7165 # else … … 7170 7170 /* Nested-guest intercept. */ 7171 7171 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 7172 { 7173 if (pExitInfo) 7174 return iemVmxVmexitInstrWithInfo(pVCpu, pExitInfo); 7175 uint32_t const uExitReason = uInstrId == VMXINSTRID_VMRESUME ? VMX_EXIT_VMRESUME : VMX_EXIT_VMLAUNCH; 7176 return iemVmxVmexitInstrNeedsInfo(pVCpu, uExitReason, uInstrId, cbInstr); 7177 } 7172 return iemVmxVmexitInstr(pVCpu, uInstrId == VMXINSTRID_VMRESUME ? VMX_EXIT_VMRESUME : VMX_EXIT_VMLAUNCH, cbInstr); 7178 7173 7179 7174 Assert(IEM_VMX_IS_ROOT_MODE(pVCpu)); … … 8384 8379 IEM_CIMPL_DEF_0(iemCImpl_vmlaunch) 8385 8380 { 8386 return iemVmxVmlaunchVmresume(pVCpu, cbInstr, VMXINSTRID_VMLAUNCH , NULL /* pExitInfo */);8381 return iemVmxVmlaunchVmresume(pVCpu, cbInstr, VMXINSTRID_VMLAUNCH); 8387 8382 } 8388 8383 … … 8393 8388 IEM_CIMPL_DEF_0(iemCImpl_vmresume) 8394 8389 { 8395 return iemVmxVmlaunchVmresume(pVCpu, cbInstr, VMXINSTRID_VMRESUME , NULL /* pExitInfo */);8390 return iemVmxVmlaunchVmresume(pVCpu, cbInstr, VMXINSTRID_VMRESUME); 8396 8391 } 8397 8392
Note:
See TracChangeset
for help on using the changeset viewer.