VirtualBox

Changeset 13115 in vbox for trunk/src


Ignore:
Timestamp:
Oct 9, 2008 9:32:28 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37610
Message:

Corrections for the EPTP

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r13113 r13115  
    296296        /** Current CR4 mask. */
    297297        uint64_t                    cr4_mask;
     298
     299        /** Current EPTP. */
     300        RTHCPHYS                    GCPhysEPTP;
    298301
    299302        /** VMX MSR values */
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r13113 r13115  
    11871187        if (pVM->hwaccm.s.fNestedPaging)
    11881188        {
    1189             RTHCPHYS GCPhys;
    11901189
    11911190            AssertMsg(PGMGetEPTCR3(pVM) == PGMGetHyperCR3(pVM), ("%VHp vs %VHp\n", PGMGetEPTCR3(pVM), PGMGetHyperCR3(pVM)));
    1192             GCPhys = PGMGetEPTCR3(pVM);
    1193 
    1194             Assert(!(GCPhys & 0xfff));
     1191            pVM->hwaccm.s.vmx.GCPhysEPTP = PGMGetEPTCR3(pVM);
     1192
     1193            Assert(!(pVM->hwaccm.s.vmx.GCPhysEPTP & 0xfff));
    11951194            /** @todo Check the IA32_VMX_EPT_VPID_CAP MSR for other supported memory types. */
    1196             GCPhys |=   VMX_EPT_MEMTYPE_WB
    1197                      | (VMX_EPT_PAGE_WALK_LENGTH_DEFAULT << VMX_EPT_PAGE_WALK_LENGTH_SHIFT);
    1198             rc = VMXWriteVMCS(VMX_VMCS_CTRL_EPTP_FULL, GCPhys);
     1195            pVM->hwaccm.s.vmx.GCPhysEPTP |=   VMX_EPT_MEMTYPE_WB
     1196                                           | (VMX_EPT_PAGE_WALK_LENGTH_DEFAULT << VMX_EPT_PAGE_WALK_LENGTH_SHIFT);
     1197           
     1198            rc = VMXWriteVMCS(VMX_VMCS_CTRL_EPTP_FULL, pVM->hwaccm.s.vmx.GCPhysEPTP);
    11991199#if HC_ARCH_BITS == 32
    1200             rc = VMXWriteVMCS(VMX_VMCS_CTRL_EPTP_HIGH, (uint32_t)(GCPhys >> 32ULL));
     1200            rc = VMXWriteVMCS(VMX_VMCS_CTRL_EPTP_HIGH, (uint32_t)(pVM->hwaccm.s.vmx.GCPhysEPTP >> 32ULL));
    12011201#endif
    12021202            AssertRC(rc);
     
    29492949
    29502950    Assert(pVM->hwaccm.s.fNestedPaging);
    2951     descriptor[0] = PGMGetEPTCR3(pVM);
     2951    descriptor[0] = pVM->hwaccm.s.vmx.GCPhysEPTP;
    29522952    descriptor[1] = GCPhys;
    29532953    int rc = VMXR0InvEPT(enmFlush, &descriptor[0]);
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