Changeset 106761 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 28, 2024 8:57:07 PM (4 months ago)
- svn:sync-xref-src-repo-rev:
- 165646
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp
r106743 r106761 604 604 605 605 return VERR_IPE_UNEXPECTED_STATUS; 606 } 607 608 609 /** Puts a name to a hypervisor framework status code. */ 610 static const char *nemR3DarwinHvStatusName(hv_return_t hrc) 611 { 612 switch (hrc) 613 { 614 RT_CASE_RET_STR(HV_SUCCESS); 615 RT_CASE_RET_STR(HV_ERROR); 616 RT_CASE_RET_STR(HV_BUSY); 617 RT_CASE_RET_STR(HV_BAD_ARGUMENT); 618 RT_CASE_RET_STR(HV_ILLEGAL_GUEST_STATE); 619 RT_CASE_RET_STR(HV_NO_RESOURCES); 620 RT_CASE_RET_STR(HV_NO_DEVICE); 621 RT_CASE_RET_STR(HV_DENIED); 622 RT_CASE_RET_STR(HV_UNSUPPORTED); 623 } 624 return ""; 606 625 } 607 626 … … 1064 1083 int rc2 = RTLdrGetSymbol(hMod, g_aImports[i].pszName, (void **)g_aImports[i].ppfn); 1065 1084 if (RT_SUCCESS(rc2)) 1066 { 1067 LogRel(("NEM: info: Found optional import Hypervisor!%s.\n", 1068 g_aImports[i].pszName)); 1069 } 1085 LogRel(("NEM: info: Found optional import Hypervisor!%s.\n", g_aImports[i].pszName)); 1070 1086 else 1071 1087 { 1072 1088 *g_aImports[i].ppfn = NULL; 1073 1074 LogRel(("NEM: info: Failed to import Hypervisor!%s: %Rrc\n", 1075 g_aImports[i].pszName, rc2)); 1089 LogRel(("NEM: info: Optional import Hypervisor!%s not found: %Rrc\n", g_aImports[i].pszName, rc2)); 1076 1090 } 1077 1091 } 1078 if (RT_SUCCESS(rc)) 1079 { 1080 Assert(!RTErrInfoIsSet(pErrInfo)); 1081 } 1082 1092 Assert(RT_SUCCESS(rc) && !RTErrInfoIsSet(pErrInfo)); 1083 1093 RTLdrClose(hMod); 1084 1094 } … … 1243 1253 int rc = nemR3DarwinLoadHv(pErrInfo); 1244 1254 if (RT_FAILURE(rc)) 1255 { 1256 if ((fForced || !fFallback) && RTErrInfoIsSet(pErrInfo)) 1257 return VMSetError(pVM, rc, RT_SRC_POS, "%s", pErrInfo->pszMsg); 1245 1258 return rc; 1259 } 1246 1260 1247 1261 /* … … 1250 1264 */ 1251 1265 PCFGMNODE pCfgCpum = CFGMR3GetChild(CFGMR3GetRoot(pVM), "CPUM/"); 1266 1252 1267 hv_vm_config_t hVmCfg = NULL; 1253 1254 1268 if ( hv_vm_config_create 1255 1269 && hv_vm_config_get_el2_supported) … … 1274 1288 if (hrc != HV_SUCCESS) 1275 1289 return VMSetError(pVM, VERR_CPUM_INVALID_HWVIRT_CONFIG, RT_SRC_POS, 1276 "Cannot enable nested virtualization (hrc=%#x)!\n", hrc); 1277 else 1278 { 1279 pVM->nem.s.fEl2Enabled = true; 1280 LogRel(("NEM: Enabled nested virtualization (EL2) support\n")); 1281 } 1290 "Cannot enable nested virtualization: hrc=%#x %s!\n", hrc, nemR3DarwinHvStatusName(hrc)); 1291 pVM->nem.s.fEl2Enabled = true; 1292 LogRel(("NEM: Enabled nested virtualization (EL2) support\n")); 1282 1293 } 1283 1294 } … … 1311 1322 Log(("NEM: Marked active!\n")); 1312 1323 PGMR3EnableNemMode(pVM); 1313 }1314 else1315 rc = RTErrInfoSetF(pErrInfo, VERR_NEM_INIT_FAILED, 1316 "hv_vm_create() failed: %#x", hrc);1324 return VINF_SUCCESS; 1325 } 1326 1327 rc = RTErrInfoSetF(pErrInfo, VERR_NEM_INIT_FAILED, "hv_vm_create() failed: %#x %s", hrc, nemR3DarwinHvStatusName(hrc)); 1317 1328 1318 1329 /*
Note:
See TracChangeset
for help on using the changeset viewer.