VirtualBox

Changeset 49769 in vbox for trunk/src


Ignore:
Timestamp:
Dec 4, 2013 10:27:18 AM (11 years ago)
Author:
vboxsync
Message:

Main/ConsoleImpl2: don't allow 64-bit guests on hosts without VT-x/AMD-V

File:
1 edited

Legend:

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

    r49625 r49769  
    967967         * Hardware virtualization extensions.
    968968         */
     969        BOOL fSupportsHwVirtEx;
     970        hrc = host->GetProcessorFeature(ProcessorFeature_HWVirtEx, &fSupportsHwVirtEx);     H();
     971
    969972        BOOL fIsGuest64Bit;
    970973        hrc = pMachine->GetCPUProperty(CPUPropertyType_LongMode, &fIsGuest64Bit);           H();
    971         BOOL fSupportsLongMode;
    972         hrc = host->GetProcessorFeature(ProcessorFeature_LongMode, &fSupportsLongMode);     H();
    973         if (!fSupportsLongMode && fIsGuest64Bit)
    974         {
    975             LogRel(("WARNING! 64-bit guest type selected but the host CPU does NOT support 64-bit.\n"));
    976             fIsGuest64Bit = FALSE;
     974        if (fIsGuest64Bit)
     975        {
     976            BOOL fSupportsLongMode;
     977            hrc = host->GetProcessorFeature(ProcessorFeature_LongMode, &fSupportsLongMode); H();
     978            if (!fSupportsLongMode)
     979            {
     980                LogRel(("WARNING! 64-bit guest type selected but the host CPU does NOT support 64-bit.\n"));
     981                fIsGuest64Bit = FALSE;
     982            }
     983            if (!fSupportsHwVirtEx)
     984            {
     985                LogRel(("WARNING! 64-bit guest type selected but the host CPU does NOT support HW virtualization.\n"));
     986                fIsGuest64Bit = FALSE;
     987            }
    977988        }
    978989
    979990        BOOL fHMEnabled;
    980         hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &fHMEnabled); H();
     991        hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &fHMEnabled);     H();
    981992        if (cCpus > 1 && !fHMEnabled)
    982993        {
    983994            LogRel(("Forced fHMEnabled to TRUE by SMP guest.\n"));
    984995            fHMEnabled = TRUE;
    985         }
    986         if (!fHMEnabled && fIsGuest64Bit)
    987         {
    988             LogRel(("WARNING! 64-bit guest type selected on host without hardware virtualization (VT-x or AMD-V).\n"));
    989             fIsGuest64Bit = FALSE;
    990996        }
    991997
     
    11671173            hrc = bwGroups[i]->COMGETTER(Name)(strName.asOutParam());                       H();
    11681174            hrc = bwGroups[i]->COMGETTER(Type)(&enmType);                                   H();
    1169             hrc = bwGroups[i]->COMGETTER(MaxBytesPerSec)(&cMaxBytesPerSec);                       H();
     1175            hrc = bwGroups[i]->COMGETTER(MaxBytesPerSec)(&cMaxBytesPerSec);                 H();
    11701176
    11711177            if (enmType == BandwidthGroupType_Disk)
     
    13551361        Mouse *pMouse = mMouse;
    13561362        PointingHIDType_T aPointingHID;
    1357         hrc = pMachine->COMGETTER(PointingHIDType)(&aPointingHID);          H();
     1363        hrc = pMachine->COMGETTER(PointingHIDType)(&aPointingHID);                          H();
    13581364        InsertConfigNode(pInst,    "LUN#1", &pLunL0);
    13591365        InsertConfigString(pLunL0, "Driver",               "MouseQueue");
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