Merge pull request #22 from sometimesfood/ept-error-message
Add error message for CPUs without EPT, fixes #18
This commit is contained in:
commit
835d814b2d
2 changed files with 10 additions and 4 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build/
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue