mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 04:33:55 +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:
parent
638d7141d2
commit
04b4c9110c
@ -563,7 +563,7 @@ static void bsp_boot_post(void)
|
|||||||
|
|
||||||
exec_vmxon_instr(BOOT_CPU_ID);
|
exec_vmxon_instr(BOOT_CPU_ID);
|
||||||
|
|
||||||
prepare_vm0();
|
prepare_vm(BOOT_CPU_ID);
|
||||||
|
|
||||||
default_idle();
|
default_idle();
|
||||||
|
|
||||||
|
@ -437,6 +437,18 @@ int prepare_vm0(void)
|
|||||||
return err;
|
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
|
#ifdef CONFIG_VM0_DESC
|
||||||
static inline bool vcpu_in_vm_desc(struct vcpu *vcpu,
|
static inline bool vcpu_in_vm_desc(struct vcpu *vcpu,
|
||||||
struct vm_description *vm_desc)
|
struct vm_description *vm_desc)
|
||||||
|
@ -181,7 +181,7 @@ void resume_vm_from_s3(struct vm *vm, uint32_t wakeup_vec);
|
|||||||
int start_vm(struct vm *vm);
|
int start_vm(struct vm *vm);
|
||||||
int reset_vm(struct vm *vm);
|
int reset_vm(struct vm *vm);
|
||||||
int create_vm(struct vm_description *vm_desc, struct vm **rtn_vm);
|
int create_vm(struct vm_description *vm_desc, struct vm **rtn_vm);
|
||||||
int prepare_vm0(void);
|
int prepare_vm(uint16_t pcpu_id);
|
||||||
#ifdef CONFIG_VM0_DESC
|
#ifdef CONFIG_VM0_DESC
|
||||||
void vm_fixup(struct vm *vm);
|
void vm_fixup(struct vm *vm);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user