acrn-hypervisor/hypervisor/include/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.h hv: add INTx mapping for pre-launched VMs 2020-09-07 14:52:02 +08:00
ept.h hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
guest_memory.h hv: Add split-lock emulation for xchg 2020-12-31 11:12:33 +08:00
guest_pm.h hv:Wrap some APIs related with guest pm 2019-10-21 10:13:02 +08:00
hyperv.h hv: support reference time enlightenment 2019-10-22 10:09:16 +08:00
instr_emul.h hv: Add split-lock emulation for xchg 2020-12-31 11:12:33 +08:00
splitlock.h hv: move split-lock logic into dedicated file 2021-01-08 17:37:20 +08:00
trusty.h hv: seed: refine header file 2019-03-15 14:09:56 +08:00
ucode.h HV:treewide:rename vcpu data structure 2018-11-05 15:35:49 +08:00
vcpu.h hv: keylocker: Support keylocker backup MSRs for Guest VM 2021-02-03 13:54:45 +08:00
vcpuid.h HV: return extended info in vCPUID leaf 0x40000001 2019-07-31 14:13:39 +08:00
virtual_cr.h hv: refine virtualization flow for cr0 and cr4 2020-12-18 11:21:22 +08:00
vlapic.h hv: refine msi interrupt injection functions 2020-10-26 08:44:13 +08:00
vm_reset.h hv:move some APIs related host reset to pm.c 2019-08-22 14:09:18 +08:00
vm.h hv: memory: remove get_sworld_memory_base API 2021-03-01 13:10:04 +08:00
vmcs.h hv: bugfix for debug commands with smp_call 2019-12-05 11:19:35 +08:00
vmexit.h hv: refine guest.h 2019-02-03 13:00:42 +08:00
vmtrr.h hv: vmtrr: remove vcpu structure pointer from vmtrr 2020-03-31 10:57:47 +08:00
vmx_io.h hv: add support for shutdown for pre-launched VMs 2020-11-04 10:33:31 +08:00