VirtualBox

Changeset 8112 in vbox


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

Another attempt at a proper check. (init order messed up the previous one)

Location:
trunk
Files:
4 edited

Legend:

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

    r8108 r8112  
    3838 * @{
    3939 */
     40
     41/* remove after fixing the switcher */
     42#define PGM_WITH_BROKEN_32PAE_SWITCHER
    4043
    4144/** Chunk size for dynamically allocated physical memory. */
  • trunk/src/VBox/VMM/CPUM.cpp

    r7990 r8112  
    406406    }
    407407
     408#ifndef PGM_WITH_BROKEN_32PAE_SWITCHER
    408409    /* Check if PAE was explicitely enabled by the user. */
    409410    bool fEnable = false;
     
    411412    if (VBOX_SUCCESS(rc) && fEnable)
    412413        CPUMSetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_PAE);
     414#endif
    413415
    414416    /*
  • trunk/src/VBox/VMM/PGM.cpp

    r8111 r8112  
    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     }
     1582#ifdef PGM_WITH_BROKEN_32PAE_SWITCHER
     1583    if (!CPUMGetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_PAE))
     1584    {
     1585        bool fEnable = false;
     1586        int rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "EnablePAE", &fEnable);
     1587        if (    VBOX_SUCCESS(rc)
     1588            &&  fEnable
     1589            &&  (PGMGetHostMode(pVM) >= PGMMODE_PAE || HWACCMIsEnabled(pVM))
     1590           )
     1591        {
     1592            CPUMSetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_PAE);
     1593            LogRel(("PGMR3Relocate: turned on PAE\n"));
     1594        }
     1595    }
     1596#endif
    15901597
    15911598    /*
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r8111 r8112  
    2727#include "CPUMInternal.h"
    2828#include <VBox/vm.h>
     29#include <VBox/pgm.h>
     30#include <VBox/hwaccm.h>
    2931#include <VBox/err.h>
    3032#include <VBox/dis.h>
     
    10341036                return;
    10351037            }
     1038#ifdef PGM_WITH_BROKEN_32PAE_SWITCHER
     1039            /* Remove this restriction once the 32->PAE switcher works properly. */
     1040            if (    PGMGetHostMode(pVM) <= PGMMODE_32_BIT
     1041                &&  !HWACCMIsEnabled(pVM))
     1042            {
     1043                LogRel(("WARNING: Can't turn on PAE when the host is in 32 bits paging mode!!\n"));
     1044                return;
     1045            }
     1046#endif
    10361047
    10371048            if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1)
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