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:
Victor Sun 2018-04-28 21:22:07 +08:00 committed by Jack Ren
parent 765805da21
commit 55bced400e

View File

@ -70,11 +70,10 @@ static void vm_setup_cpu_px(struct vm *vm)
return; return;
} }
if (boot_cpu_data.state_info.px_cnt > MAX_PSTATE) { ASSERT ((boot_cpu_data.state_info.px_cnt <= MAX_PSTATE),
vm->pm.px_cnt = MAX_PSTATE; "failed to setup cpu px");
} else {
vm->pm.px_cnt = boot_cpu_data.state_info.px_cnt; vm->pm.px_cnt = boot_cpu_data.state_info.px_cnt;
}
px_data_size = vm->pm.px_cnt * sizeof(struct cpu_px_data); px_data_size = vm->pm.px_cnt * sizeof(struct cpu_px_data);