Changeset 101684 in vbox for trunk/src/VBox/Main/src-server/HostImpl.cpp
- Timestamp:
- Oct 31, 2023 12:39:45 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r101176 r101684 73 73 #endif /* VBOX_WITH_RESOURCE_USAGE_API */ 74 74 75 #if defined(RT_OS_DARWIN) && ARCH_BITS == 3275 #if defined(RT_OS_DARWIN) 76 76 # include <sys/types.h> 77 77 # include <sys/sysctl.h> … … 420 420 } 421 421 } 422 #elif defined(RT_ARCH_ARM64) 423 m->fLongModeSupported = true; /* Misnomer but means 64-bit guest support, we are running on 64-bit so it must be available. */ 424 425 # if defined(RT_OS_DARWIN) 426 /* 427 * The kern.hv_support parameter indicates support for the hypervisor API in the 428 * kernel, which is the only way for virtualization on macOS on Apple Silicon. 429 */ 430 int32_t fHvSupport = 0; 431 size_t cbOld = sizeof(fHvSupport); 432 if (sysctlbyname("kern.hv_support", &fHvSupport, &cbOld, NULL, 0) == 0) 433 { 434 if (fHvSupport != 0) 435 { 436 m->fVTSupported = true; 437 m->fUnrestrictedGuestSupported = true; 438 m->fNestedPagingSupported = true; 439 } 440 } 441 # endif 422 442 #endif /* defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) */ 423 443 … … 1230 1250 void Host::i_updateProcessorFeatures() 1231 1251 { 1252 #ifndef RT_ARCH_ARM64 1232 1253 /* Perhaps the driver is available now... */ 1233 1254 int vrc = SUPR3InitEx(SUPR3INIT_F_LIMITED, NULL); … … 1263 1284 m->fRecheckVTSupported = false; /* No need to try again, we cached everything. */ 1264 1285 } 1286 #endif 1265 1287 } 1266 1288
Note:
See TracChangeset
for help on using the changeset viewer.