VirtualBox

Changeset 87258 in vbox


Ignore:
Timestamp:
Jan 15, 2021 11:10:26 AM (4 years ago)
Author:
vboxsync
Message:

Main: Adjustments for bugref:9898.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r86331 r87258  
    139139#endif
    140140
    141 #include <iprt/asm-amd64-x86.h>
     141#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     142# include <iprt/asm-amd64-x86.h>
     143#endif
    142144#ifdef RT_OS_SOLARIS
    143145# include <iprt/ctype.h>
     
    329331    m->fRecheckVTSupported = false;
    330332
     333#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    331334    if (ASMHasCpuId())
    332335    {
     
    348351                                 && (fExtFeaturesEdx & X86_CPUID_EXT_FEATURE_EDX_LONG_MODE);
    349352
    350 #if defined(RT_OS_DARWIN) && ARCH_BITS == 32 /* darwin.x86 has some optimizations of 64-bit on 32-bit. */
     353# if defined(RT_OS_DARWIN) && ARCH_BITS == 32 /* darwin.x86 has some optimizations of 64-bit on 32-bit. */
    351354            int     f64bitCapable = 0;
    352355            size_t  cbParameter   = sizeof(f64bitCapable);
    353356            if (sysctlbyname("hw.cpu64bit_capable", &f64bitCapable, &cbParameter, NULL, NULL) != -1)
    354357                m->fLongModeSupported = f64bitCapable != 0;
    355 #endif
     358# endif
    356359
    357360            /* VT-x? */
     
    398401        }
    399402    }
     403#endif /* defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) */
     404
    400405
    401406    /* Check with SUPDrv if VT-x and AMD-V are really supported (may fail). */
     
    13101315             : setError(E_FAIL, tr("CPU no.%u is not online"), aCpuId);
    13111316
     1317#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    13121318    uint32_t uEAX, uEBX, uECX, uEDX;
    13131319    ASMCpuId_Idx_ECX(aLeaf, aSubLeaf, &uEAX, &uEBX, &uECX, &uEDX);
     
    13161322    *aValECX = uECX;
    13171323    *aValEDX = uEDX;
     1324#else
     1325    *aValEAX = 0;
     1326    *aValEBX = 0;
     1327    *aValECX = 0;
     1328    *aValEDX = 0;
     1329#endif
    13181330
    13191331    return S_OK;
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