VirtualBox

Changeset 68433 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 16, 2017 10:12:38 AM (7 years ago)
Author:
vboxsync
Message:

VMM: Nested Hw.virt: SVM bits.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp

    r68363 r68433  
    349349    if (pNstGstVmcbCache->fValid)
    350350    {
    351         PSVMVMCBCTRL pVmcbNstGstCtrl = &pVmcbNstGst->ctrl;
     351        PSVMVMCBCTRL      pVmcbNstGstCtrl  = &pVmcbNstGst->ctrl;
     352        PSVMVMCBSTATESAVE pVmcbNstGstState =&pVmcbNstGst->guest;
    352353        pVmcbNstGstCtrl->u16InterceptRdCRx        = pNstGstVmcbCache->u16InterceptRdCRx;
    353354        pVmcbNstGstCtrl->u16InterceptWrCRx        = pNstGstVmcbCache->u16InterceptWrCRx;
     
    356357        pVmcbNstGstCtrl->u32InterceptXcpt         = pNstGstVmcbCache->u32InterceptXcpt;
    357358        pVmcbNstGstCtrl->u64InterceptCtrl         = pNstGstVmcbCache->u64InterceptCtrl;
     359        pVmcbNstGstState->u64CR3                  = pNstGstVmcbCache->u64CR3;
    358360        pVmcbNstGstCtrl->u64VmcbCleanBits         = pNstGstVmcbCache->u64VmcbCleanBits;
    359361        pVmcbNstGstCtrl->u64IOPMPhysAddr          = pNstGstVmcbCache->u64IOPMPhysAddr;
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r68408 r68433  
    13711371    {
    13721372        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);
    13741375        pVmcbNstGst->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_CRX_EFER;
    13751376        HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_CR3);
     
    20392040    PSVMVMCB            pVmcbNstGst      = pCtx->hwvirt.svm.CTX_SUFF(pVmcb);
    20402041    PSVMVMCBCTRL        pVmcbNstGstCtrl  = &pVmcbNstGst->ctrl;
     2042    PSVMVMCBSTATESAVE   pVmcbNstGstState = &pVmcbNstGst->guest;
    20412043    PSVMNESTEDVMCBCACHE pNstGstVmcbCache = &pVCpu->hm.s.svm.NstGstVmcbCache;
    20422044
     
    20472049    pNstGstVmcbCache->u32InterceptXcpt  = pVmcbNstGstCtrl->u32InterceptXcpt;
    20482050    pNstGstVmcbCache->u64InterceptCtrl  = pVmcbNstGstCtrl->u64InterceptCtrl;
     2051    pNstGstVmcbCache->u64CR3            = pVmcbNstGstState->u64CR3;
    20492052    pNstGstVmcbCache->u64IOPMPhysAddr   = pVmcbNstGstCtrl->u64IOPMPhysAddr;
    20502053    pNstGstVmcbCache->u64MSRPMPhysAddr  = pVmcbNstGstCtrl->u64MSRPMPhysAddr;
     
    21282131    if (!pVCpu->hm.s.svm.NstGstVmcbCache.fVmrunEmulatedInR0)
    21292132    {
     2133        /* hmR0SvmLoadGuestVmcbNested needs to be called first which caches the VMCB fields and adjusts others. */
    21302134        hmR0SvmLoadGuestVmcbNested(pVCpu, pCtx);
     2135
    21312136        hmR0SvmLoadGuestControlRegsNested(pVCpu, pVmcbNstGst, pCtx);
    21322137        hmR0SvmLoadGuestSegmentRegs(pVCpu, pVmcbNstGst, pCtx);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette