[libvirt PATCH v4 00/16] qemu: Implement virtio-iommu support

Only patch 14/16 is still missing a Reviewed-by. Changes from [v3]: * drop updates to .replies files, which have already been pushed; * update version numbers in documentation. Changes from [v2]: * rebase on top of master; * generate -device argument as JSON. Changes from [v1]: * rebased after Peter's recent changes enabling JSON for -device. [v3] https://listman.redhat.com/archives/libvir-list/2022-March/229397.html [v2] https://listman.redhat.com/archives/libvir-list/2021-October/224302.html [v1] https://listman.redhat.com/archives/libvir-list/2021-October/223977.html Andrea Bolognani (16): conf: Introduce VIR_PCI_CONNECT_INTEGRATED qemu: Tweak some code qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI qemu: Introduce QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS conf: Introduce virtio model for <iommu> tests: Add test cases for virtio-iommu qemu: Validate machine type used with virtio-iommu qemu: Validate capabilities for virtio-iommu qemu: Validate use of ACPI with virtio-iommu conf: Add virDomainDeviceInfo to virDomainIOMMUDef qemu: Assign PCI address to virtio-iommu qemu: Validate address type for virtio-iommu tests: Add test for virtio-iommu address qemu: Generate command line for virtio-iommu docs: Document virtio-iommu news: Document virtio-iommu NEWS.rst | 4 + docs/formatdomain.rst | 5 +- src/conf/domain_addr.c | 17 ++ src/conf/domain_addr.h | 26 +- src/conf/domain_conf.c | 38 ++- src/conf/domain_conf.h | 2 + src/conf/schemas/domaincommon.rng | 64 ++-- src/qemu/qemu_capabilities.c | 10 + src/qemu/qemu_capabilities.h | 2 + src/qemu/qemu_command.c | 30 +- src/qemu/qemu_domain_address.c | 33 ++- src/qemu/qemu_validate.c | 32 ++ .../caps_5.0.0.aarch64.replies | 71 +++-- .../caps_5.0.0.aarch64.xml | 1 + .../caps_5.0.0.ppc64.replies | 59 ++-- .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + .../caps_5.0.0.riscv64.replies | 55 ++-- .../caps_5.0.0.riscv64.xml | 1 + .../caps_5.0.0.x86_64.replies | 71 +++-- .../caps_5.0.0.x86_64.xml | 1 + .../caps_5.1.0.x86_64.replies | 71 +++-- .../caps_5.1.0.x86_64.xml | 1 + .../caps_5.2.0.aarch64.replies | 71 +++-- .../caps_5.2.0.aarch64.xml | 1 + .../caps_5.2.0.ppc64.replies | 59 ++-- .../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + .../caps_5.2.0.riscv64.replies | 55 ++-- .../caps_5.2.0.riscv64.xml | 1 + .../caps_5.2.0.s390x.replies | 59 ++-- .../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 + .../caps_5.2.0.x86_64.replies | 71 +++-- .../caps_5.2.0.x86_64.xml | 1 + .../caps_6.0.0.aarch64.replies | 71 +++-- .../caps_6.0.0.aarch64.xml | 1 + .../caps_6.0.0.s390x.replies | 59 ++-- .../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 + .../caps_6.0.0.x86_64.replies | 71 +++-- .../caps_6.0.0.x86_64.xml | 1 + .../caps_6.1.0.x86_64.replies | 71 +++-- .../caps_6.1.0.x86_64.xml | 1 + .../caps_6.2.0.aarch64.replies | 71 +++-- .../caps_6.2.0.aarch64.xml | 1 + .../caps_6.2.0.ppc64.replies | 59 ++-- .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + .../caps_6.2.0.x86_64.replies | 71 +++-- .../caps_6.2.0.x86_64.xml | 1 + .../caps_7.0.0.aarch64.replies | 275 ++++++++++++++++-- .../caps_7.0.0.aarch64.xml | 2 + .../caps_7.0.0.ppc64.replies | 263 +++++++++++++++-- .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 2 + .../caps_7.0.0.x86_64.replies | 275 ++++++++++++++++-- .../caps_7.0.0.x86_64.xml | 2 + .../virtio-iommu-aarch64.aarch64-latest.args | 36 +++ .../qemuxml2argvdata/virtio-iommu-aarch64.xml | 20 ++ ...mmu-invalid-address-type.x86_64-latest.err | 1 + .../virtio-iommu-invalid-address-type.xml | 20 ++ ...io-iommu-invalid-address.x86_64-latest.err | 1 + .../virtio-iommu-invalid-address.xml | 20 ++ .../virtio-iommu-no-acpi.x86_64-latest.err | 1 + .../qemuxml2argvdata/virtio-iommu-no-acpi.xml | 15 + ...rtio-iommu-wrong-machine.x86_64-latest.err | 1 + .../virtio-iommu-wrong-machine.xml | 18 ++ .../virtio-iommu-x86_64.x86_64-6.1.0.err | 1 + .../virtio-iommu-x86_64.x86_64-latest.args | 32 ++ .../qemuxml2argvdata/virtio-iommu-x86_64.xml | 18 ++ tests/qemuxml2argvtest.c | 7 + .../virtio-iommu-aarch64.aarch64-latest.xml | 34 +++ .../virtio-iommu-x86_64.x86_64-latest.xml | 36 +++ tests/qemuxml2xmltest.c | 2 + 69 files changed, 1946 insertions(+), 531 deletions(-) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-iommu-aarch64.xml create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.xml create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml create mode 100644 tests/qemuxml2argvdata/virtio-iommu-no-acpi.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-no-acpi.xml create mode 100644 tests/qemuxml2argvdata/virtio-iommu-wrong-machine.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-wrong-machine.xml create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-6.1.0.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml -- 2.35.1

