acrn-hypervisor/hypervisor/boot/guest
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
..
deprivilege_boot.c HV: init and sanitize acrn multiboot info 2020-02-26 09:24:16 +08:00
direct_boot.c hv: Reserve space for VMs' EPT 4k pages after boot 2020-04-01 21:13:37 +08:00
vboot_info.c HV: init and sanitize acrn multiboot info 2020-02-26 09:24:16 +08:00
vboot_wrapper.c hv: a few fixes for multiboot2 boot 2020-03-24 08:44:20 +08:00