mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
HV cleanup: assert on vm setup cpu px
Make assert on max px cnt of boot cpu data, since it shouldn't happen if px data is properly initialized in boot process. Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
parent
aec17eed36
commit
c56ea12f09
@ -70,11 +70,10 @@ static void vm_setup_cpu_px(struct vm *vm)
|
||||
return;
|
||||
}
|
||||
|
||||
if (boot_cpu_data.state_info.px_cnt > MAX_PSTATE) {
|
||||
vm->pm.px_cnt = MAX_PSTATE;
|
||||
} else {
|
||||
vm->pm.px_cnt = boot_cpu_data.state_info.px_cnt;
|
||||
}
|
||||
ASSERT ((boot_cpu_data.state_info.px_cnt <= MAX_PSTATE),
|
||||
"failed to setup cpu px");
|
||||
|
||||
vm->pm.px_cnt = boot_cpu_data.state_info.px_cnt;
|
||||
|
||||
px_data_size = vm->pm.px_cnt * sizeof(struct cpu_px_data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user