VirtualBox

Changeset 15159 in vbox for trunk/src/VBox/VMM/VMMAll


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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