Add error message for CPUs without EPT, fixes #18

This commit is contained in:
Sebastian Boehm 2015-06-13 18:49:31 +02:00
parent 67d5ad8ee7
commit 404a5274cd

View file

@ -464,10 +464,15 @@ vmx_cleanup(void)
static int
vmx_init(void)
{
int error;
if (hv_vm_create(HV_VM_DEFAULT)) {
xhyve_abort("hv_vm_create failed\n");
int error = hv_vm_create(HV_VM_DEFAULT);
if (error) {
if (error == HV_NO_DEVICE) {
printf("vmx_init: processor not supported by "
"Hypervisor.framework\n");
return (error);
}
else
xhyve_abort("hv_vm_create failed\n");
}
/* Check support for primary processor-based VM-execution controls */