Changeset 107922 in vbox
- Timestamp:
- Jan 23, 2025 4:23:40 PM (2 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp
r107801 r107922 520 520 521 521 522 /** Puts a name to a hypervisor framework status code. */ 523 static const char *nemR3DarwinHvStatusName(hv_return_t hrc) 524 { 525 switch (hrc) 526 { 527 RT_CASE_RET_STR(HV_SUCCESS); 528 RT_CASE_RET_STR(HV_ERROR); 529 RT_CASE_RET_STR(HV_BUSY); 530 RT_CASE_RET_STR(HV_BAD_ARGUMENT); 531 #ifdef HV_ILLEGAL_GUEST_STATE 532 RT_CASE_RET_STR(HV_ILLEGAL_GUEST_STATE); 533 #endif 534 RT_CASE_RET_STR(HV_NO_RESOURCES); 535 RT_CASE_RET_STR(HV_NO_DEVICE); 536 #ifdef HV_DENIED 537 RT_CASE_RET_STR(HV_DENIED); 538 #endif 539 RT_CASE_RET_STR(HV_UNSUPPORTED); 540 } 541 return ""; 542 } 543 544 522 545 /** 523 546 * Unmaps the given guest physical address range (page aligned). … … 554 577 555 578 STAM_REL_COUNTER_INC(&pVM->nem.s.StatUnmapPageFailed); 556 LogRel(("nemR3DarwinUnmap(%RGp): failed! hrc=%#x\n", 557 GCPhys, hrc)); 579 LogRel(("nemR3DarwinUnmap(%RGp): failed! hrc=%#x (%s)\n", GCPhys, hrc, nemR3DarwinHvStatusName(hrc))); 558 580 return VERR_NEM_IPE_6; 559 581 } … … 3071 3093 } 3072 3094 else 3073 LogRel(("NEM: Failed to create ASID for VM (hrc=%#x), continuing...\n", pVM->nem.s.uVmAsid)); 3095 LogRel(("NEM: Failed to create ASID for VM (hrc=%#x / %s), continuing...\n", 3096 hrc, nemR3DarwinHvStatusName(hrc))); 3074 3097 } 3075 3098 pVM->nem.s.fCreatedVm = true; … … 3102 3125 else 3103 3126 rc = RTErrInfoSetF(pErrInfo, VERR_NEM_INIT_FAILED, 3104 "hv_vm_create() failed: %#x ", hrc);3127 "hv_vm_create() failed: %#x (%s)", hrc, nemR3DarwinHvStatusName(hrc)); 3105 3128 } 3106 3129 … … 3138 3161 if (hrc != HV_SUCCESS) 3139 3162 return VMSetError(pVM, VERR_NEM_VM_CREATE_FAILED, RT_SRC_POS, 3140 "Call to hv_vcpu_create failed on vCPU %u: %#x (%Rrc)", idCpu, hrc, nemR3DarwinHvSts2Rc(hrc)); 3163 "Call to hv_vcpu_create failed on vCPU %u: %#x (%s / %Rrc)", 3164 idCpu, hrc, nemR3DarwinHvStatusName(hrc), nemR3DarwinHvSts2Rc(hrc)); 3141 3165 3142 3166 if (idCpu == 0) … … 3369 3393 hv_return_t hrc = hv_vm_destroy(); 3370 3394 if (hrc != HV_SUCCESS) 3371 LogRel(("NEM: hv_vm_destroy() failed with %#x \n", hrc));3395 LogRel(("NEM: hv_vm_destroy() failed with %#x (%s)\n", hrc, nemR3DarwinHvStatusName(hrc))); 3372 3396 3373 3397 pVM->nem.s.fCreatedVm = false; … … 3837 3861 else 3838 3862 { 3839 AssertLogRelMsgFailedReturn(("hv_vcpu_run()) failed for CPU #%u: %#x %u\n",3840 pVCpu->idCpu, hrc, vmxHCCheckGuestState(pVCpu, &pVCpu->nem.s.VmcsInfo)),3863 AssertLogRelMsgFailedReturn(("hv_vcpu_run()) failed for CPU #%u: %#x (%s) %u\n", pVCpu->idCpu, hrc, 3864 nemR3DarwinHvStatusName(hrc), vmxHCCheckGuestState(pVCpu, &pVCpu->nem.s.VmcsInfo)), 3841 3865 VERR_NEM_IPE_0); 3842 3866 } … … 4066 4090 else 4067 4091 { 4068 AssertLogRelMsgFailedReturn(("hv_vcpu_run()) failed for CPU #%u: %#x %u\n",4069 pVCpu->idCpu, hrc, vmxHCCheckGuestState(pVCpu, &pVCpu->nem.s.VmcsInfo)),4092 AssertLogRelMsgFailedReturn(("hv_vcpu_run()) failed for CPU #%u: %#x (%s) %u\n", pVCpu->idCpu, hrc, 4093 nemR3DarwinHvStatusName(hrc), vmxHCCheckGuestState(pVCpu, &pVCpu->nem.s.VmcsInfo)), 4070 4094 VERR_NEM_IPE_0); 4071 4095 } … … 4213 4237 hv_return_t hrc = hv_vcpu_interrupt(&pVCpu->nem.s.hVCpuId, 1); 4214 4238 if (hrc != HV_SUCCESS) 4215 LogRel(("NEM: hv_vcpu_interrupt(%u, 1) failed with %#x \n", pVCpu->nem.s.hVCpuId, hrc));4239 LogRel(("NEM: hv_vcpu_interrupt(%u, 1) failed with %#x (%s)\n", pVCpu->nem.s.hVCpuId, hrc, nemR3DarwinHvStatusName(hrc))); 4216 4240 } 4217 4241
Note:
See TracChangeset
for help on using the changeset viewer.