mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-03 12:49:45 +00:00
Add methods allocates the mmio bar base to console vuart, communication vuarts, inter-vm shared memory and passthrough pci devices. For SOS: - get low mem by parsing board xml. - get high mem by parsing board xml, if the high mem is not enabled, the high mem start address would be ~0UL and the end address is 0UL - get the occupied mmio windows by parsing board.xml - for each console vuart, communication vuart and inter-vm shared memory devices, assign unused mmio windows to them - all the assigned mmio windows must be unique and should not overlay with any devices' mmio window - the passthrough devices mmio windows can be reused in SOS vm - each allocated mmio start address must be 4k alignment if the length of bar is smaller than 4k - each allocated mmio start address must be aligned with the bar length if its length is greater than 4k - the 32bits bar will fall in low mem range only - 64bits bar will look for free mmio in low mem rage first, if the high mem is enabled, the 64bits bar will look for free mmio in high mem range if there is not enough space in low mem range - allocator raises an error if there is not enough mmio space For pre-launched VM: - the high mem range is [256G, 512G) - the low mem range is [2G, 3.5G) - there is no used mmio window initially - for each console vuart, communication vuart, inter-vm shared memory devices and passthrough devices, assign unused mmio windows to them - all the assigned mmio windows must be unique and should not overlay with any devices' mmio window - the 32bits bar will fall in low mem range only - 64bits bar will look for free mmio in low mem rage first and then look for free mmio in high mem range if there is not enough space in low mem range - each allocated mmio start address must be 4k alignment if the length of bar is smaller than 4k - each allocated mmio start address must be aligned with the bar length if its lenght is greater than 4k - allocator raises an error if there is not enough mmio space Tracked-On: #6024 Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com> |
||
---|---|---|
.. | ||
lib | ||
cpu_affinity.py | ||
gpa.py | ||
hv_ram.py | ||
intx.py | ||
main.py | ||
pio.py |