acrn-hypervisor/hypervisor/boot
Sainath Grandhi 8ffe6fc67a hv: Reserve space for VMs' EPT 4k pages after boot
As ACRN prepares to support servers with large amounts of memory
current logic to allocate space for 4K pages of EPT at compile time
will increase the size of .bss section of ACRN binary.

Bootloaders could run into a situation where they cannot
find enough contiguous space to load ACRN binary under 4GB,
which is typically heavily fragmented with E820 types Reserved,
ACPI data, 32-bit PCI hole etc.

This patch does the following
1) Works only for "direct" mode of vboot
2) reserves space for 4K pages of EPT, after boot by parsing
platform E820 table, for all types of VMs.

Size comparison:

w/o patch
Size of DRAM            Size of .bss
48 GB                   0xe1bbc98 (~226 MB)
128 GB                  0x222abc98 (~548 MB)

w/ patch
Size of DRAM            Size of .bss
48 GB                   0x1991c98 (~26 MB)
128 GB                  0x1a81c98 (~28 MB)

Tracked-On: #4563
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 21:13:37 +08:00
..
guest hv: Reserve space for VMs' EPT 4k pages after boot 2020-04-01 21:13:37 +08:00
include HV: Changed enum to marco to pass MISRA-C check 2020-04-01 10:43:54 +08:00
acpi_base.c hv: Handle holes in GSI i.e. Global System Interrupt for multiple IO-APICs 2020-03-25 09:36:18 +08:00
cmdline.c HV: init and sanitize acrn multiboot info 2020-02-26 09:24:16 +08:00
multiboot.c hv: a few fixes for multiboot2 boot 2020-03-24 08:44:20 +08:00
multiboot2.c HV: init efi info with multiboot2 2020-02-26 09:24:16 +08:00
reloc.c hv: fixup relocation delta for symbols belong to entry section 2020-03-06 08:27:46 +08:00