acrn-hypervisor/hypervisor/arch/x86
Li Fei1 8d9f12f3b7 hv: page: use dynamic page allocation for pagetable mapping
For FuSa's case, we remove all dynamic memory allocation use in ACRN HV. Instead,
we use static memory allocation or embedded data structure. For pagetable page,
we prefer to use an index (hva for MMU, gpa for EPT) to get a page from a special
page pool. The special page pool should be big enougn for each possible index.
This is not a big problem when we don't support 64 bits MMIO. Without 64 bits MMIO
support, we could use the index to search addrss not larger than DRAM_SIZE + 4G.

However, if ACRN plan to support 64 bits MMIO in SOS, we could not use the static
memory alocation any more. This is because there's a very huge hole between the
top DRAM address and the bottom 64 bits MMIO address. We could not reserve such
many pages for pagetable mapping as the CPU physical address bits may very large.

This patch will use dynamic page allocation for pagetable mapping. We also need
reserve a big enough page pool at first. For HV MMU, we don't use 4K granularity
page table mapping, we need reserve PML4, PDPT and PD pages according the maximum
physical address space (PPT va and pa are identical mapping); For each VM EPT,
we reserve PML4, PDPT and PD pages according to the maximum physical address space
too, (the EPT address sapce can't beyond the physical address space), and we reserve
PT pages by real use cases of DRAM, low MMIO and high MMIO.

Signed-off-by: Li Fei1 <fei1.li@intel.com>
Tracked-On: #5788
2021-03-01 13:10:04 +08:00
..
boot hv: modularization: remove global variable efiloader_sig. 2021-01-27 15:59:47 +08:00
configs HV: deny HV owned PCI bar access from SOS 2021-02-03 14:01:23 +08:00
guest hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
lib HV: rewrite memcpy_s to be iso c11 compliant 2020-06-08 13:30:04 +08:00
seed hv: modularization: change of multiboot API. 2021-01-27 15:59:47 +08:00
cpu_caps.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
cpu_state_tbl.c HV: add board specific cpu state table to support Px Cx 2019-07-29 20:25:16 +08:00
cpu.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
e820.c HV: panic on 0 address when do e820_alloc_memory 2021-02-26 16:38:32 +08:00
gdt.c hv:cleanup header files for arch folder 2019-02-22 13:14:36 +08:00
idt.S HV: Install a NMI handler in acrn IDT 2019-12-13 10:13:09 +08:00
init.c hv: modularization: remove global variable efiloader_sig. 2021-01-27 15:59:47 +08:00
ioapic.c hv: mmu: rename hv_access_memory_region_update to ppt_clear_user_bit 2020-11-02 10:29:43 +08:00
irq.c hv: coding style clean-up related to Boolean 2020-11-28 14:51:32 +08:00
Kconfig hv: cleanup legacy terminologies in RTCM module 2021-01-28 11:29:25 +08:00
lapic.c hv:cpu-caps:refine processor family and model info 2020-08-14 10:08:50 +08:00
mmu.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
notify.c hv: maintain a per-pCPU array of vCPUs and handle posted interrupt IRQs 2020-04-15 13:47:22 +08:00
page.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
pagetable.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
platform_caps.c hv: add function to check if using posted interrupt is possible for vm 2020-04-15 13:47:22 +08:00
pm.c pm: S5: update the system shutdown logical in ACRN 2019-12-23 15:15:09 +08:00
rdt.c hv: coding style clean-up related to Boolean 2020-11-28 14:51:32 +08:00
rtcm.c hv: hypercall: prevent sos can touch hv/pre-launched VM resource 2021-02-02 16:55:40 +08:00
sched.S hv: sched: rename schedule related structs and vars 2019-10-16 10:25:53 +08:00
security.c hv: keylocker: Support Key Locker feature for guest VM 2021-02-03 13:54:45 +08:00
sgx.c hv: sgx: add basic support to init sgx resource for vm 2019-05-29 11:24:13 +08:00
timer.c hv: list: rename list_entry to container_of 2020-03-31 10:57:47 +08:00
trampoline.c hv: modularization: avoid dependency of multiboot on zeropage.h. 2021-01-27 15:59:47 +08:00
vmx.c hv:fix "no prototype for non-static function" 2019-07-09 10:36:03 +08:00
vtd.c hv: mmu: rename hv_access_memory_region_update to ppt_clear_user_bit 2020-11-02 10:29:43 +08:00
wakeup.S hv: pm: correct the function name 2019-09-11 17:30:24 +08:00