- 時間撮記:
- 2023-10-31 下午12:39:45 (17 月 以前)
- svn:sync-xref-src-repo-rev:
- 159776
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
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
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器