mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
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:
committed by
ACRN System Integration
parent
f4e976ab38
commit
50e09c41b4
@@ -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 */
|
||||
|
Reference in New Issue
Block a user