hw/arm/virt: Support larger highmem MMIO regions
PATCH v6 1/1 hw/arm/virt: Support larger highmem MMIO regions
The MMIO region size required to support virtualized environments with large PCI BAR regions can exceed the hardcoded limit configured in QEMU. For example, a VM with multiple NVIDIA Grace-Hopper GPUs passed through requires more MMIO memory than the amount provided by VIRT_HIGH_PCIE_MMIO (currently 512GB). Instead of updating VIRT_HIGH_PCIE_MMIO, introduce a new parameter, highmem-mmio-size, that specifies the MMIO size required to support the VM configuration.
Example usage with 1TB MMIO region size:
-machine virt,gic-version=3,highmem-mmio-size=1T
---
v6: - Fixed minor coding style nit
v5: - Removed hyphens from power of 2
- Consistently use property name in all error messages
- Use #defines for default high PCIE MMIO size
- Use size_to_str() when printing size values
- Add comment clarifying that highmem-mmio-size will update the corresponding value in extended_memmap
v4: - Added default size to highmem-mmio-size description
v3: - Updated highmem-mmio-size description
v2: - Add unit suffix to example in commit message
- Use existing "high memory region" terminology
- Resolve minor braces nit
docs/system/arm/virt.rst | 4 ++++ hw/arm/virt.c | 52 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-)
docs/system/arm/virt.rst +4 -0
@@ -144,6 +144,10 @@ highmem-mmio Set ``on``/``off`` to enable/disable the high memory region for PCI MMIO. The default is ``on``. +highmem-mmio-size + Set the high memory region size for PCI MMIO. Must be a power of 2 and + greater than or equal to the default size (512G). + gic-version Specify the version of the Generic Interrupt Controller (GIC) to provide. Valid values are:
hw/arm/virt.c +51 -1
88 lines not on this page · raw message
Signature · 1 line
2.46.0
Peter Maydell
AppliedQuoted 12 lines · Matthew R. Ochs
The MMIO region size required to support virtualized environments with large PCI BAR regions can exceed the hardcoded limit configured in QEMU. For example, a VM with multiple NVIDIA Grace-Hopper GPUs passed through requires more MMIO memory than the amount provided by
VIRT_HIGH_PCIE_MMIO(currently 512GB). Instead of updatingVIRT_HIGH_PCIE_MMIO, introduce a new parameter, highmem-mmio-size, that specifies the MMIO size required to support the VM configuration.Example usage with 1TB MMIO region size:
-machine virt,gic-version=3,highmem-mmio-size=1T
Quoted 6 lines
Signed-off-by Matthew R. Ochs <[email protected]>Reviewed-by Gavin Shan <[email protected]>Reviewed-by Shameer Kolothum <[email protected]>Reviewed-by Eric Auger <[email protected]>Reviewed-by Nicolin Chen <[email protected]>---
Applied to target-arm.next, thanks.
-- PMM