HV: decouple prelaunch VM ve820 from board configs

hypervisor/arch/x86/configs/$(BOARD)/ve820.c is used to store pre-launched
VM specific e820 entries according to memory configuration of customer.
It should be a scenario based configurations but we had to put it in per
board foler because of different board memory settings. This brings concerns
to customer on configuration orgnization.

Currently the file provides same e820 layout for all pre-launched VMs, but
they should have different e820 when their memory are configured differently.
Although we have acrn-config tool to generate ve802.c automatically, it
is not friendly to modify hardcoded ve820 layout manually, so the patch
changes the entries initialization method by calculating each entry item
in C code.

Tracked-On: #4458

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2020-02-27 15:48:42 +08:00
committed by wenlingz
parent 4c0965d89e
commit d7eac3fe6a
3 changed files with 107 additions and 2 deletions

View File

@@ -270,6 +270,7 @@ VP_BASE_C_SRCS += arch/x86/guest/virq.c
VP_BASE_C_SRCS += arch/x86/guest/virtual_cr.c
VP_BASE_C_SRCS += arch/x86/guest/vmexit.c
VP_BASE_C_SRCS += arch/x86/guest/ept.c
VP_BASE_C_SRCS += arch/x86/guest/ve820.c
VP_BASE_C_SRCS += arch/x86/guest/ucode.c
ifeq ($(CONFIG_HYPERV_ENABLED),y)
VP_BASE_C_SRCS += arch/x86/guest/hyperv.c
@@ -279,7 +280,6 @@ 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
VP_BASE_C_SRCS += arch/x86/configs/vacpi.c
VP_BASE_C_SRCS += arch/x86/configs/$(CONFIG_BOARD)/ve820.c
# virtual platform device model
VP_DM_C_SRCS += dm/vpic.c