mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 04:09:11 +00:00
hv: Adding a wrapper on top of prepare_vm0
Added prepare_vm function as a wrapper function on top of prepare_vm0. This makes adding support for partition mode ACRN to boot multiple VMs from HV cleaner. Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
committed by
lijinxia
parent
638d7141d2
commit
04b4c9110c
@@ -563,7 +563,7 @@ static void bsp_boot_post(void)
|
||||
|
||||
exec_vmxon_instr(BOOT_CPU_ID);
|
||||
|
||||
prepare_vm0();
|
||||
prepare_vm(BOOT_CPU_ID);
|
||||
|
||||
default_idle();
|
||||
|
||||
|
@@ -437,6 +437,18 @@ int prepare_vm0(void)
|
||||
return err;
|
||||
}
|
||||
|
||||
int prepare_vm(uint16_t pcpu_id)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
/* prepare vm0 if pcpu_id is BOOT_CPU_ID */
|
||||
if (pcpu_id == BOOT_CPU_ID) {
|
||||
err = prepare_vm0();
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VM0_DESC
|
||||
static inline bool vcpu_in_vm_desc(struct vcpu *vcpu,
|
||||
struct vm_description *vm_desc)
|
||||
|
Reference in New Issue
Block a user