VirtualBox

Changeset 8111 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 17, 2008 4:02:55 PM (17 years ago)
Author:
vboxsync
Message:

The previous check for PAE was too strict.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r8108 r8111  
    15801580    LogFlow(("PGMR3Relocate\n"));
    15811581
     1582    /* Note: remove this restriction once the 32->PAE switcher works properly. */
     1583    if (    CPUMGetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_PAE)
     1584        &&  PGMGetHostMode(pVM) <= PGMMODE_32_BIT
     1585        &&  !HWACCMIsEnabled(pVM))
     1586    {
     1587        CPUMClearGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_PAE);
     1588        LogRel(("WARNING: Can't turn on PAE when the host is in 32 bits paging mode!!\n"));
     1589    }
     1590
    15821591    /*
    15831592     * Paging stuff.
     
    26842693                case SUPPAGINGMODE_32_BIT:
    26852694                case SUPPAGINGMODE_32_BIT_GLOBAL:
    2686                     AssertFailed(); /* this switcher is not well tested!! */
    26872695                    enmShadowMode = PGMMODE_PAE;
    26882696                    enmSwitcher = VMMSWITCHER_32_TO_PAE;
    2689                     return PGMMODE_INVALID;
     2697                    break;
    26902698
    26912699                case SUPPAGINGMODE_PAE:
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r8110 r8111  
    2727#include "CPUMInternal.h"
    2828#include <VBox/vm.h>
    29 #include <VBox/pgm.h>
    3029#include <VBox/err.h>
    3130#include <VBox/dis.h>
     
    10351034                return;
    10361035            }
    1037             /* Remove this restriction once the 32->PAE switcher works properly. */
    1038             if (PGMGetHostMode(pVM) <= PGMMODE_32_BIT)
    1039             {
    1040                 LogRel(("WARNING: Can't turn on PAE when the host is in 32 bits paging mode!!\n"));
    1041                 return;
    1042             }
    10431036
    10441037            if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1)
     
    10751068            break;
    10761069    }
     1070}
     1071
     1072/**
     1073 * Queries a CPUID feature bit.
     1074 *
     1075 * @returns boolean for feature presence
     1076 * @param   pVM             The VM Handle.
     1077 * @param   enmFeature      The feature to query.
     1078 */
     1079CPUMDECL(bool) CPUMGetGuestCpuIdFeature(PVM pVM, CPUMCPUIDFEATURE enmFeature)
     1080{
     1081    switch (enmFeature)
     1082    {
     1083        case CPUMCPUIDFEATURE_PAE:
     1084        {
     1085            if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1)
     1086                return !!(pVM->cpum.s.aGuestCpuIdStd[1].edx & X86_CPUID_FEATURE_EDX_PAE);
     1087            break;
     1088        }
     1089
     1090        default:
     1091            AssertMsgFailed(("enmFeature=%d\n", enmFeature));
     1092            break;
     1093    }
     1094    return false;
    10771095}
    10781096
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