Changeset 76042 in vbox for trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
- Timestamp:
- Dec 7, 2018 8:36:12 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r76015 r76042 5898 5898 Assert(pGCPtrMem); 5899 5899 Assert(!CPUMIsGuestInRealOrV86Mode(pVCpu)); 5900 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_RSP | CPUMCTX_EXTRN_SREG_MASK | CPUMCTX_EXTRN_EFER | CPUMCTX_EXTRN_CR0); 5900 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_RIP | CPUMCTX_EXTRN_RSP | CPUMCTX_EXTRN_SREG_MASK | CPUMCTX_EXTRN_EFER 5901 | CPUMCTX_EXTRN_CR0); 5901 5902 5902 5903 static uint64_t const s_auAddrSizeMasks[] = { UINT64_C(0xffff), UINT64_C(0xffffffff), UINT64_C(0xffffffffffffffff) }; … … 6081 6082 { 6082 6083 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR4 | CPUMCTX_EXTRN_CR0 | CPUMCTX_EXTRN_RFLAGS | CPUMCTX_EXTRN_SS 6083 | CPUMCTX_EXTRN_ HWVIRT);6084 | CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_EFER); 6084 6085 6085 6086 if ( CPUMIsGuestInRealOrV86ModeEx(&pVCpu->cpum.GstCtx) … … 13457 13458 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 13458 13459 13459 /** @todo NSTVMX: Vmlaunch. */ 13460 hmR0VmxSetPendingXcptUD(pVCpu); 13461 return VINF_SUCCESS; 13460 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 13461 rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMENTRY_MASK); 13462 AssertRCReturn(rc, rc); 13463 13464 HMVMX_CHECK_EXIT_DUE_TO_VMX_INSTR(pVCpu, pVmxTransient->uExitReason); 13465 13466 VBOXSTRICTRC rcStrict = IEMExecDecodedVmlaunchVmresume(pVCpu, pVmxTransient->cbInstr, VMXINSTRID_VMLAUNCH); 13467 if (RT_LIKELY(rcStrict == VINF_SUCCESS)) 13468 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_ALL_GUEST); 13469 Assert(rcStrict != VINF_IEM_RAISED_XCPT); 13470 return rcStrict; 13462 13471 } 13463 13472 … … 13579 13588 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 13580 13589 13581 /** @todo NSTVMX: Vmresume. */ 13582 hmR0VmxSetPendingXcptUD(pVCpu); 13583 return VINF_SUCCESS; 13590 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 13591 rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMENTRY_MASK); 13592 AssertRCReturn(rc, rc); 13593 13594 HMVMX_CHECK_EXIT_DUE_TO_VMX_INSTR(pVCpu, pVmxTransient->uExitReason); 13595 13596 VBOXSTRICTRC rcStrict = IEMExecDecodedVmlaunchVmresume(pVCpu, pVmxTransient->cbInstr, VMXINSTRID_VMRESUME); 13597 if (RT_LIKELY(rcStrict == VINF_SUCCESS)) 13598 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_ALL_GUEST); 13599 Assert(rcStrict != VINF_IEM_RAISED_XCPT); 13600 return rcStrict; 13584 13601 } 13585 13602 … … 13630 13647 13631 13648 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 13632 rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK);13649 rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, CPUMCTX_EXTRN_CR4 | IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK); 13633 13650 AssertRCReturn(rc, rc); 13634 13651 … … 13638 13655 if (RT_LIKELY(rcStrict == VINF_SUCCESS)) 13639 13656 { 13640 /* VMXOFF on success changes the internal hwvirt state but not anything that's visible to the guest. */13641 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_GUEST_ HWVIRT);13657 /* VMXOFF changes the internal hwvirt. state but not anything that's visible to the guest other than RIP. */ 13658 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_HWVIRT); 13642 13659 } 13643 13660 else if (rcStrict == VINF_IEM_RAISED_XCPT)
Note:
See TracChangeset
for help on using the changeset viewer.