acrn-hypervisor/hypervisor/arch/x86/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
..
assign.c hv: extend union dmar_ir_entry to support VT-d posted interrupts 2020-03-31 10:30:30 +08:00
ept.c hv: rename the ACRN_DBG_XXX 2020-01-14 10:21:23 +08:00
guest_memory.c hv: move error message logging into gpa copy APIs 2020-03-30 13:19:01 +08:00
hyperv.c hv: rename the ACRN_DBG_XXX 2020-01-14 10:21:23 +08:00
instr_emul.c hv: instr_emul: use cs segment when fetching instructions 2019-11-11 13:55:24 +08:00
pm.c hv:Rename two VM states 2020-03-13 10:34:29 +08:00
trusty.c hv: support xsave in context switch 2019-12-02 09:31:12 +08:00
ucode.c hv: cpuid: remove cpuid() 2020-03-25 13:26:58 +08:00
vcpu.c hv: list: rename list_entry to container_of 2020-03-31 10:57:47 +08:00
vcpuid.c hv: cpuid: remove cpuid() 2020-03-25 13:26:58 +08:00
ve820.c HV: move create_sos_vm_e820 to ve820.c 2020-03-12 14:56:34 +08:00
virq.c hv: rename BOOT_CPU_ID to BSP_CPU_ID 2020-02-25 09:08:14 +08:00
virtual_cr.c hv: cr: handle control registers related to PCID 2020-01-02 10:47:34 +08:00
vlapic_priv.h hv: add ops to vlapic structure 2019-07-19 16:47:06 +08:00
vlapic.c hv: vlapic: minor fix about dereference vcpu from vlapic 2020-03-31 15:59:52 +08:00
vm_reset.c hv:Rename two VM states 2020-03-13 10:34:29 +08:00
vm.c hv: Reserve space for VMs' EPT 4k pages after boot 2020-04-01 21:13:37 +08:00
vmcall.c hv: vPCI: remove passthrough PCI device unuse code 2020-02-24 16:17:38 +08:00
vmcs.c hv: move pi_desc related code from vlapic.h/vlapic.c to vmx.h/vmx.c/vcpu.h 2020-03-31 10:30:30 +08:00
vmexit.c hv: HLT emulation in hypervisor 2020-01-07 11:23:32 +08:00
vmsr.c HV: Add both HW and SW checks for RDT support 2020-02-27 10:44:07 +08:00
vmtrr.c hv: vmtrr: remove vcpu structure pointer from vmtrr 2020-03-31 10:57:47 +08:00
vmx_asm.S hv:remove some unnecessary includes 2019-05-07 09:10:13 +08:00
vmx_io.c hv: rename BOOT_CPU_ID to BSP_CPU_ID 2020-02-25 09:08:14 +08:00