Changeset 68433 in vbox
- Timestamp:
- Aug 16, 2017 10:12:38 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_svm.h
r68361 r68433 996 996 /** Cache of the TLB control. */ 997 997 SVMTLBCTRL TLBCtrl; 998 /** Cache of V_INTR_MASKING bit. */ 999 bool fVIntrMasking; 998 /** @} */ 999 1000 /** @name Nested-guest VMCB guest state. 1001 * @{ */ 1002 /** Cache of CR3. */ 1003 uint64_t u64CR3; 1000 1004 /** @} */ 1001 1005 1002 1006 /** @name Other miscellaneous state. 1003 1007 * @{ */ 1004 /** Whether the fields above are updated or not. */1005 bool fValid;1006 1008 /** Whether a VMRUN was just emulated in R0 and the VMCB is up to date. */ 1007 1009 bool fVmrunEmulatedInR0; … … 1009 1011 * processing. */ 1010 1012 bool fExitCodeAndInfoUpdated; 1013 /** Cache of V_INTR_MASKING bit. */ 1014 bool fVIntrMasking; 1015 /** Whether the fields above are updated or not. */ 1016 bool fValid; 1011 1017 /** Alignment. */ 1012 1018 bool afPadding0[4]; … … 1019 1025 typedef const SVMNESTEDVMCBCACHE *PCSVMNESTEDVMCBCACHE; 1020 1026 /** @} */ 1021 AssertCompileMemberAlignment(SVMNESTEDVMCBCACHE, fVIntrMasking, 8);1022 1027 AssertCompileSizeAlignment(SVMNESTEDVMCBCACHE, 8); 1023 1028 -
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r68363 r68433 349 349 if (pNstGstVmcbCache->fValid) 350 350 { 351 PSVMVMCBCTRL pVmcbNstGstCtrl = &pVmcbNstGst->ctrl; 351 PSVMVMCBCTRL pVmcbNstGstCtrl = &pVmcbNstGst->ctrl; 352 PSVMVMCBSTATESAVE pVmcbNstGstState =&pVmcbNstGst->guest; 352 353 pVmcbNstGstCtrl->u16InterceptRdCRx = pNstGstVmcbCache->u16InterceptRdCRx; 353 354 pVmcbNstGstCtrl->u16InterceptWrCRx = pNstGstVmcbCache->u16InterceptWrCRx; … … 356 357 pVmcbNstGstCtrl->u32InterceptXcpt = pNstGstVmcbCache->u32InterceptXcpt; 357 358 pVmcbNstGstCtrl->u64InterceptCtrl = pNstGstVmcbCache->u64InterceptCtrl; 359 pVmcbNstGstState->u64CR3 = pNstGstVmcbCache->u64CR3; 358 360 pVmcbNstGstCtrl->u64VmcbCleanBits = pNstGstVmcbCache->u64VmcbCleanBits; 359 361 pVmcbNstGstCtrl->u64IOPMPhysAddr = pNstGstVmcbCache->u64IOPMPhysAddr; -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r68408 r68433 1371 1371 { 1372 1372 Assert(!pVCpu->CTX_SUFF(pVM)->cpum.ro.GuestFeatures.fSvmNestedPaging); 1373 pVmcbNstGst->guest.u64CR3 = pCtx->cr3; 1373 int rc = PGMPhysGCPhys2HCPhys(pVCpu->CTX_SUFF(pVM), pCtx->cr3, &pVmcbNstGst->guest.u64CR3); 1374 AssertRC(rc); 1374 1375 pVmcbNstGst->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_CRX_EFER; 1375 1376 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_CR3); … … 2039 2040 PSVMVMCB pVmcbNstGst = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 2040 2041 PSVMVMCBCTRL pVmcbNstGstCtrl = &pVmcbNstGst->ctrl; 2042 PSVMVMCBSTATESAVE pVmcbNstGstState = &pVmcbNstGst->guest; 2041 2043 PSVMNESTEDVMCBCACHE pNstGstVmcbCache = &pVCpu->hm.s.svm.NstGstVmcbCache; 2042 2044 … … 2047 2049 pNstGstVmcbCache->u32InterceptXcpt = pVmcbNstGstCtrl->u32InterceptXcpt; 2048 2050 pNstGstVmcbCache->u64InterceptCtrl = pVmcbNstGstCtrl->u64InterceptCtrl; 2051 pNstGstVmcbCache->u64CR3 = pVmcbNstGstState->u64CR3; 2049 2052 pNstGstVmcbCache->u64IOPMPhysAddr = pVmcbNstGstCtrl->u64IOPMPhysAddr; 2050 2053 pNstGstVmcbCache->u64MSRPMPhysAddr = pVmcbNstGstCtrl->u64MSRPMPhysAddr; … … 2128 2131 if (!pVCpu->hm.s.svm.NstGstVmcbCache.fVmrunEmulatedInR0) 2129 2132 { 2133 /* hmR0SvmLoadGuestVmcbNested needs to be called first which caches the VMCB fields and adjusts others. */ 2130 2134 hmR0SvmLoadGuestVmcbNested(pVCpu, pCtx); 2135 2131 2136 hmR0SvmLoadGuestControlRegsNested(pVCpu, pVmcbNstGst, pCtx); 2132 2137 hmR0SvmLoadGuestSegmentRegs(pVCpu, pVmcbNstGst, pCtx);
Note:
See TracChangeset
for help on using the changeset viewer.