VirtualBox

Changeset 19379 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
May 5, 2009 2:01:12 PM (16 years ago)
Author:
vboxsync
Message:

ConsoleImpl2.cpp: force hardware virtualization mode if cCpus > 1. Required for darwin at least.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r19239 r19379  
    244244    else
    245245        fHWVirtExEnabled = (hwVirtExEnabled == TSBool_True);
     246    if (cCpus > 1) /** @todo SMP: This isn't nice, but things won't work on mac otherwise. */
     247        fHWVirtExEnabled = TSBool_True;
     248
    246249#ifdef RT_OS_DARWIN
    247250    rc = CFGMR3InsertInteger(pRoot, "HwVirtExtForced",      fHWVirtExEnabled);      RC_CHECK();
    248251#else
    249     /* With more than 4GB PGM will use different RAMRANGE sizes for raw mode and hv mode to optimize lookup times. */
    250     rc = CFGMR3InsertInteger(pRoot, "HwVirtExtForced",      fHWVirtExEnabled && cbRam > (_4G - cbRamHole)); RC_CHECK();
     252    /* - With more than 4GB PGM will use different RAMRANGE sizes for raw
     253         mode and hv mode to optimize lookup times.
     254       - With more than one virtual CPU, raw-mode isn't a fallback option. */
     255    BOOL fHwVirtExtForced = fHWVirtExEnabled
     256                         && (   cbRam > (_4G - cbRamHole)
     257                             || cCpus > 1);
     258    rc = CFGMR3InsertInteger(pRoot, "HwVirtExtForced",      fHwVirtExtForced);      RC_CHECK();
    251259#endif
    252260
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