This new flag can be used to convince the PCI address assignment algorithm to place a device directly on the root bus. It will be used to implement support for virtio-iommu, which needs to be an integrated device in order to work correctly. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/conf/domain_addr.c | 17 +++++++++++++++++ src/conf/domain_addr.h | 26 +++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 49ca775a52..1173143635 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -303,6 +303,23 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress *addr, virErrorNumber errType = (fromConfig ? VIR_ERR_XML_ERROR : VIR_ERR_INTERNAL_ERROR); + if (devFlags & VIR_PCI_CONNECT_INTEGRATED) { + if (addr->bus == 0) { + /* pcie-root doesn't usually allow endpoint devices to be + * plugged directly into it, but for integrated devices + * that's exactly what we want */ + busFlags |= VIR_PCI_CONNECT_AUTOASSIGN; + } else { + if (reportError) { + virReportError(errType, + _("The device at PCI address %s needs to be " + "an integrated device (bus=0)"), + addrStr); + } + return false; + } + } + if (fromConfig) { /* If the requested connection was manually specified in * config, allow a PCI device to connect to a PCIe slot, or diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 814b556024..1772ea7088 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -35,24 +35,28 @@ typedef enum { VIR_PCI_CONNECT_AUTOASSIGN = 1 << 0, /* okay to autoassign a device to this controller */ VIR_PCI_CONNECT_HOTPLUGGABLE = 1 << 1, /* is hotplug needed/supported */ + /* Set for devices that can only work as integrated devices (directly + * connected to pci.0 or pcie.0, with no additional buses in between) */ + VIR_PCI_CONNECT_INTEGRATED = 1 << 2, + /* set for devices that can share a single slot in auto-assignment * (by assigning one device to each of the 8 functions on the slot) */ - VIR_PCI_CONNECT_AGGREGATE_SLOT = 1 << 2, + VIR_PCI_CONNECT_AGGREGATE_SLOT = 1 << 3, /* kinds of devices as a bitmap so they can be combined (some PCI * controllers permit connecting multiple types of devices) */ - VIR_PCI_CONNECT_TYPE_PCI_DEVICE = 1 << 3, - VIR_PCI_CONNECT_TYPE_PCIE_DEVICE = 1 << 4, - VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT = 1 << 5, - VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT = 1 << 6, - VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT = 1 << 7, - VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE = 1 << 8, - VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS = 1 << 9, - VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS = 1 << 10, - VIR_PCI_CONNECT_TYPE_PCI_BRIDGE = 1 << 11, - VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE = 1 << 12, + VIR_PCI_CONNECT_TYPE_PCI_DEVICE = 1 << 4, + VIR_PCI_CONNECT_TYPE_PCIE_DEVICE = 1 << 5, + VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT = 1 << 6, + VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT = 1 << 7, + VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT = 1 << 8, + VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE = 1 << 9, + VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS = 1 << 10, + VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS = 1 << 11, + VIR_PCI_CONNECT_TYPE_PCI_BRIDGE = 1 << 12, + VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE = 1 << 13, } virDomainPCIConnectFlags; /* a combination of all bits that describe the type of connections -- 2.35.1

The altered code is functionally equivalent to the previous one, but it's already laid down in a way that will make further changes easier and less messy. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_command.c | 14 ++++++-------- src/qemu/qemu_domain_address.c | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f7f55b20ef..9180d5c317 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6428,15 +6428,14 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, const virDomainDef *def, virQEMUCaps *qemuCaps) { + g_autoptr(virJSONValue) props = NULL; const virDomainIOMMUDef *iommu = def->iommu; if (!iommu) return 0; switch (iommu->model) { - case VIR_DOMAIN_IOMMU_MODEL_INTEL: { - g_autoptr(virJSONValue) props = NULL; - + case VIR_DOMAIN_IOMMU_MODEL_INTEL: if (virJSONValueObjectAdd(&props, "s:driver", "intel-iommu", "S:intremap", qemuOnOffAuto(iommu->intremap), @@ -6451,7 +6450,6 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, return -1; return 0; - } case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: /* There is no -device for SMMUv3, so nothing to be done here */ @@ -7034,14 +7032,14 @@ qemuBuildMachineCommandLine(virCommand *cmd, if (def->iommu) { switch (def->iommu->model) { - case VIR_DOMAIN_IOMMU_MODEL_INTEL: - /* The 'intel' IOMMu is formatted in qemuBuildIOMMUCommandLine */ - break; - case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: virBufferAddLit(&buf, ",iommu=smmuv3"); break; + case VIR_DOMAIN_IOMMU_MODEL_INTEL: + /* These IOMMUs are formatted in qemuBuildIOMMUCommandLine */ + break; + case VIR_DOMAIN_IOMMU_MODEL_LAST: default: virReportEnumRangeError(virDomainIOMMUModel, def->iommu->model); diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index dd0680f57f..6ca6fa54a3 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1002,6 +1002,16 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev, } break; + case VIR_DOMAIN_DEVICE_IOMMU: + switch ((virDomainIOMMUModel) dev->data.iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_INTEL: + case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: + case VIR_DOMAIN_IOMMU_MODEL_LAST: + /* These are not PCI devices */ + return 0; + } + break; + case VIR_DOMAIN_DEVICE_VSOCK: switch ((virDomainVsockModel) dev->data.vsock->model) { case VIR_DOMAIN_VSOCK_MODEL_VIRTIO_TRANSITIONAL: @@ -1041,7 +1051,6 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev, /* These devices don't even have a DeviceInfo */ case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_GRAPHICS: - case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_LAST: case VIR_DOMAIN_DEVICE_NONE: @@ -2369,6 +2378,18 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, /* Nada - none are PCI based (yet) */ } + if (def->iommu) { + virDomainIOMMUDef *iommu = def->iommu; + + switch ((virDomainIOMMUModel) iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_INTEL: + case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: + case VIR_DOMAIN_IOMMU_MODEL_LAST: + /* These are not PCI devices */ + break; + } + } + if (def->vsock && virDeviceInfoPCIAddressIsWanted(&def->vsock->info)) { -- 2.35.1

This capability detects the availability of the virtio-iommu-pci device. Note that, while this device is present even in somewhat old versions of QEMU, it's only some recent changes that made it actually usable for our purposes. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 + 22 files changed, 23 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 25d029d0cc..95aedee824 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -669,6 +669,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 425 */ "blockdev.nbd.tls-hostname", /* QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME */ "memory-backend-file.prealloc-threads", /* QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS */ + "virtio-iommu-pci", /* QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI */ ); @@ -1393,6 +1394,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "virtio-vga-gl", QEMU_CAPS_VIRTIO_VGA_GL }, { "s390-pv-guest", QEMU_CAPS_S390_PV_GUEST }, { "virtio-mem-pci", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI }, + { "virtio-iommu-pci", QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI }, }; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index b2426a6d25..cc63454430 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -644,6 +644,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 425 */ QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME, /* tls hostname can be overridden for NBD clients */ QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS, /* -object memory-backend-*.prealloc-threads */ + QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI, /* -device virtio-iommu-pci */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml index d188eab3fe..4d85bb41dd 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -179,6 +179,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index 12592f457a..d302db4461 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -187,6 +187,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml index 75c3a9b4fc..961940e536 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -171,6 +171,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index 5927c48ee4..4dc2312182 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -220,6 +220,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index e0291268b3..d1859659ac 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -223,6 +223,7 @@ <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml index 20a1a8154b..3611b06e49 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -185,6 +185,7 @@ <flag name='query-dirty-rate'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml index add2ded00a..01b976aa6f 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -191,6 +191,7 @@ <flag name='query-dirty-rate'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml index 237d043e5d..70517a3199 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -175,6 +175,7 @@ <flag name='query-dirty-rate'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml index 57e40f8f86..60370ad434 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -142,6 +142,7 @@ <flag name='query-dirty-rate'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 7c65648c06..7bb5cf5f42 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -227,6 +227,7 @@ <flag name='query-dirty-rate'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml index 7557e6ad71..64e0efc89a 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -193,6 +193,7 @@ <flag name='query-dirty-rate'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml index 00009be3dc..8f1212ec62 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -150,6 +150,7 @@ <flag name='query-dirty-rate'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 61d561dc69..6bd8b8856f 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -236,6 +236,7 @@ <flag name='sev-inject-launch-secret'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 0b58210335..390aaeab67 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -240,6 +240,7 @@ <flag name='sev-inject-launch-secret'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index d08b2c0213..884fdd738d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -204,6 +204,7 @@ <flag name='rbd-encryption'/> <flag name='calc-dirty-rate'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 8c52964ec0..f932217749 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -202,6 +202,7 @@ <flag name='calc-dirty-rate'/> <flag name='dirtyrate-param.mode'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index cdf72b9ebf..c24c0dc797 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -242,6 +242,7 @@ <flag name='calc-dirty-rate'/> <flag name='dirtyrate-param.mode'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index 53dea889df..73d16e9dfe 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -211,6 +211,7 @@ <flag name='dirtyrate-param.mode'/> <flag name='blockdev.nbd.tls-hostname'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6002092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 766e6c866c..51f5dac464 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -214,6 +214,7 @@ <flag name='dirtyrate-param.mode'/> <flag name='blockdev.nbd.tls-hostname'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6002092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index 3f42e67d0b..1c05085a2f 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -245,6 +245,7 @@ <flag name='dirtyrate-param.mode'/> <flag name='blockdev.nbd.tls-hostname'/> <flag name='memory-backend-file.prealloc-threads'/> + <flag name='virtio-iommu-pci'/> <version>6002092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> -- 2.35.1

This capability detects the availability of the boot-bypass property of the virtio-iommu-pci device. This property was only introduced in QEMU 7.0 but, since the device has been around for much longer, we end up querying its properties for several more releases. As I don't have convenient access to the 10+ binaries necessary to regenerate the replies, I just put some fake data in there. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h | 1 + .../caps_5.0.0.aarch64.replies | 71 +++-- .../caps_5.0.0.ppc64.replies | 59 ++-- .../caps_5.0.0.riscv64.replies | 55 ++-- .../caps_5.0.0.x86_64.replies | 71 +++-- .../caps_5.1.0.x86_64.replies | 71 +++-- .../caps_5.2.0.aarch64.replies | 71 +++-- .../caps_5.2.0.ppc64.replies | 59 ++-- .../caps_5.2.0.riscv64.replies | 55 ++-- .../caps_5.2.0.s390x.replies | 59 ++-- .../caps_5.2.0.x86_64.replies | 71 +++-- .../caps_6.0.0.aarch64.replies | 71 +++-- .../caps_6.0.0.s390x.replies | 59 ++-- .../caps_6.0.0.x86_64.replies | 71 +++-- .../caps_6.1.0.x86_64.replies | 71 +++-- .../caps_6.2.0.aarch64.replies | 71 +++-- .../caps_6.2.0.ppc64.replies | 59 ++-- .../caps_6.2.0.x86_64.replies | 71 +++-- .../caps_7.0.0.aarch64.replies | 275 ++++++++++++++++-- .../caps_7.0.0.aarch64.xml | 1 + .../caps_7.0.0.ppc64.replies | 263 +++++++++++++++-- .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 + .../caps_7.0.0.x86_64.replies | 275 ++++++++++++++++-- .../caps_7.0.0.x86_64.xml | 1 + 25 files changed, 1472 insertions(+), 468 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 95aedee824..bc95863519 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -670,6 +670,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "blockdev.nbd.tls-hostname", /* QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME */ "memory-backend-file.prealloc-threads", /* QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS */ "virtio-iommu-pci", /* QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI */ + "virtio-iommu.boot-bypass", /* QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS */ ); @@ -1579,6 +1580,10 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioMemPCI[] = { "prealloc", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC, NULL }, }; +static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioIOMMU[] = { + { "boot-bypass", QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS, NULL }, +}; + /* see documentation for virQEMUQAPISchemaPathGet for the query format */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { { "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT }, @@ -1745,6 +1750,9 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDeviceProps[] = { { "virtio-mem-pci", virQEMUCapsDevicePropsVirtioMemPCI, G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioMemPCI), QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI }, + { "virtio-iommu-pci", virQEMUCapsDevicePropsVirtioIOMMU, + G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioIOMMU), + QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI }, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index cc63454430..6476ec0746 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -645,6 +645,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME, /* tls hostname can be overridden for NBD clients */ QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS, /* -object memory-backend-*.prealloc-threads */ QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI, /* -device virtio-iommu-pci */ + QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS, /* virtio-iommu.boot-bypass */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies index 574c14d4ce..29bde0357f 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies @@ -20244,12 +20244,31 @@ "id": "libvirt-32" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-33" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-33" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -20319,7 +20338,7 @@ "type": "bool" } ], - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -20327,7 +20346,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -20396,7 +20415,7 @@ "type": "bool" } ], - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -20404,7 +20423,7 @@ "arguments": { "typename": "max-arm-cpu" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -20608,12 +20627,12 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-machines", - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -21201,7 +21220,7 @@ "deprecated": false } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -21209,7 +21228,7 @@ "arguments": { "typename": "virt-5.0-machine" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -21357,7 +21376,7 @@ "type": "child<cfi.pflash01>" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -21365,7 +21384,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -21455,12 +21474,12 @@ "type": "string" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-cpu-definitions", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -21656,24 +21675,24 @@ "static": false } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-tpm-models", - "id": "libvirt-40" + "id": "libvirt-41" } { "return": [ "tpm-tis" ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-tpm-types", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -21681,12 +21700,12 @@ "passthrough", "emulator" ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-command-line-options", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -22844,12 +22863,12 @@ "option": "drive" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-migrate-capabilities", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -22927,12 +22946,12 @@ "capability": "validate-uuid" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-gic-capabilities", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -22948,7 +22967,7 @@ "kernel": false } ], - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -22959,7 +22978,7 @@ "name": "host" } }, - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -22990,7 +23009,7 @@ } } }, - "id": "libvirt-45" + "id": "libvirt-46" } { diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies index b7950ec59b..ceee1fb025 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies @@ -20182,12 +20182,31 @@ "id": "libvirt-34" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-35" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-35" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -20257,7 +20276,7 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -20265,7 +20284,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -20334,12 +20353,12 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-machines", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -20609,7 +20628,7 @@ "deprecated": false } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -20617,7 +20636,7 @@ "arguments": { "typename": "pseries-5.0-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -20826,7 +20845,7 @@ "type": "string" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -20834,7 +20853,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20924,12 +20943,12 @@ "type": "string" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-cpu-definitions", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23135,24 +23154,24 @@ "static": false } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-tpm-models", - "id": "libvirt-41" + "id": "libvirt-42" } { "return": [ "tpm-spapr" ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-types", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -23160,12 +23179,12 @@ "passthrough", "emulator" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-command-line-options", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -24302,12 +24321,12 @@ "option": "drive" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-migrate-capabilities", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -24385,7 +24404,7 @@ "capability": "validate-uuid" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.replies b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.replies index a4dfe42b89..df993441a2 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.replies +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.replies @@ -18379,12 +18379,31 @@ "id": "libvirt-33" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-34" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-34" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -18454,7 +18473,7 @@ "type": "bool" } ], - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -18462,7 +18481,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -18531,12 +18550,12 @@ "type": "int" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-machines", - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -18594,7 +18613,7 @@ "deprecated": false } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -18602,7 +18621,7 @@ "arguments": { "typename": "virt-machine" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -18692,7 +18711,7 @@ "type": "string" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -18700,7 +18719,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -18790,34 +18809,34 @@ "type": "string" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-tpm-models", - "id": "libvirt-39" + "id": "libvirt-40" } { "return": [ ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-tpm-types", - "id": "libvirt-40" + "id": "libvirt-41" } { "return": [ ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-command-line-options", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -20083,12 +20102,12 @@ "option": "drive" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-migrate-capabilities", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -20166,5 +20185,5 @@ "capability": "validate-uuid" } ], - "id": "libvirt-42" + "id": "libvirt-43" } diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies index ad6ee05ba6..bd508473a2 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies @@ -20078,12 +20078,31 @@ "id": "libvirt-37" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-38" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -20153,7 +20172,7 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -20161,7 +20180,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20230,7 +20249,7 @@ "type": "int" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20238,7 +20257,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -21804,12 +21823,12 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-machines", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -22185,7 +22204,7 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -22193,7 +22212,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -22283,12 +22302,12 @@ "type": "string" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -23833,12 +23852,12 @@ "migration-safe": true } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -23846,12 +23865,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -23859,12 +23878,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -25140,12 +25159,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -25223,16 +25242,16 @@ "capability": "validate-uuid" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-sev-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SEV feature is not available" @@ -25247,7 +25266,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -25550,7 +25569,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -25564,7 +25583,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -25867,7 +25886,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies index cfb28e77bd..900acb1ed4 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies @@ -20828,12 +20828,31 @@ "id": "libvirt-38" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-39" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-39" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20903,7 +20922,7 @@ "type": "bool" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20911,7 +20930,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -20980,7 +20999,7 @@ "type": "int" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -20988,7 +21007,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -22574,12 +22593,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-machines", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -22971,7 +22990,7 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -22979,7 +22998,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -23069,12 +23088,12 @@ "type": "string" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-cpu-definitions", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -24776,12 +24795,12 @@ "migration-safe": true } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-models", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -24789,12 +24808,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-tpm-types", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -24802,12 +24821,12 @@ "passthrough", "emulator" ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-command-line-options", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -26102,12 +26121,12 @@ "option": "drive" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-migrate-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -26185,16 +26204,16 @@ "capability": "validate-uuid" } ], - "id": "libvirt-48" + "id": "libvirt-49" } { "execute": "query-sev-capabilities", - "id": "libvirt-49" + "id": "libvirt-50" } { - "id": "libvirt-49", + "id": "libvirt-50", "error": { "class": "GenericError", "desc": "SEV is not enabled in KVM" @@ -26209,7 +26228,7 @@ "name": "host" } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -26517,7 +26536,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -26531,7 +26550,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -26839,7 +26858,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.replies b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.replies index 76de04bb85..0203bbd399 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.replies @@ -21517,12 +21517,31 @@ "id": "libvirt-33" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-34" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-34" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -21592,7 +21611,7 @@ "type": "bool" } ], - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -21600,7 +21619,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -21669,7 +21688,7 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -21677,7 +21696,7 @@ "arguments": { "typename": "max-arm-cpu" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -21886,12 +21905,12 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-machines", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -22628,7 +22647,7 @@ "deprecated": false } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -22636,7 +22655,7 @@ "arguments": { "typename": "virt-5.2-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -22799,7 +22818,7 @@ "type": "child<cfi.pflash01>" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -22807,7 +22826,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -22892,12 +22911,12 @@ "type": "string" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-cpu-definitions", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23131,24 +23150,24 @@ "deprecated": false } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-tpm-models", - "id": "libvirt-41" + "id": "libvirt-42" } { "return": [ "tpm-tis" ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-types", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -23156,12 +23175,12 @@ "passthrough", "emulator" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-command-line-options", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -24338,12 +24357,12 @@ "option": "drive" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-migrate-capabilities", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -24421,12 +24440,12 @@ "capability": "validate-uuid" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-gic-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -24442,7 +24461,7 @@ "kernel": false } ], - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -24453,7 +24472,7 @@ "name": "host" } }, - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -24485,7 +24504,7 @@ } } }, - "id": "libvirt-46" + "id": "libvirt-47" } { diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.replies b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.replies index 0adb594192..86ea403662 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.replies @@ -21263,12 +21263,31 @@ "id": "libvirt-34" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-35" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-35" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -21338,7 +21357,7 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -21346,7 +21365,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -21415,12 +21434,12 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-machines", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -21740,7 +21759,7 @@ "default-ram-id": "mpc8544ds.ram" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -21748,7 +21767,7 @@ "arguments": { "typename": "pseries-5.2-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -21952,7 +21971,7 @@ "type": "string" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -21960,7 +21979,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -22045,12 +22064,12 @@ "type": "string" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-cpu-definitions", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -24696,24 +24715,24 @@ "deprecated": false } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-tpm-models", - "id": "libvirt-41" + "id": "libvirt-42" } { "return": [ "tpm-spapr" ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-types", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -24721,12 +24740,12 @@ "passthrough", "emulator" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-command-line-options", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -25882,12 +25901,12 @@ "option": "drive" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-migrate-capabilities", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -25965,7 +25984,7 @@ "capability": "validate-uuid" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.replies b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.replies index 627afa6d12..4931b4ff1c 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.replies @@ -19435,12 +19435,31 @@ "id": "libvirt-33" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-34" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-34" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -19510,7 +19529,7 @@ "type": "bool" } ], - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -19518,7 +19537,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -19587,12 +19606,12 @@ "type": "int" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-machines", - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -19646,7 +19665,7 @@ "deprecated": false } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -19654,7 +19673,7 @@ "arguments": { "typename": "virt-machine" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -19744,7 +19763,7 @@ "type": "bool" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -19752,7 +19771,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -19837,34 +19856,34 @@ "type": "string" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-tpm-models", - "id": "libvirt-39" + "id": "libvirt-40" } { "return": [ ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-tpm-types", - "id": "libvirt-40" + "id": "libvirt-41" } { "return": [ ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-command-line-options", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -21149,12 +21168,12 @@ "option": "drive" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-migrate-capabilities", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -21232,5 +21251,5 @@ "capability": "validate-uuid" } ], - "id": "libvirt-42" + "id": "libvirt-43" } diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.replies b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.replies index cdca3b9169..ab1c2034af 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.replies @@ -19451,12 +19451,31 @@ "id": "libvirt-31" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-32" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-32" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -19526,7 +19545,7 @@ "type": "bool" } ], - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -19534,7 +19553,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -19603,12 +19622,12 @@ "type": "int" } ], - "id": "libvirt-33" + "id": "libvirt-34" } { "execute": "query-machines", - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -19777,7 +19796,7 @@ "default-ram-id": "s390.ram" } ], - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -19785,7 +19804,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -19870,12 +19889,12 @@ "type": "string" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-cpu-definitions", - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -20556,34 +20575,34 @@ "deprecated": false } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-tpm-models", - "id": "libvirt-37" + "id": "libvirt-38" } { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-tpm-types", - "id": "libvirt-38" + "id": "libvirt-39" } { "return": [ ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-command-line-options", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -21739,12 +21758,12 @@ "option": "drive" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-migrate-capabilities", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -21822,7 +21841,7 @@ "capability": "validate-uuid" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -21833,7 +21852,7 @@ "name": "host" } }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -21889,7 +21908,7 @@ } } }, - "id": "libvirt-41" + "id": "libvirt-42" } { diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies index 22a1087e23..3ea7d87aec 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies @@ -21428,12 +21428,31 @@ "id": "libvirt-38" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-39" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-39" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -21503,7 +21522,7 @@ "type": "bool" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -21511,7 +21530,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -21580,7 +21599,7 @@ "type": "int" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -21588,7 +21607,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -23186,12 +23205,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-machines", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -23649,7 +23668,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -23657,7 +23676,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -23742,12 +23761,12 @@ "type": "string" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-cpu-definitions", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -25572,12 +25591,12 @@ "deprecated": false } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-models", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -25585,12 +25604,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-tpm-types", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -25598,12 +25617,12 @@ "passthrough", "emulator" ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-command-line-options", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -26898,12 +26917,12 @@ "option": "drive" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-migrate-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -26981,16 +27000,16 @@ "capability": "validate-uuid" } ], - "id": "libvirt-48" + "id": "libvirt-49" } { "execute": "query-sev-capabilities", - "id": "libvirt-49" + "id": "libvirt-50" } { - "id": "libvirt-49", + "id": "libvirt-50", "error": { "class": "GenericError", "desc": "SEV is not enabled in KVM" @@ -27005,7 +27024,7 @@ "name": "host" } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -27314,7 +27333,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -27328,7 +27347,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -27637,7 +27656,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.replies b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.replies index ffb17cbc84..1b9fd6b18a 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.replies @@ -23376,12 +23376,31 @@ "id": "libvirt-33" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-34" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-34" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -23451,7 +23470,7 @@ "type": "bool" } ], - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -23459,7 +23478,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -23528,7 +23547,7 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -23536,7 +23555,7 @@ "arguments": { "typename": "max-arm-cpu" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -23745,12 +23764,12 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-machines", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -24529,7 +24548,7 @@ "deprecated": false } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -24537,7 +24556,7 @@ "arguments": { "typename": "virt-6.0-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -24723,7 +24742,7 @@ "type": "child<cfi.pflash01>" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -24731,7 +24750,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -24829,12 +24848,12 @@ "type": "child<container>" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-cpu-definitions", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -25074,24 +25093,24 @@ "deprecated": false } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-tpm-models", - "id": "libvirt-41" + "id": "libvirt-42" } { "return": [ "tpm-tis" ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-types", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -25099,12 +25118,12 @@ "passthrough", "emulator" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-command-line-options", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -26301,12 +26320,12 @@ "option": "drive" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-migrate-capabilities", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -26388,12 +26407,12 @@ "capability": "background-snapshot" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-gic-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -26409,7 +26428,7 @@ "kernel": false } ], - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -26420,7 +26439,7 @@ "name": "host" } }, - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -26452,7 +26471,7 @@ } } }, - "id": "libvirt-46" + "id": "libvirt-47" } { diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.replies b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.replies index 67706ec6d5..388f95d3d1 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.replies @@ -21089,12 +21089,31 @@ "id": "libvirt-31" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-32" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-32" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -21164,7 +21183,7 @@ "type": "bool" } ], - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -21172,7 +21191,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -21241,12 +21260,12 @@ "type": "int" } ], - "id": "libvirt-33" + "id": "libvirt-34" } { "execute": "query-machines", - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -21424,7 +21443,7 @@ "default-ram-id": "s390.ram" } ], - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -21432,7 +21451,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -21530,12 +21549,12 @@ "type": "child<container>" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-cpu-definitions", - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -22216,34 +22235,34 @@ "deprecated": false } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-tpm-models", - "id": "libvirt-37" + "id": "libvirt-38" } { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-tpm-types", - "id": "libvirt-38" + "id": "libvirt-39" } { "return": [ ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-command-line-options", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23419,12 +23438,12 @@ "option": "drive" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-migrate-capabilities", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23506,7 +23525,7 @@ "capability": "background-snapshot" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23517,7 +23536,7 @@ "name": "host" } }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -23574,7 +23593,7 @@ } } }, - "id": "libvirt-41" + "id": "libvirt-42" } { diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies index 4cde1b4eb5..2577587d9b 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies @@ -23212,12 +23212,31 @@ "id": "libvirt-38" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-39" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-39" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23291,7 +23310,7 @@ "type": "bool" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23299,7 +23318,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23368,7 +23387,7 @@ "type": "int" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23376,7 +23395,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -25022,12 +25041,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-machines", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -25474,7 +25493,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -25482,7 +25501,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -25580,12 +25599,12 @@ "type": "child<container>" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-cpu-definitions", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -27453,12 +27472,12 @@ "deprecated": false } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-models", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -27466,12 +27485,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-tpm-types", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -27479,12 +27498,12 @@ "passthrough", "emulator" ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-command-line-options", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -28803,12 +28822,12 @@ "option": "drive" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-migrate-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -28890,12 +28909,12 @@ "capability": "background-snapshot" } ], - "id": "libvirt-48" + "id": "libvirt-49" } { "execute": "query-sev-capabilities", - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -28905,7 +28924,7 @@ "cert-chain": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA", "pdh": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA" }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -28916,7 +28935,7 @@ "name": "host" } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -29237,7 +29256,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -29251,7 +29270,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -29572,7 +29591,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies index 1fb3b3de8c..42c64d946a 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies @@ -23454,12 +23454,31 @@ "id": "libvirt-38" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-39" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-39" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23538,7 +23557,7 @@ "type": "bool" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23546,7 +23565,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23620,7 +23639,7 @@ "type": "int" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -23628,7 +23647,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -25286,12 +25305,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-machines", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -25756,7 +25775,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -25764,7 +25783,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -25867,12 +25886,12 @@ "type": "child<container>" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-cpu-definitions", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -27929,12 +27948,12 @@ "deprecated": false } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-models", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -27942,12 +27961,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-tpm-types", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -27955,12 +27974,12 @@ "passthrough", "emulator" ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-command-line-options", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -29292,12 +29311,12 @@ "option": "drive" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-migrate-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -29379,16 +29398,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-48" + "id": "libvirt-49" } { "execute": "query-sev-capabilities", - "id": "libvirt-49" + "id": "libvirt-50" } { - "id": "libvirt-49", + "id": "libvirt-50", "error": { "class": "GenericError", "desc": "Failed to open /dev/sev: No such file or directory" @@ -29403,7 +29422,7 @@ "name": "host" } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -29726,7 +29745,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -29740,7 +29759,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -30063,7 +30082,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies index e8ce132f3c..1a660ffd4d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies @@ -24217,12 +24217,31 @@ "id": "libvirt-34" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-35" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-35" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -24297,7 +24316,7 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -24305,7 +24324,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -24379,7 +24398,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -24387,7 +24406,7 @@ "arguments": { "typename": "max-arm-cpu" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -24596,12 +24615,12 @@ "type": "bool" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-machines", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -25445,7 +25464,7 @@ "deprecated": false } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -25453,7 +25472,7 @@ "arguments": { "typename": "virt-6.2-machine" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -25649,7 +25668,7 @@ "type": "child<cfi.pflash01>" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -25657,7 +25676,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -25760,12 +25779,12 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-cpu-definitions", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -26011,24 +26030,24 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { "return": [ "tpm-tis" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -26036,12 +26055,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -27389,12 +27408,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -27476,12 +27495,12 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-gic-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -27497,7 +27516,7 @@ "kernel": false } ], - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -27508,7 +27527,7 @@ "name": "host" } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -27540,7 +27559,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.replies b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.replies index 089db57737..915b6a0584 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.replies @@ -26153,12 +26153,31 @@ "id": "libvirt-34" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-35" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-35" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -26233,7 +26252,7 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } { @@ -26241,7 +26260,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -26315,12 +26334,12 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-machines", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -26683,7 +26702,7 @@ "default-ram-id": "mpc8544ds.ram" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -26691,7 +26710,7 @@ "arguments": { "typename": "pseries-6.2-machine" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -26923,7 +26942,7 @@ "type": "string" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -26931,7 +26950,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -27034,12 +27053,12 @@ "type": "child<container>" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-cpu-definitions", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -29691,24 +29710,24 @@ "deprecated": false } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-tpm-models", - "id": "libvirt-41" + "id": "libvirt-42" } { "return": [ "tpm-spapr" ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-types", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -29716,12 +29735,12 @@ "passthrough", "emulator" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-command-line-options", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -30855,12 +30874,12 @@ "option": "drive" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-migrate-capabilities", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -30942,7 +30961,7 @@ "capability": "background-snapshot" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies index 8a574c893b..e235532d62 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies @@ -26635,12 +26635,31 @@ "id": "libvirt-38" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-39" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-39" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -26719,7 +26738,7 @@ "type": "bool" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -26727,7 +26746,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -26801,7 +26820,7 @@ "type": "int" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -26809,7 +26828,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -28549,12 +28568,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-machines", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -29037,7 +29056,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -29045,7 +29064,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -29148,12 +29167,12 @@ "type": "child<container>" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-cpu-definitions", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31222,12 +31241,12 @@ "deprecated": false } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-models", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -31235,12 +31254,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-tpm-types", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -31248,12 +31267,12 @@ "passthrough", "emulator" ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-command-line-options", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -32585,12 +32604,12 @@ "option": "drive" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-migrate-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -32672,16 +32691,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-48" + "id": "libvirt-49" } { "execute": "query-sev-capabilities", - "id": "libvirt-49" + "id": "libvirt-50" } { - "id": "libvirt-49", + "id": "libvirt-50", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -32696,7 +32715,7 @@ "name": "host" } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33029,7 +33048,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33043,7 +33062,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -33376,7 +33395,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.replies b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.replies index fa2b68c2b9..15aa136a96 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.replies @@ -27730,12 +27730,235 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "failover_pair_id", + "type": "str" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": 0, + "name": "len-reserved-regions", + "type": "uint32" + }, + { + "default-value": 0, + "name": "class", + "type": "uint32" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": true, + "name": "boot-bypass", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "primary-bus", + "type": "link<PCI>" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child<virtio-iommu-device>" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -27810,7 +28033,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -27818,7 +28041,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -27892,7 +28115,7 @@ "type": "bool" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -27900,7 +28123,7 @@ "arguments": { "typename": "max-arm-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -28109,12 +28332,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -28984,7 +29207,7 @@ "deprecated": false } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -28992,7 +29215,7 @@ "arguments": { "typename": "virt-7.0-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -29193,7 +29416,7 @@ "type": "child<cfi.pflash01>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -29201,7 +29424,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -29304,12 +29527,12 @@ "type": "child<container>" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -29555,24 +29778,24 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { "return": [ "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -29580,12 +29803,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -30937,12 +31160,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -31024,12 +31247,12 @@ "capability": "background-snapshot" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-gic-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -31045,7 +31268,7 @@ "kernel": false } ], - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -31056,7 +31279,7 @@ "name": "host" } }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -31089,7 +31312,7 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index 73d16e9dfe..742afc24b0 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -212,6 +212,7 @@ <flag name='blockdev.nbd.tls-hostname'/> <flag name='memory-backend-file.prealloc-threads'/> <flag name='virtio-iommu-pci'/> + <flag name='virtio-iommu.boot-bypass'/> <version>6002092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.replies b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.replies index 2283e8e4c8..5537d1fa96 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.replies @@ -26640,12 +26640,235 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "failover_pair_id", + "type": "str" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": 0, + "name": "len-reserved-regions", + "type": "uint32" + }, + { + "default-value": 0, + "name": "class", + "type": "uint32" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": true, + "name": "boot-bypass", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "primary-bus", + "type": "link<PCI>" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child<virtio-iommu-device>" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -26720,7 +26943,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -26728,7 +26951,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -26802,12 +27025,12 @@ "type": "bool" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-machines", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -27179,7 +27402,7 @@ "default-ram-id": "mpc8544ds.ram" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -27187,7 +27410,7 @@ "arguments": { "typename": "pseries-7.0-machine" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -27419,7 +27642,7 @@ "type": "string" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -27427,7 +27650,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -27530,12 +27753,12 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-cpu-definitions", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -30061,24 +30284,24 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-tpm-models", - "id": "libvirt-42" + "id": "libvirt-43" } { "return": [ "tpm-spapr" ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-types", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -30086,12 +30309,12 @@ "passthrough", "emulator" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-command-line-options", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31289,12 +31512,12 @@ "option": "drive" } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-migrate-capabilities", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -31376,7 +31599,7 @@ "capability": "background-snapshot" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 51f5dac464..edbf40f048 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -215,6 +215,7 @@ <flag name='blockdev.nbd.tls-hostname'/> <flag name='memory-backend-file.prealloc-threads'/> <flag name='virtio-iommu-pci'/> + <flag name='virtio-iommu.boot-bypass'/> <version>6002092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies index f8973143dd..d1f453dcca 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies @@ -26988,12 +26988,235 @@ "id": "libvirt-38" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-39" +} + +{ + "return": [ + { + "name": "failover_pair_id", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": 0, + "name": "len-reserved-regions", + "type": "uint32" + }, + { + "default-value": 0, + "name": "class", + "type": "uint32" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child<virtio-iommu-device>" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "boot-bypass", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "primary-bus", + "type": "link<PCI>" + } + ], + "id": "libvirt-39" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -27072,7 +27295,7 @@ "type": "bool" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -27080,7 +27303,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -27154,7 +27377,7 @@ "type": "int" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -27162,7 +27385,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -28918,12 +29141,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-machines", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -29450,7 +29673,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -29458,7 +29681,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -29561,12 +29784,12 @@ "type": "child<container>" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-cpu-definitions", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31671,12 +31894,12 @@ "deprecated": false } ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-models", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -31684,12 +31907,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-tpm-types", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -31697,12 +31920,12 @@ "passthrough", "emulator" ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-command-line-options", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -33038,12 +33261,12 @@ "option": "drive" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-migrate-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -33125,16 +33348,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-48" + "id": "libvirt-49" } { "execute": "query-sev-capabilities", - "id": "libvirt-49" + "id": "libvirt-50" } { - "id": "libvirt-49", + "id": "libvirt-50", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -33149,7 +33372,7 @@ "name": "host" } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33486,7 +33709,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33500,7 +33723,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -33837,7 +34060,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index 1c05085a2f..a6b9c2fdd4 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -246,6 +246,7 @@ <flag name='blockdev.nbd.tls-hostname'/> <flag name='memory-backend-file.prealloc-threads'/> <flag name='virtio-iommu-pci'/> + <flag name='virtio-iommu.boot-bypass'/> <version>6002092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> -- 2.35.1

Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_command.c | 4 ++++ src/qemu/qemu_domain_address.c | 6 ++++++ src/qemu/qemu_validate.c | 3 +++ 6 files changed, 16 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ba8dd7d7d0..2295d73ff2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1287,6 +1287,7 @@ VIR_ENUM_IMPL(virDomainIOMMUModel, VIR_DOMAIN_IOMMU_MODEL_LAST, "intel", "smmuv3", + "virtio", ); VIR_ENUM_IMPL(virDomainVsockModel, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c58fe3cb0f..bad0004b3c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2755,6 +2755,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSecDef, virDomainSecDefFree); typedef enum { VIR_DOMAIN_IOMMU_MODEL_INTEL, VIR_DOMAIN_IOMMU_MODEL_SMMUV3, + VIR_DOMAIN_IOMMU_MODEL_VIRTIO, VIR_DOMAIN_IOMMU_MODEL_LAST } virDomainIOMMUModel; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 3326946842..3951ef3e04 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -5457,6 +5457,7 @@ <choice> <value>intel</value> <value>smmuv3</value> + <value>virtio</value> </choice> </attribute> <optional> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9180d5c317..a6d4bb1cb1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6451,6 +6451,9 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, return 0; + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + return 0; + case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: /* There is no -device for SMMUv3, so nothing to be done here */ return 0; @@ -7037,6 +7040,7 @@ qemuBuildMachineCommandLine(virCommand *cmd, break; case VIR_DOMAIN_IOMMU_MODEL_INTEL: + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: /* These IOMMUs are formatted in qemuBuildIOMMUCommandLine */ break; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 6ca6fa54a3..205610c53e 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1004,6 +1004,9 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev, case VIR_DOMAIN_DEVICE_IOMMU: switch ((virDomainIOMMUModel) dev->data.iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + return 0; + case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: case VIR_DOMAIN_IOMMU_MODEL_LAST: @@ -2382,6 +2385,9 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, virDomainIOMMUDef *iommu = def->iommu; switch ((virDomainIOMMUModel) iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + break; + case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: case VIR_DOMAIN_IOMMU_MODEL_LAST: diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index e0708b8a76..f2548a31ae 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4865,6 +4865,9 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, } break; + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + break; + case VIR_DOMAIN_IOMMU_MODEL_LAST: default: virReportEnumRangeError(virDomainIOMMUModel, iommu->model); -- 2.35.1

These represent valid uses of the device. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- .../virtio-iommu-aarch64.aarch64-latest.args | 35 +++++++++++++++++++ .../qemuxml2argvdata/virtio-iommu-aarch64.xml | 20 +++++++++++ .../virtio-iommu-x86_64.x86_64-latest.args | 31 ++++++++++++++++ .../qemuxml2argvdata/virtio-iommu-x86_64.xml | 18 ++++++++++ tests/qemuxml2argvtest.c | 2 ++ .../virtio-iommu-aarch64.aarch64-latest.xml | 32 +++++++++++++++++ .../virtio-iommu-x86_64.x86_64-latest.xml | 34 ++++++++++++++++++ tests/qemuxml2xmltest.c | 2 ++ 8 files changed, 174 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-iommu-aarch64.xml create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml diff --git a/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args new file mode 100644 index 0000000000..917451d6f2 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args @@ -0,0 +1,35 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ +-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ +-machine virt,usb=off,dump-guest-core=off,gic-version=2,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=mach-virt.ram \ +-accel tcg \ +-cpu cortex-a15 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-iommu-aarch64.xml b/tests/qemuxml2argvdata/virtio-iommu-aarch64.xml new file mode 100644 index 0000000000..3e89cb2dac --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-aarch64.xml @@ -0,0 +1,20 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <iommu model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args new file mode 100644 index 0000000000..be06ea9957 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args @@ -0,0 +1,31 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.xml b/tests/qemuxml2argvdata/virtio-iommu-x86_64.xml new file mode 100644 index 0000000000..51c13d2ef6 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.xml @@ -0,0 +1,18 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <iommu model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e7fecb24d3..7c2191f580 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3247,6 +3247,8 @@ mymain(void) DO_TEST_CAPS_LATEST("intel-iommu-aw-bits"); DO_TEST_CAPS_LATEST_PARSE_ERROR("intel-iommu-wrong-machine"); DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64"); + DO_TEST_CAPS_LATEST("virtio-iommu-x86_64"); + DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64"); DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml b/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml new file mode 100644 index 0000000000..336f99d539 --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='aarch64' machine='virt'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> + <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <gic version='2'/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + <iommu model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml new file mode 100644 index 0000000000..0b6c2d0eaf --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + <iommu model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 31917e5238..9177705254 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1284,6 +1284,8 @@ mymain(void) DO_TEST_CAPS_LATEST("intel-iommu-device-iotlb"); DO_TEST_CAPS_LATEST("intel-iommu-aw-bits"); DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64"); + DO_TEST_CAPS_LATEST("virtio-iommu-x86_64"); + DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64"); DO_TEST_NOCAPS("cpu-check-none"); DO_TEST_NOCAPS("cpu-check-partial"); -- 2.35.1

Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_validate.c | 8 ++++++++ ...irtio-iommu-wrong-machine.x86_64-latest.err | 1 + .../virtio-iommu-wrong-machine.xml | 18 ++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 4 files changed, 28 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-wrong-machine.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-wrong-machine.xml diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f2548a31ae..eb3200712c 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4866,6 +4866,14 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, break; case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + if (!qemuDomainIsARMVirt(def) && + !qemuDomainIsQ35(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("IOMMU device: '%s' is only supported with " + "Q35 and ARM Virt machines"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } break; case VIR_DOMAIN_IOMMU_MODEL_LAST: diff --git a/tests/qemuxml2argvdata/virtio-iommu-wrong-machine.x86_64-latest.err b/tests/qemuxml2argvdata/virtio-iommu-wrong-machine.x86_64-latest.err new file mode 100644 index 0000000000..8d1cd19170 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-wrong-machine.x86_64-latest.err @@ -0,0 +1 @@ +unsupported configuration: IOMMU device: 'virtio' is only supported with Q35 and ARM Virt machines diff --git a/tests/qemuxml2argvdata/virtio-iommu-wrong-machine.xml b/tests/qemuxml2argvdata/virtio-iommu-wrong-machine.xml new file mode 100644 index 0000000000..ad2a516b3a --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-wrong-machine.xml @@ -0,0 +1,18 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <iommu model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7c2191f580..f4c5c5bb31 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3249,6 +3249,7 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64"); DO_TEST_CAPS_LATEST("virtio-iommu-x86_64"); DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-wrong-machine"); DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", -- 2.35.1

Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_validate.c | 8 ++++++++ .../qemuxml2argvdata/virtio-iommu-x86_64.x86_64-6.1.0.err | 1 + tests/qemuxml2argvtest.c | 1 + 3 files changed, 10 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-6.1.0.err diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index eb3200712c..f67c802cbf 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4874,6 +4874,14 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, virDomainIOMMUModelTypeToString(iommu->model)); return -1; } + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI) || + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("IOMMU device: '%s' is not supported with " + "this QEMU binary"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } break; case VIR_DOMAIN_IOMMU_MODEL_LAST: diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-6.1.0.err b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-6.1.0.err new file mode 100644 index 0000000000..e76e1540bc --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-6.1.0.err @@ -0,0 +1 @@ +unsupported configuration: IOMMU device: 'virtio' is not supported with this QEMU binary diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f4c5c5bb31..bc01d60e12 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3248,6 +3248,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PARSE_ERROR("intel-iommu-wrong-machine"); DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64"); DO_TEST_CAPS_LATEST("virtio-iommu-x86_64"); + DO_TEST_CAPS_VER_PARSE_ERROR("virtio-iommu-x86_64", "6.1.0"); DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-wrong-machine"); -- 2.35.1

