HV: remove cpu_num from vm configurations

The vcpu num could be calculated based on pcpu_bitmap when prepare_vcpu()
is done, so remove this redundant configuration item;

Tracked-On: #3214

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Victor Sun
2019-06-03 00:43:29 +08:00
committed by ACRN System Integration
parent f4e976ab38
commit 50e09c41b4
5 changed files with 5 additions and 11 deletions

View File

@@ -703,10 +703,6 @@ void prepare_vm(uint16_t vm_id, struct acrn_vm_config *vm_config)
err = create_vm(vm_id, vm_config, &vm);
if (err == 0) {
if (is_prelaunched_vm(vm)) {
(void)mptable_build(vm);
}
for (i = 0U; i < get_pcpu_nums(); i++) {
if (bitmap_test(i, &vm_config->pcpu_bitmap)) {
err = prepare_vcpu(vm, i);
@@ -715,10 +711,13 @@ void prepare_vm(uint16_t vm_id, struct acrn_vm_config *vm_config)
}
}
}
}
if (err == 0) {
if (is_prelaunched_vm(vm)) {
(void)mptable_build(vm);
}
(void )vm_sw_loader(vm);
/* start vm BSP automatically */