Skip to content

Commit e0eeb8a

Browse files
yakuizhaolijinxia
authored andcommitted
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>
1 parent d5d3d2d commit e0eeb8a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hypervisor/arch/x86/cpu.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ static int hardware_detect_support(void)
243243
return -ENODEV;
244244
}
245245

246+
if (boot_cpu_data.cpuid_level < 0x15U) {
247+
pr_fatal("%s, required CPU feature not supported\n", __func__);
248+
return -ENODEV;
249+
}
250+
246251
ret = check_vmx_mmu_cap();
247252
if (ret != 0) {
248253
return ret;

0 commit comments

Comments
 (0)