virtio-iommu doesn't work without ACPI, so we need to make sure the latter is enabled. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_validate.c | 6 ++++++ .../virtio-iommu-no-acpi.x86_64-latest.err | 1 + tests/qemuxml2argvdata/virtio-iommu-no-acpi.xml | 15 +++++++++++++++ tests/qemuxml2argvtest.c | 1 + 4 files changed, 23 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-no-acpi.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-no-acpi.xml diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f67c802cbf..1e6900bfd0 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4882,6 +4882,12 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, virDomainIOMMUModelTypeToString(iommu->model)); return -1; } + if (def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("IOMMU device: '%s' requires ACPI"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } break; case VIR_DOMAIN_IOMMU_MODEL_LAST: diff --git a/tests/qemuxml2argvdata/virtio-iommu-no-acpi.x86_64-latest.err b/tests/qemuxml2argvdata/virtio-iommu-no-acpi.x86_64-latest.err new file mode 100644 index 0000000000..6b598951bb --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-no-acpi.x86_64-latest.err @@ -0,0 +1 @@ +unsupported configuration: IOMMU device: 'virtio' requires ACPI diff --git a/tests/qemuxml2argvdata/virtio-iommu-no-acpi.xml b/tests/qemuxml2argvdata/virtio-iommu-no-acpi.xml new file mode 100644 index 0000000000..36e5eb39b9 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-no-acpi.xml @@ -0,0 +1,15 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <iommu model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index bc01d60e12..88863d94f3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3251,6 +3251,7 @@ mymain(void) DO_TEST_CAPS_VER_PARSE_ERROR("virtio-iommu-x86_64", "6.1.0"); DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-wrong-machine"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-no-acpi"); DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", -- 2.35.1

