hv:cleanup vcpu_id compare with phys_cpu_num

Currently we compare vcpu_id with phys_cpu_num,
vcpu_id is not related with phys_cpu_num,
this patch cleanup them.

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:
Mingqiang Chi
2018-10-24 12:03:57 +08:00
committed by Xie, Nanlin
parent 3eb45b9bf6
commit 4afb6666b9
3 changed files with 6 additions and 12 deletions

View File

@@ -406,7 +406,7 @@ int prepare_vm0(void)
}
/* Allocate all cpus to vm0 at the beginning */
for (i = 0U; i < phys_cpu_num; i++) {
for (i = 0U; i < vm0_desc.vm_hw_num_cores; i++) {
err = prepare_vcpu(vm, i);
if (err != 0) {
return err;