VirtualBox

Changeset 95066 in vbox


Ignore:
Timestamp:
May 23, 2022 8:06:48 PM (3 years ago)
Author:
vboxsync
Message:

Main/ConsoleImpl2.cpp: No need to check for the host's VT-x/AMD-V and long mode capabilities anymore, just enable things based on guest CPU configs. (ARM64 has no long mode. In driverless/NEM mode we shouldn't care about VT-x/AMD-V, ditto for arm64.) bugref:9898 bugref:10138

File:
1 edited

Legend:

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

    r94974 r95066  
    11701170         * Hardware virtualization extensions.
    11711171         */
    1172         BOOL fSupportsHwVirtEx;
    1173         hrc = host->GetProcessorFeature(ProcessorFeature_HWVirtEx, &fSupportsHwVirtEx);     H();
    1174 
    11751172        BOOL fIsGuest64Bit;
    11761173        hrc = pMachine->GetCPUProperty(CPUPropertyType_LongMode, &fIsGuest64Bit);           H();
    1177         if (fIsGuest64Bit)
    1178         {
    1179             BOOL fSupportsLongMode;
    1180             hrc = host->GetProcessorFeature(ProcessorFeature_LongMode, &fSupportsLongMode); H();
    1181             if (!fSupportsLongMode)
    1182             {
    1183                 LogRel(("WARNING! 64-bit guest type selected but the host CPU does NOT support 64-bit.\n"));
    1184                 fIsGuest64Bit = FALSE;
    1185             }
    1186             if (!fSupportsHwVirtEx)
    1187             {
    1188                 LogRel(("WARNING! 64-bit guest type selected but the host CPU does NOT support HW virtualization.\n"));
    1189                 fIsGuest64Bit = FALSE;
    1190             }
    1191         }
    11921174
    11931175        /* Sanitize valid/useful APIC combinations, see @bugref{8868}. */
     
    36373619                InsertConfigInteger(pCfg,  "McfgBase",   uMcfgBase);
    36383620                InsertConfigInteger(pCfg,  "McfgLength", cbMcfgLength);
    3639                 /* 64-bit prefetch window root resource:
    3640                  * Only for ICH9 and if PAE or Long Mode is enabled.
    3641                  * And only with hardware virtualization (@bugref{5454}). */
    3642                 if (   (fEnablePAE || fIsGuest64Bit)
    3643                     && fSupportsHwVirtEx /* HwVirt needs to be supported by the host
    3644                                             otherwise VMM falls back to raw mode */
    3645                     && fHMEnabled        /* HwVirt needs to be enabled in VM config */)
     3621                /* 64-bit prefetch window root resource: Only for ICH9 and if PAE or Long Mode is enabled (@bugref{5454}). */
     3622                if (fIsGuest64Bit || fEnablePAE)
    36463623                    InsertConfigInteger(pCfg,  "PciPref64Enabled", 1);
    36473624            }
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