HV: vm_load: split vm_load.c to support diff kernel format

The patch splits the vm_load.c to three parts, the loader function of bzImage
kernel is moved to bzimage_loader.c, the loader function of raw image kernel
is moved to rawimage_loader.c, the stub is still stayed in vm_load.c to load
the corresponding kernel loader function. Each loader function could be
isolated by CONFIG_GUEST_KERNEL_XXX macro which generated by config tool.

Tracked-On: #6323

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2021-08-09 16:36:24 +08:00
committed by wenlingz
parent 2524572fb2
commit 9b632c0e4b
5 changed files with 501 additions and 463 deletions

View File

@@ -283,6 +283,12 @@ VP_BASE_C_SRCS += arch/x86/guest/nested.c
VP_BASE_C_SRCS += arch/x86/guest/vept.c
endif
VP_BASE_C_SRCS += boot/guest/vboot_info.c
ifeq ($(CONFIG_GUEST_KERNEL_BZIMAGE),y)
VP_BASE_C_SRCS += boot/guest/bzimage_loader.c
endif
ifeq ($(CONFIG_GUEST_KERNEL_RAWIMAGE),y)
VP_BASE_C_SRCS += boot/guest/rawimage_loader.c
endif
VP_BASE_C_SRCS += common/hv_main.c
VP_BASE_C_SRCS += common/vm_load.c
VP_BASE_C_SRCS += arch/x86/configs/pci_dev.c