acrn-hypervisor/hypervisor/arch/x86/guest
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
..
assign.c hv: ptirq: Shouldn't change sid if intx irq mapping was added 2021-01-12 15:23:44 +08:00
ept.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
guest_memory.c hv: Add split-lock emulation for xchg 2020-12-31 11:12:33 +08:00
hyperv.c hv: rename the ACRN_DBG_XXX 2020-01-14 10:21:23 +08:00
instr_emul.c hv: Add split-lock emulation for xchg 2020-12-31 11:12:33 +08:00
pm.c hv: pm: avoid duplicate shutdowns on RTVM 2020-11-11 14:05:39 +08:00
splitlock.c hv: remove bitmap_clear_lock of split-lock after completing emulation 2021-01-13 15:32:27 +08:00
trusty.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
ucode.c remove spin lock for micro code update 2020-06-19 16:13:20 +08:00
vcpu.c hv: keylocker: Support keylocker backup MSRs for Guest VM 2021-02-03 13:54:45 +08:00
vcpuid.c hv: keylocker: Simulate CPUID of keylocker caps for guest VM 2021-02-03 13:54:45 +08:00
ve820.c hv: remove the hardcoding of Software SRAM GPA base 2021-01-30 13:41:02 +08:00
virq.c hv: move split-lock logic into dedicated file 2021-01-08 17:37:20 +08:00
virtual_cr.c hv: keylocker: host keylocker iwkey context switch 2021-02-03 13:54:45 +08:00
vlapic_priv.h hv: add ops to vlapic structure 2019-07-19 16:47:06 +08:00
vlapic.c hv: refine code style 2020-11-26 12:56:28 +08:00
vm_reset.c hv: pm: avoid duplicate shutdowns on RTVM 2020-11-11 14:05:39 +08:00
vm.c hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
vmcall.c hv: rename hypercall for hv-emulated device management 2020-12-07 16:25:17 +08:00
vmcs.c hv: keylocker: Support Key Locker feature for guest VM 2021-02-03 13:54:45 +08:00
vmexit.c hv: keylocker: host keylocker iwkey context switch 2021-02-03 13:54:45 +08:00
vmsr.c hv: keylocker: Support keylocker backup MSRs for Guest VM 2021-02-03 13:54:45 +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