VirtualBox

Changeset 27304 in vbox


Ignore:
Timestamp:
Mar 11, 2010 8:21:25 PM (15 years ago)
Author:
vboxsync
Message:

activate MWAIT extensions basing on OS family id (64-bit Snow Leo works too)

File:
1 edited

Legend:

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

    r27166 r27304  
    330330    ComPtr<IGuestOSType> guestOSType;
    331331    hrc = virtualBox->GetGuestOSType(osTypeId, guestOSType.asOutParam());           H();
     332   
     333    Bstr guestTypeFamilyId;
     334    hrc = guestOSType->COMGETTER(FamilyId)(guestTypeFamilyId.asOutParam());       H();
     335    BOOL fOsXGuest = guestTypeFamilyId == Bstr("MacOS");
    332336
    333337    /*
     
    392396    }
    393397
    394     if (osTypeId == "MacOS")
     398    if (fOsXGuest)
    395399    {
    396400        /*
    397          * Expose extended MWAIT features to Mac OS guests.
     401         * Expose extended MWAIT features to Mac OS X guests.
    398402         */
    399403        LogRel(("Using MWAIT extensions\n"));
     
    595599#endif
    596600
    597     Bstr tmpStr2;
    598     hrc = guestOSType->COMGETTER(FamilyId)(tmpStr2.asOutParam());                   H();
    599601    /*
    600602     * Enable 3 following devices: HPET, SMC, LPC on MacOS X guests
    601603     */
    602     BOOL fExtProfile = tmpStr2 == Bstr("MacOS");
     604    BOOL fExtProfile = fOsXGuest;
    603605
    604606    /*
     
    632634    if (fSmcEnabled)
    633635    {
     636        Bstr tmpStr2;
    634637        rc = CFGMR3InsertNode(pDevices, "smc", &pDev);                       RC_CHECK();
    635638        rc = CFGMR3InsertNode(pDev,     "0", &pInst);                        RC_CHECK();
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