Skip to content

Commit d201905

Browse files
committed
vmx: Improve hv_vm_create() error handling
hv_vm_create() returns a generic HV_ERROR. Add a case for it. While at it, also print the error value in hex as this is how they are defined in hv_error.h. Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
1 parent fd0675c commit d201905

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/vmm/intel/vmx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,12 @@ vmx_init(void)
491491
case HV_UNSUPPORTED:
492492
/* Don't know if this can happen, report to us */
493493
xhyve_abort("hv_vm_create HV_UNSUPPORTED\n");
494+
case HV_ERROR:
495+
/* An unspecified error happened */
496+
xhyve_abort("hv_vm_create HV_ERROR (unspecified error)\n");
494497
default:
495498
/* Should never happen, report to Apple */
496-
xhyve_abort("hv_vm_create unknown error %d\n", error);
499+
xhyve_abort("hv_vm_create unknown error %#010x\n", error);
497500
}
498501

499502
/*

0 commit comments

Comments
 (0)