This is needed so that IOMMU devices can have addresses. Existing IOMMU devices (intel-iommu and SMMUv3) are system devices and as such don't have an address associated to them, but virtio-iommu is a PCI device and needs one. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/conf/domain_conf.c | 37 ++++++++++++------ src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 63 +++++++++++++++++-------------- 3 files changed, 60 insertions(+), 41 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2295d73ff2..77671c233f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2581,6 +2581,7 @@ virDomainIOMMUDefFree(virDomainIOMMUDef *iommu) if (!iommu) return; + virDomainDeviceInfoClear(&iommu->info); g_free(iommu); } @@ -4276,13 +4277,14 @@ virDomainDeviceGetInfo(const virDomainDeviceDef *device) return &device->data.panic->info; case VIR_DOMAIN_DEVICE_MEMORY: return &device->data.memory->info; + case VIR_DOMAIN_DEVICE_IOMMU: + return &device->data.iommu->info; case VIR_DOMAIN_DEVICE_VSOCK: return &device->data.vsock->info; /* The following devices do not contain virDomainDeviceInfo */ case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_GRAPHICS: - case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_LAST: case VIR_DOMAIN_DEVICE_NONE: @@ -4578,6 +4580,13 @@ virDomainDeviceInfoIterateFlags(virDomainDef *def, return rc; } + device.type = VIR_DOMAIN_DEVICE_IOMMU; + if (def->iommu) { + device.data.iommu = def->iommu; + if ((rc = cb(def, &device, &def->iommu->info, opaque)) != 0) + return rc; + } + device.type = VIR_DOMAIN_DEVICE_VSOCK; if (def->vsock) { device.data.vsock = def->vsock; @@ -4605,12 +4614,6 @@ virDomainDeviceInfoIterateFlags(virDomainDef *def, if ((rc = cb(def, &device, NULL, opaque)) != 0) return rc; } - device.type = VIR_DOMAIN_DEVICE_IOMMU; - if (def->iommu) { - device.data.iommu = def->iommu; - if ((rc = cb(def, &device, NULL, opaque)) != 0) - return rc; - } } /* Coverity is not very happy with this - all dead_error_condition */ @@ -14797,8 +14800,10 @@ virDomainMemoryDefParseXML(virDomainXMLOption *xmlopt, static virDomainIOMMUDef * -virDomainIOMMUDefParseXML(xmlNodePtr node, - xmlXPathContextPtr ctxt) +virDomainIOMMUDefParseXML(virDomainXMLOption *xmlopt, + xmlNodePtr node, + xmlXPathContextPtr ctxt, + unsigned int flags) { VIR_XPATH_NODE_AUTORESTORE(ctxt) xmlNodePtr driver; @@ -14834,6 +14839,10 @@ virDomainIOMMUDefParseXML(xmlNodePtr node, return NULL; } + if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, + &iommu->info, flags) < 0) + return NULL; + return g_steal_pointer(&iommu); } @@ -15031,7 +15040,8 @@ virDomainDeviceDefParse(const char *xmlStr, return NULL; break; case VIR_DOMAIN_DEVICE_IOMMU: - if (!(dev->data.iommu = virDomainIOMMUDefParseXML(node, ctxt))) + if (!(dev->data.iommu = virDomainIOMMUDefParseXML(xmlopt, node, + ctxt, flags))) return NULL; break; case VIR_DOMAIN_DEVICE_VSOCK: @@ -20166,7 +20176,8 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt, } if (n > 0) { - if (!(def->iommu = virDomainIOMMUDefParseXML(nodes[0], ctxt))) + if (!(def->iommu = virDomainIOMMUDefParseXML(xmlopt, nodes[0], + ctxt, flags))) return NULL; } VIR_FREE(nodes); @@ -22030,7 +22041,7 @@ virDomainIOMMUDefCheckABIStability(virDomainIOMMUDef *src, return false; } - return true; + return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info); } @@ -27432,6 +27443,8 @@ virDomainIOMMUDefFormat(virBuffer *buf, virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL); + virDomainDeviceInfoFormat(&childBuf, &iommu->info, 0); + virBufferAsprintf(&attrBuf, " model='%s'", virDomainIOMMUModelTypeToString(iommu->model)); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index bad0004b3c..1ef3dc8a2b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2767,6 +2767,7 @@ struct _virDomainIOMMUDef { virTristateSwitch eim; virTristateSwitch iotlb; unsigned int aw_bits; + virDomainDeviceInfo info; }; typedef enum { diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 3951ef3e04..8345976e81 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -5460,35 +5460,40 @@ <value>virtio</value> </choice> </attribute> - <optional> - <element name="driver"> - <optional> - <attribute name="intremap"> - <ref name="virOnOff"/> - </attribute> - </optional> - <optional> - <attribute name="caching_mode"> - <ref name="virOnOff"/> - </attribute> - </optional> - <optional> - <attribute name="eim"> - <ref name="virOnOff"/> - </attribute> - </optional> - <optional> - <attribute name="iotlb"> - <ref name="virOnOff"/> - </attribute> - </optional> - <optional> - <attribute name="aw_bits"> - <ref name="uint8"/> - </attribute> - </optional> - </element> - </optional> + <interleave> + <optional> + <element name="driver"> + <optional> + <attribute name="intremap"> + <ref name="virOnOff"/> + </attribute> + </optional> + <optional> + <attribute name="caching_mode"> + <ref name="virOnOff"/> + </attribute> + </optional> + <optional> + <attribute name="eim"> + <ref name="virOnOff"/> + </attribute> + </optional> + <optional> + <attribute name="iotlb"> + <ref name="virOnOff"/> + </attribute> + </optional> + <optional> + <attribute name="aw_bits"> + <ref name="uint8"/> + </attribute> + </optional> + </element> + </optional> + <optional> + <ref name="address"/> + </optional> + </interleave> </element> </define> -- 2.35.1

