acrn-hypervisor/hypervisor/include/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: don't need to save boot context 2020-10-29 10:05:05 +08:00
guest hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
lib hv: Add a helper to account bitmap weight 2019-09-24 11:58:45 +08:00
apicreg.h hv: Fix incorrect struct definition for ir_bits 2021-02-25 09:34:49 +08:00
board.h acrn-config: code refactoring for CAT/MBA 2020-08-28 16:44:06 +08:00
cpu_caps.h hv: Add split-lock emulation for LOCK prefix instruction 2020-12-31 11:12:33 +08:00
cpu.h hv: keylocker: host keylocker iwkey context switch 2021-02-03 13:54:45 +08:00
cpufeatures.h hv: keylocker: Support Key Locker feature for guest VM 2021-02-03 13:54:45 +08:00
cpuid.h hv: keylocker: Simulate CPUID of keylocker caps for guest VM 2021-02-03 13:54:45 +08:00
default_acpi_info.h hv: emulate ACPI reset register for Service OS guest 2019-05-15 11:20:12 +08:00
e820.h hv: Reserve space for VMs' EPT 4k pages after boot 2020-04-01 21:13:37 +08:00
gdt.h hv: coding style: remove no real declaration for external variable 2018-12-20 20:20:08 +08:00
host_pm.h pm: S5: update the system shutdown logical in ACRN 2019-12-23 15:15:09 +08:00
idt.h hv: irq: minor refine about structure idt_64_descriptor 2020-04-26 10:48:49 +08:00
init.h HV: Add prefix 'p' before 'cpu' to physical cpu related functions 2019-04-24 10:50:28 +08:00
io.h remove dead code in io.h 2020-06-19 16:13:20 +08:00
ioapic.h hv: vioapic init for SOS VM on platforms with multiple IO-APICs 2020-03-25 09:36:18 +08:00
irq.h hv: Add split-lock emulation for LOCK prefix instruction 2020-12-31 11:12:33 +08:00
lapic.h HV: Fix MP Init sequence hang by adding a delay 2020-05-27 13:34:59 +08:00
mmu.h hv: mmu: rename hv_access_memory_region_update to ppt_clear_user_bit 2020-11-02 10:29:43 +08:00
msr.h hv: keylocker: Support keylocker backup MSRs for Guest VM 2021-02-03 13:54:45 +08:00
page.h hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
pci_dev.h hv: pci: check whether a PCI device is host bridge or not by class 2020-06-03 22:00:43 +08:00
per_cpu.h hv: keylocker: host keylocker iwkey context switch 2021-02-03 13:54:45 +08:00
pgtable.h hv: iommu: remove snoop related code 2020-04-16 08:40:17 +08:00
platform_caps.h hv: add function to check if using posted interrupt is possible for vm 2020-04-15 13:47:22 +08:00
rdt.h HV: RDT: add CDP support in ACRN 2020-05-08 08:50:13 +08:00
rtcm.h hv: cleanup legacy terminologies in RTCM module 2021-01-28 11:29:25 +08:00
rtct.h hv: unmap software region of pre-RTVM from Service VM EPT 2021-02-25 09:35:31 +08:00
security.h hv: keylocker: Support Key Locker feature for guest VM 2021-02-03 13:54:45 +08:00
seed.h HV: rename append_seed_arg to fill_seed_arg 2020-06-08 13:30:04 +08:00
sgx.h hv: sgx: add basic support to init sgx resource for vm 2019-05-29 11:24:13 +08:00
timer.h hv: vpci: revert do FLR and BAR restore 2019-12-30 13:43:07 +08:00
trampoline.h hv:Move severl variable declaration for boot code 2019-01-25 21:32:21 +08:00
vm_config.h hv: modularization: cleanup boot.h 2021-01-27 15:59:47 +08:00
vmx.h hv: keylocker: Support Key Locker feature for guest VM 2021-02-03 13:54:45 +08:00
vtd.h hv: vtd: add an API to reserve continuous irtes 2020-06-16 08:52:56 +08:00
zeropage.h hv: modularization: avoid dependency of multiboot on zeropage.h. 2021-01-27 15:59:47 +08:00