- Timestamp:
- Jan 12, 2022 12:35:29 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/VMXAllTemplate.cpp.h
r93133 r93199 250 250 static FNVMXEXITHANDLER vmxHCExitVmxon; 251 251 static FNVMXEXITHANDLER vmxHCExitInvvpid; 252 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 253 static FNVMXEXITHANDLER vmxHCExitInvept; 254 # endif 252 255 #endif 253 256 static FNVMXEXITHANDLER vmxHCExitRdtsc; … … 680 683 /* 48 VMX_EXIT_EPT_VIOLATION */ { vmxHCExitEptViolation }, 681 684 /* 49 VMX_EXIT_EPT_MISCONFIG */ { vmxHCExitEptMisconfig }, 685 #if defined(VBOX_WITH_NESTED_HWVIRT_VMX) && defined(VBOX_WITH_NESTED_HWVIRT_VMX_EPT) 686 /* 50 VMX_EXIT_INVEPT */ { vmxHCExitInvept }, 687 #else 682 688 /* 50 VMX_EXIT_INVEPT */ { vmxHCExitSetPendingXcptUD }, 689 #endif 683 690 /* 51 VMX_EXIT_RDTSCP */ { vmxHCExitRdtscp }, 684 691 /* 52 VMX_EXIT_PREEMPT_TIMER */ { vmxHCExitPreemptTimer }, … … 5337 5344 case VMX_EXIT_VMXON: VMEXIT_CALL_RET(0, vmxHCExitVmxon(pVCpu, pVmxTransient)); 5338 5345 case VMX_EXIT_INVVPID: VMEXIT_CALL_RET(0, vmxHCExitInvvpid(pVCpu, pVmxTransient)); 5339 case VMX_EXIT_INVEPT: VMEXIT_CALL_RET(0, vmxHCExitSetPendingXcptUD(pVCpu, pVmxTransient));5340 5346 #else 5341 5347 case VMX_EXIT_VMCLEAR: … … 5349 5355 case VMX_EXIT_VMXON: 5350 5356 case VMX_EXIT_INVVPID: 5351 case VMX_EXIT_INVEPT:5352 5357 return vmxHCExitSetPendingXcptUD(pVCpu, pVmxTransient); 5358 #endif 5359 #if defined(VBOX_WITH_NESTED_HWVIRT_VMX) && defined(VBOX_WITH_NESTED_HWVIRT_VMX_EPT) 5360 case VMX_EXIT_INVEPT: VMEXIT_CALL_RET(0, vmxHCExitInvept(pVCpu, pVmxTransient)); 5361 #else 5362 case VMX_EXIT_INVEPT: return vmxHCExitSetPendingXcptUD(pVCpu, pVmxTransient); 5353 5363 #endif 5354 5364 … … 9252 9262 return rcStrict; 9253 9263 } 9264 9265 9266 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 9267 /** 9268 * VM-exit handler for INVEPT (VMX_EXIT_INVEPT). Unconditional VM-exit. 9269 */ 9270 HMVMX_EXIT_DECL vmxHCExitInvept(PVMCPUCC pVCpu, PVMXTRANSIENT pVmxTransient) 9271 { 9272 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 9273 9274 vmxHCReadExitInstrLenVmcs(pVCpu, pVmxTransient); 9275 vmxHCReadExitInstrInfoVmcs(pVCpu, pVmxTransient); 9276 vmxHCReadExitQualVmcs(pVCpu, pVmxTransient); 9277 int rc = vmxHCImportGuestState(pVCpu, pVmxTransient->pVmcsInfo, CPUMCTX_EXTRN_RSP | CPUMCTX_EXTRN_SREG_MASK 9278 | IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK); 9279 AssertRCReturn(rc, rc); 9280 9281 HMVMX_CHECK_EXIT_DUE_TO_VMX_INSTR(pVCpu, pVmxTransient->uExitReason); 9282 9283 VMXVEXITINFO ExitInfo; 9284 RT_ZERO(ExitInfo); 9285 ExitInfo.uReason = pVmxTransient->uExitReason; 9286 ExitInfo.u64Qual = pVmxTransient->uExitQual; 9287 ExitInfo.InstrInfo.u = pVmxTransient->ExitInstrInfo.u; 9288 ExitInfo.cbInstr = pVmxTransient->cbExitInstr; 9289 HMVMX_DECODE_MEM_OPERAND(pVCpu, ExitInfo.InstrInfo.u, ExitInfo.u64Qual, VMXMEMACCESS_READ, &ExitInfo.GCPtrEffAddr); 9290 9291 VBOXSTRICTRC rcStrict = IEMExecDecodedInvept(pVCpu, &ExitInfo); 9292 if (RT_LIKELY(rcStrict == VINF_SUCCESS)) 9293 ASMAtomicUoOrU64(&VCPU_2_VMXSTATE(pVCpu).fCtxChanged, HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_RFLAGS); 9294 else if (rcStrict == VINF_IEM_RAISED_XCPT) 9295 { 9296 ASMAtomicUoOrU64(&VCPU_2_VMXSTATE(pVCpu).fCtxChanged, HM_CHANGED_RAISED_XCPT_MASK); 9297 rcStrict = VINF_SUCCESS; 9298 } 9299 return rcStrict; 9300 } 9301 # endif /* VBOX_WITH_NESTED_HWVIRT_VMX_EPT */ 9254 9302 #endif /* VBOX_WITH_NESTED_HWVIRT_VMX */ 9255 9303 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.