The device is configured to be an integrated endpoint, as is necessary for it to function correctly. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_domain_address.c | 6 +++++- .../virtio-iommu-aarch64.aarch64-latest.xml | 4 +++- .../virtio-iommu-x86_64.x86_64-latest.xml | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 205610c53e..753733d1b9 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1005,7 +1005,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev, case VIR_DOMAIN_DEVICE_IOMMU: switch ((virDomainIOMMUModel) dev->data.iommu->model) { case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: - return 0; + return virtioFlags | VIR_PCI_CONNECT_INTEGRATED; case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: @@ -2386,6 +2386,10 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, switch ((virDomainIOMMUModel) iommu->model) { case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + if (virDeviceInfoPCIAddressIsWanted(&iommu->info) && + qemuDomainPCIAddressReserveNextAddr(addrs, &iommu->info) < 0) { + return -1; + } break; case VIR_DOMAIN_IOMMU_MODEL_INTEL: diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml b/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml index 336f99d539..c6560e9a91 100644 --- a/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml +++ b/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml @@ -27,6 +27,8 @@ <controller type='pci' index='0' model='pcie-root'/> <audio id='1' type='none'/> <memballoon model='none'/> - <iommu model='virtio'/> + <iommu model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </iommu> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml index 0b6c2d0eaf..ad3a702b0b 100644 --- a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml @@ -29,6 +29,8 @@ <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> <memballoon model='none'/> - <iommu model='virtio'/> + <iommu model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </iommu> </devices> </domain> -- 2.35.1

virtio-iommu is a PCI device and attempts to use a different address type should be rejected. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_validate.c | 7 +++++++ ...mmu-invalid-address-type.x86_64-latest.err | 1 + .../virtio-iommu-invalid-address-type.xml | 20 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 4 files changed, 29 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.xml diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 1e6900bfd0..0ffe02be5b 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4888,6 +4888,13 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, virDomainIOMMUModelTypeToString(iommu->model)); return -1; } + if (iommu->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && + iommu->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("IOMMU device: '%s' needs a PCI address"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } break; case VIR_DOMAIN_IOMMU_MODEL_LAST: diff --git a/tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.x86_64-latest.err b/tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.x86_64-latest.err new file mode 100644 index 0000000000..216848eaf8 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.x86_64-latest.err @@ -0,0 +1 @@ +unsupported configuration: IOMMU device: 'virtio' needs a PCI address diff --git a/tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.xml b/tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.xml new file mode 100644 index 0000000000..8c227c38a4 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-invalid-address-type.xml @@ -0,0 +1,20 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <iommu model='virtio'> + <address type='virtio-mmio'/> + </iommu> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 88863d94f3..f6ce8e0200 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3252,6 +3252,7 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-wrong-machine"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-no-acpi"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-invalid-address-type"); DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", -- 2.35.1

virtio-iommu needs to be an integrated device, and our address assignment code will make sure that is the case. If the user has provided an explicit address, however, we should make sure any addresses pointing to a different bus are rejected. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- ...io-iommu-invalid-address.x86_64-latest.err | 1 + .../virtio-iommu-invalid-address.xml | 20 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 22 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml diff --git a/tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-latest.err b/tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-latest.err new file mode 100644 index 0000000000..997948e91f --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-latest.err @@ -0,0 +1 @@ +XML error: The device at PCI address 0000:01:00.0 needs to be an integrated device (bus=0) diff --git a/tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml b/tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml new file mode 100644 index 0000000000..0daa58e3e7 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml @@ -0,0 +1,20 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <iommu model='virtio'> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </iommu> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f6ce8e0200..44b71b48e4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3253,6 +3253,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-wrong-machine"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-no-acpi"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-invalid-address-type"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-invalid-address"); DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", -- 2.35.1

