VirtualBox

Changeset 15159 in vbox


Ignore:
Timestamp:
Dec 9, 2008 1:01:55 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40566
Message:

Set the correct shadow paging mode for AMD-V nested paging.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/hwaccm.h

    r14899 r15159  
    7373VMMDECL(int)     HWACCMInvalidatePhysPage(PVM pVM, RTGCPHYS GCPhys);
    7474VMMDECL(bool)    HWACCMIsNestedPagingActive(PVM pVM);
    75 VMMDECL(PGMMODE) HWACCMGetPagingMode(PVM pVM);
     75VMMDECL(PGMMODE) HWACCMGetShwPagingMode(PVM pVM);
    7676VMMDECL(RTCPUID) HWACCMGetVMCPUId(PVM pVM);
    7777#else
  • trunk/src/VBox/VMM/PGM.cpp

    r15151 r15159  
    32633263    /* Override the shadow mode is nested paging is active. */
    32643264    if (HWACCMIsNestedPagingActive(pVM))
    3265         enmShadowMode = HWACCMGetPagingMode(pVM);
     3265        enmShadowMode = HWACCMGetShwPagingMode(pVM);
    32663266
    32673267    *penmSwitcher = enmSwitcher;
  • trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp

    r13898 r15159  
    9999 * @param   pVM         The VM to operate on.
    100100 */
    101 VMMDECL(PGMMODE) HWACCMGetPagingMode(PVM pVM)
     101VMMDECL(PGMMODE) HWACCMGetShwPagingMode(PVM pVM)
    102102{
    103103    Assert(HWACCMIsNestedPagingActive(pVM));
    104104    if (pVM->hwaccm.s.svm.fSupported)
    105         return PGMMODE_NESTED;
     105    {
     106        PGMMODE enmShwPagingMode;
     107
     108#if HC_ARCH_BITS == 32
     109        if (CPUMIsGuestInLongModeEx(pCtx))
     110            enmShwPagingMode = PGMMODE_AMD64_NX;
     111        else
     112#endif
     113            enmShwPagingMode = PGMGetHostMode(pVM);
     114
     115        return enmShwPagingMode;
     116    }
    106117    Assert(pVM->hwaccm.s.vmx.fSupported);
    107118    return PGMMODE_EPT;
Note: See TracChangeset for help on using the changeset viewer.

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