[PATCH v2 1/3] qemu: Add capability for PCI high memory MMIO size

Matthew R. Ochs via Devel posted 3 patches 3 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 1/3] qemu: Add capability for PCI high memory MMIO size
Posted by Matthew R. Ochs via Devel 3 months, 3 weeks ago
Add QEMU capability for PCI high memory MMIO size configuration:
- Add QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE capability
- Add capability to virt machine properties
- Add highmem-mmio-size virt machine property to aarch64 qemu
      10.0.0 capabilities

This allows detecting support for the highmem-mmio-size virt machine
property in QEMU.

Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
---
 src/qemu/qemu_capabilities.c                       | 2 ++
 src/qemu/qemu_capabilities.h                       | 1 +
 tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml | 1 +
 3 files changed, 4 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c24584bf75fd..b600dd38b8fc 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -732,6 +732,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
 
               /* 475 */
               "virtio-scsi.iothread-mapping", /* QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING */
+              "machine.virt.highmem-mmio-size", /* QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE */
     );
 
 
@@ -1771,6 +1772,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsVirt[] = {
     { "iommu", QEMU_CAPS_MACHINE_VIRT_IOMMU },
     { "ras", QEMU_CAPS_MACHINE_VIRT_RAS },
     { "aia", QEMU_CAPS_MACHINE_VIRT_AIA },
+    { "highmem-mmio-size", QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGeneric[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 40aa7acef42e..df33212a348a 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -713,6 +713,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
 
     /* 475 */
     QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING, /* virtio-scsi supports per-virtqueue iothread mapping */
+    QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE, /* -machine virt,highmem-mmio-size=<size> */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
index e14e926c290d..7fd50185575a 100644
--- a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
@@ -160,6 +160,7 @@
   <flag name='blockdev-set-active'/>
   <flag name='shim'/>
   <flag name='virtio-scsi.iothread-mapping'/>
+  <flag name='machine.virt.highmem-mmio-size'/>
   <version>10000000</version>
   <microcodeVersion>61700285</microcodeVersion>
   <package>v10.0.0</package>
-- 
2.46.0
Re: [PATCH v2 1/3] qemu: Add capability for PCI high memory MMIO size
Posted by Daniel P. Berrangé via Devel 3 months, 3 weeks ago
On Wed, May 14, 2025 at 05:18:45PM -0700, Matthew R. Ochs wrote:
> Add QEMU capability for PCI high memory MMIO size configuration:
> - Add QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE capability
> - Add capability to virt machine properties
> - Add highmem-mmio-size virt machine property to aarch64 qemu
>       10.0.0 capabilities
> 
> This allows detecting support for the highmem-mmio-size virt machine
> property in QEMU.
> 
> Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
> ---
>  src/qemu/qemu_capabilities.c                       | 2 ++
>  src/qemu/qemu_capabilities.h                       | 1 +
>  tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml | 1 +
>  3 files changed, 4 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|