https://bugzilla.redhat.com/show_bug.cgi?id=1653327 Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/qemu/qemu_command.c | 12 ++++++++++++ .../virtio-iommu-aarch64.aarch64-latest.args | 1 + .../virtio-iommu-x86_64.x86_64-latest.args | 1 + 3 files changed, 14 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a6d4bb1cb1..ea8a18a05b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6452,6 +6452,18 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, return 0; case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + if (virJSONValueObjectAdd(&props, + "s:driver", "virtio-iommu", + NULL) < 0) { + return -1; + } + + if (qemuBuildDeviceAddressProps(props, def, &iommu->info) < 0) + return -1; + + if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps) < 0) + return -1; + return 0; case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: diff --git a/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args index 917451d6f2..a9e45ab87f 100644 --- a/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args +++ b/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args @@ -30,6 +30,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -rtc base=utc \ -no-shutdown \ -boot strict=on \ +-device '{"driver":"virtio-iommu","bus":"pcie.0","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args index be06ea9957..7e0aa7192d 100644 --- a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args @@ -26,6 +26,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -rtc base=utc \ -no-shutdown \ -boot strict=on \ +-device '{"driver":"virtio-iommu","bus":"pcie.0","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on -- 2.35.1

On a Friday in 2022, Andrea Bolognani wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1653327
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/qemu/qemu_command.c | 12 ++++++++++++ .../virtio-iommu-aarch64.aarch64-latest.args | 1 + .../virtio-iommu-x86_64.x86_64-latest.args | 1 + 3 files changed, 14 insertions(+)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- docs/formatdomain.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f2958cd848..c67dcfb4bf 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -8066,8 +8066,9 @@ Example: ... ``model`` - Supported values are ``intel`` (for Q35 guests) and, :since:`since 5.5.0` , - ``smmuv3`` (for ARM virt guests). + Supported values are ``intel`` (for Q35 guests) ``smmuv3`` + (:since:`since 5.5.0`, for ARM virt guests), and ``virtio`` + (:since:`since 8.3.0`, for Q35 and ARM virt guests). ``driver`` The ``driver`` subelement can be used to configure additional options, some -- 2.35.1

Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- NEWS.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 406dfa4037..7ad8b9ec0b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,10 @@ v8.3.0 (unreleased) * **New features** + * qemu: Introduce support for virtio-iommu + + This IOMMU device can be used with both Q35 and ARM virt guests. + * **Improvements** * **Bug fixes** -- 2.35.1
participants (2)
-
Andrea Bolognani
-
Ján Tomko