mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-19 01:40:17 +00:00
hv: Check pcpu number in Hw platform detect
if the physical number > CONFIG_MAX_PCPU_NUM, will return error and panic. Tracked-On: #861 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
298044d95b
commit
672583a091
@ -259,6 +259,11 @@ static int hardware_detect_support(void)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (phys_cpu_num > CONFIG_MAX_PCPU_NUM) {
|
||||||
|
pr_fatal("%s, pcpu number(%d) is out of range\n", __func__, phys_cpu_num);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
ret = check_vmx_mmu_cap();
|
ret = check_vmx_mmu_cap();
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user