hv: check vmx unrestricted guest capability

Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
This commit is contained in:
Binbin Wu
2018-05-22 13:59:06 +08:00
committed by lijinxia
parent 37db817c03
commit 417cff5049
2 changed files with 12 additions and 1 deletions

View File

@@ -211,6 +211,11 @@ static int hardware_detect_support(void)
return -ENODEV;
}
if (!cpu_has_vmx_unrestricted_guest_cap()) {
pr_fatal("%s, unrestricted guest not supported\n", __func__);
return -ENODEV;
}
ret = check_vmx_mmu_cap();
if (ret)
return ret;