Changeset 74014 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Sep 1, 2018 2:12:29 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r74005 r74014 13175 13175 } 13176 13176 13177 13177 13178 /** 13178 13179 * VM-exit exception handler for \#GP (General-protection exception). … … 13378 13379 13379 13380 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 13380 13381 13381 /** @name Nested-guest VM-exit handlers. 13382 13382 * @{ … … 13393 13393 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 13394 13394 13395 /** @todo NSTVMX: Vmclear. */ 13396 hmR0VmxSetPendingXcptUD(pVCpu); 13397 return VINF_SUCCESS; 13395 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 13396 rc |= hmR0VmxImportGuestState(pVCpu, CPUMCTX_EXTRN_RSP | CPUMCTX_EXTRN_SREG_MASK 13397 | IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK); 13398 rc |= hmR0VmxReadExitInstrInfoVmcs(pVmxTransient); 13399 rc |= hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient); 13400 AssertRCReturn(rc, rc); 13401 13402 HMVMX_CHECK_EXIT_DUE_TO_VMX_INSTR(pVCpu, pVmxTransient->uExitReason); 13403 13404 VMXVEXITINFO ExitInfo; 13405 RT_ZERO(ExitInfo); 13406 ExitInfo.uReason = pVmxTransient->uExitReason; 13407 ExitInfo.u64Qual = pVmxTransient->uExitQual; 13408 ExitInfo.InstrInfo.u = pVmxTransient->ExitInstrInfo.u; 13409 ExitInfo.cbInstr = pVmxTransient->cbInstr; 13410 HMVMX_DECODE_MEM_OPERAND(pVCpu, ExitInfo.InstrInfo.u, ExitInfo.u64Qual, VMXMEMACCESS_READ, &ExitInfo.GCPtrEffAddr); 13411 13412 VBOXSTRICTRC rcStrict = IEMExecDecodedVmclear(pVCpu, &ExitInfo); 13413 if (RT_LIKELY(rcStrict == VINF_SUCCESS)) 13414 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_RFLAGS | HM_CHANGED_GUEST_HWVIRT); 13415 else if (rcStrict == VINF_IEM_RAISED_XCPT) 13416 { 13417 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_RAISED_XCPT_MASK); 13418 rcStrict = VINF_SUCCESS; 13419 } 13420 return rcStrict; 13398 13421 } 13399 13422 … … 13419 13442 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 13420 13443 13421 /** @todo NSTVMX: Vmptrld. */ 13422 hmR0VmxSetPendingXcptUD(pVCpu); 13423 return VINF_SUCCESS; 13444 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 13445 rc |= hmR0VmxImportGuestState(pVCpu, CPUMCTX_EXTRN_RSP | CPUMCTX_EXTRN_SREG_MASK 13446 | IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK); 13447 rc |= hmR0VmxReadExitInstrInfoVmcs(pVmxTransient); 13448 rc |= hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient); 13449 AssertRCReturn(rc, rc); 13450 13451 HMVMX_CHECK_EXIT_DUE_TO_VMX_INSTR(pVCpu, pVmxTransient->uExitReason); 13452 13453 VMXVEXITINFO ExitInfo; 13454 RT_ZERO(ExitInfo); 13455 ExitInfo.uReason = pVmxTransient->uExitReason; 13456 ExitInfo.u64Qual = pVmxTransient->uExitQual; 13457 ExitInfo.InstrInfo.u = pVmxTransient->ExitInstrInfo.u; 13458 ExitInfo.cbInstr = pVmxTransient->cbInstr; 13459 HMVMX_DECODE_MEM_OPERAND(pVCpu, ExitInfo.InstrInfo.u, ExitInfo.u64Qual, VMXMEMACCESS_READ, &ExitInfo.GCPtrEffAddr); 13460 13461 VBOXSTRICTRC rcStrict = IEMExecDecodedVmptrld(pVCpu, &ExitInfo); 13462 if (RT_LIKELY(rcStrict == VINF_SUCCESS)) 13463 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_RFLAGS | HM_CHANGED_GUEST_HWVIRT); 13464 else if (rcStrict == VINF_IEM_RAISED_XCPT) 13465 { 13466 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_RAISED_XCPT_MASK); 13467 rcStrict = VINF_SUCCESS; 13468 } 13469 return rcStrict; 13424 13470 } 13425 13471 … … 13432 13478 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 13433 13479 13434 /** @todo NSTVMX: Vmptrst. */ 13435 hmR0VmxSetPendingXcptUD(pVCpu); 13436 return VINF_SUCCESS; 13480 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 13481 rc |= hmR0VmxImportGuestState(pVCpu, CPUMCTX_EXTRN_RSP | CPUMCTX_EXTRN_SREG_MASK 13482 | IEM_CPUMCTX_EXTRN_EXEC_DECODED_MEM_MASK); 13483 rc |= hmR0VmxReadExitInstrInfoVmcs(pVmxTransient); 13484 rc |= hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient); 13485 AssertRCReturn(rc, rc); 13486 13487 HMVMX_CHECK_EXIT_DUE_TO_VMX_INSTR(pVCpu, pVmxTransient->uExitReason); 13488 13489 VMXVEXITINFO ExitInfo; 13490 RT_ZERO(ExitInfo); 13491 ExitInfo.uReason = pVmxTransient->uExitReason; 13492 ExitInfo.u64Qual = pVmxTransient->uExitQual; 13493 ExitInfo.InstrInfo.u = pVmxTransient->ExitInstrInfo.u; 13494 ExitInfo.cbInstr = pVmxTransient->cbInstr; 13495 HMVMX_DECODE_MEM_OPERAND(pVCpu, ExitInfo.InstrInfo.u, ExitInfo.u64Qual, VMXMEMACCESS_WRITE, &ExitInfo.GCPtrEffAddr); 13496 13497 VBOXSTRICTRC rcStrict = IEMExecDecodedVmptrst(pVCpu, &ExitInfo); 13498 if (RT_LIKELY(rcStrict == VINF_SUCCESS)) 13499 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_RFLAGS | HM_CHANGED_GUEST_HWVIRT); 13500 else if (rcStrict == VINF_IEM_RAISED_XCPT) 13501 { 13502 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_RAISED_XCPT_MASK); 13503 rcStrict = VINF_SUCCESS; 13504 } 13505 return rcStrict; 13437 13506 } 13438 13507
Note:
See TracChangeset
for help on using the changeset viewer.