dragonball: add vcpu_boot_onlined vector

This commit implements the vcpu_boot_onlined vector in get_fdt_vm_info.

"boot_enabled" means whether this vcpu should be onlined at first boot.
It will be used by fdt, which write an attribute called boot_enabled,
and will be handled by guest kernel to pass the correct cpu number to
function "bringup_nonboot_cpus".

Fixes: #6010

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
This commit is contained in:
xuejun-xj 2023-05-10 10:17:06 +08:00
parent e31772cfea
commit 560442e6ed

View File

@ -117,7 +117,9 @@ impl Vm {
.into_iter()
.map(|cpu| cpu.get_mpidr())
.collect();
let vcpu_boot_onlined = vec![];
let vm_config = self.vm_config();
let mut vcpu_boot_onlined = vec![1; vm_config.vcpu_count as usize];
vcpu_boot_onlined.resize(vm_config.max_vcpu_count as usize, 0);
let vpmu_feature = vcpu_manager.vpmu_feature();
// This configuration is used for passing cache information into guest.
// TODO: dragonball-sandbox #274; kata-containers #6969