acrn-hypervisor/hypervisor/dm
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
..
vpci hv: page: use dynamic page allocation for pagetable mapping 2021-03-01 13:10:04 +08:00
io_req.c hv: change log level for find_match_mmio_node 2020-08-19 15:06:15 +08:00
mmio_dev.c hv: mmio_dev: add hypercall to support mmio device pass through 2020-07-23 20:13:20 +08:00
vgpio.c hv: mmu: rename hv_access_memory_region_update to ppt_clear_user_bit 2020-11-02 10:29:43 +08:00
vioapic.c hv: add vgpio device model support 2020-09-07 14:52:02 +08:00
vpic.c hv[v2]: Remove deprecated term in vPIC submodule 2020-09-01 09:30:08 +08:00
vrtc.c hv: remove 'flags' field in struct vm_io_range 2019-08-19 10:19:54 +08:00
vuart.c HV: vuart: send msi for pci vuart type 2020-10-30 20:41:34 +08:00