Merge pull request #22 from sometimesfood/ept-error-message

Add error message for CPUs without EPT, fixes #18
This commit is contained in:
Michael Steil 2015-06-13 10:55:22 -07:00
commit 835d814b2d
2 changed files with 10 additions and 4 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build/

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 */