VirtualBox

Changeset 26662 in vbox


Ignore:
Timestamp:
Feb 19, 2010 3:11:13 PM (15 years ago)
Author:
vboxsync
Message:

VMM: conditionally expose MWAIT extensions

Location:
trunk/src/VBox
Files:
2 edited

Legend:

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

    r26609 r26662  
    394394        rc = CFGMR3InsertNode(pRoot, "CPUM", &pCPUM);                               RC_CHECK();
    395395        rc = CFGMR3InsertInteger(pCPUM, "NT4LeafLimit", true);                      RC_CHECK();
     396    }
     397
     398    if (osTypeId == "MacOS")
     399    {
     400        /*
     401         * Expose extended MWAIT features to Mac OS guests.
     402         */
     403        LogRel(("Using MWAIT extensions\n"));
     404        PCFGMNODE pCPUM;
     405        rc = CFGMR3InsertNode(pRoot, "CPUM", &pCPUM);                               RC_CHECK();
     406        rc = CFGMR3InsertInteger(pCPUM, "MWaitExtensions", true);                   RC_CHECK();
    396407    }
    397408
  • trunk/src/VBox/VMM/CPUM.cpp

    r26654 r26662  
    621621
    622622    pCPUM->aGuestCpuIdStd[5].ecx = pCPUM->aGuestCpuIdStd[5].edx = 0;
     623    /** @cfgm{/CPUM/MWaitExtensions, boolean, false}
     624     * Expose MWAIT extended features to the guest.
     625     * For now we expose just MWAIT break on interrupt feature (bit 1)
     626     */
     627    bool fMWaitExtensions;
     628    rc = CFGMR3QueryBoolDef(pCpumCfg, "MWaitExtensions", &fMWaitExtensions, false); AssertRCReturn(rc, rc);
     629    if (fMWaitExtensions)
     630        pCPUM->aGuestCpuIdStd[5].ecx = 3;
    623631
    624632    /*
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