hv:Check if VMX capability is locked with incorrect value

Check if the VMX capability is locked with incorrect value,
at the time when HV do the hardware capability detect.

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Mingqiang Chi
2018-09-05 13:57:15 +08:00
committed by lijinxia
parent 65930809ee
commit e4e38e1bfb
3 changed files with 22 additions and 8 deletions

View File

@@ -252,6 +252,11 @@ static int hardware_detect_support(void)
return -ENODEV;
}
if (is_vmx_disabled()) {
pr_fatal("%s, VMX can not be enabled\n", __func__);
return -ENODEV;
}
ret = check_vmx_mmu_cap();
if (ret != 0) {
return ret;