mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv:Replace dynamic memory with static for vm
-- Replace dynamic memory allocation with static memory -- Remove the parameter check if the vm is NULL Tracked-On: #861 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -19,7 +19,6 @@ static void fire_vhm_interrupt(void)
|
||||
struct vcpu *vcpu;
|
||||
|
||||
vm0 = get_vm_from_vmid(0U);
|
||||
ASSERT(vm0 != NULL, "VM Pointer is NULL");
|
||||
|
||||
vcpu = vcpu_from_vid(vm0, 0U);
|
||||
ASSERT(vcpu != NULL, "vcpu_from_vid failed");
|
||||
|
@@ -115,6 +115,9 @@ int load_guest(struct vm *vm, struct vcpu *vcpu)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* @pre vm != NULL
|
||||
*/
|
||||
int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
@@ -125,8 +128,6 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
|
||||
struct sw_linux *sw_linux = &(vm->sw.linux_info);
|
||||
struct sw_kernel_info *sw_kernel = &(vm->sw.kernel_info);
|
||||
|
||||
ASSERT(vm != NULL, "Incorrect argument");
|
||||
|
||||
pr_dbg("Loading guest to run-time location");
|
||||
|
||||
/* ACRN in partiton mode boots all VMs without devicemodel */
|
||||
|
Reference in New Issue
Block a user