Changeset 87258 in vbox
- Timestamp:
- Jan 15, 2021 11:10:26 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r86331 r87258 139 139 #endif 140 140 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 142 144 #ifdef RT_OS_SOLARIS 143 145 # include <iprt/ctype.h> … … 329 331 m->fRecheckVTSupported = false; 330 332 333 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 331 334 if (ASMHasCpuId()) 332 335 { … … 348 351 && (fExtFeaturesEdx & X86_CPUID_EXT_FEATURE_EDX_LONG_MODE); 349 352 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. */ 351 354 int f64bitCapable = 0; 352 355 size_t cbParameter = sizeof(f64bitCapable); 353 356 if (sysctlbyname("hw.cpu64bit_capable", &f64bitCapable, &cbParameter, NULL, NULL) != -1) 354 357 m->fLongModeSupported = f64bitCapable != 0; 355 # endif358 # endif 356 359 357 360 /* VT-x? */ … … 398 401 } 399 402 } 403 #endif /* defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) */ 404 400 405 401 406 /* Check with SUPDrv if VT-x and AMD-V are really supported (may fail). */ … … 1310 1315 : setError(E_FAIL, tr("CPU no.%u is not online"), aCpuId); 1311 1316 1317 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 1312 1318 uint32_t uEAX, uEBX, uECX, uEDX; 1313 1319 ASMCpuId_Idx_ECX(aLeaf, aSubLeaf, &uEAX, &uEBX, &uECX, &uEDX); … … 1316 1322 *aValECX = uECX; 1317 1323 *aValEDX = uEDX; 1324 #else 1325 *aValEAX = 0; 1326 *aValEBX = 0; 1327 *aValECX = 0; 1328 *aValEDX = 0; 1329 #endif 1318 1330 1319 1331 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.