HV: Limit the CPUID with >= 0x15 leaf

In order to add the emulation of CPUID 0x16, it is expected that it is
handled when the CPUID 0x15 is supported. Otherwise we will have to emulate
other CPUID leaf, which makes it complex.
At the same time as Acrn HV has the requirements on the CPUs, it is restricted
that the CPUID should support the leaf >=0x15.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zhao Yakui 2018-08-14 10:41:17 +08:00 committed by lijinxia
parent d5d3d2d2a8
commit e0eeb8a558
1 changed files with 5 additions and 0 deletions

View File

@ -243,6 +243,11 @@ static int hardware_detect_support(void)
return -ENODEV;
}
if (boot_cpu_data.cpuid_level < 0x15U) {
pr_fatal("%s, required CPU feature not supported\n", __func__);
return -ENODEV;
}
ret = check_vmx_mmu_cap();
if (ret != 0) {
return ret;