HV: Combine the acpi loading fucntion to one place

Remove the acpi loading function from elf_loader, rawimage_loaer and
bzimage_loader, and call it together in vm_sw_loader.

Now the vm_sw_loader's job is not just loading sw, so we rename it to
prepare_os_image.

Tracked-On: #6323

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zhou, Wu
2021-08-10 16:24:49 +08:00
committed by wenlingz
parent e78aacbe55
commit 53f6720d13
5 changed files with 7 additions and 12 deletions

View File

@@ -13,7 +13,6 @@
static void load_rawimage(struct acrn_vm *vm)
{
struct sw_kernel_info *sw_kernel = &(vm->sw.kernel_info);
struct sw_module_info *acpi_info = &(vm->sw.acpi_info);
const struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);
uint64_t kernel_load_gpa;
@@ -23,9 +22,6 @@ static void load_rawimage(struct acrn_vm *vm)
/* Copy the guest kernel image to its run-time location */
(void)copy_to_gpa(vm, sw_kernel->kernel_src_addr, kernel_load_gpa, sw_kernel->kernel_size);
/* Copy Guest OS ACPI to its load location */
load_sw_module(vm, acpi_info);
sw_kernel->kernel_entry_addr = (void *)vm_config->os_config.kernel_entry_addr;
}