[libvirt PATCHv2 0/7] qemu: introduce amd-iommu support

Ján Tomko (7): qemu: introduce QEMU_CAPS_AMD_IOMMU qemu: introduce QEMU_CAPS_PCI_ID qemu: add IOMMU model amd docs: formatdomain: document intel-only IOMMU attributes conf: add passthrough and xtsup attributes for IOMMU conf: reject some attributes not applicable to intel IOMMU qemu: format pt and xstup on the command line docs/formatdomain.rst | 22 +++- src/conf/domain_conf.c | 31 +++++ src/conf/domain_conf.h | 3 + src/conf/domain_validate.c | 22 ++++ src/conf/schemas/domaincommon.rng | 11 ++ src/qemu/qemu_capabilities.c | 10 ++ src/qemu/qemu_capabilities.h | 2 + src/qemu/qemu_command.c | 30 +++++ src/qemu/qemu_domain_address.c | 4 + src/qemu/qemu_validate.c | 22 ++++ .../caps_10.0.0_x86_64+amdsev.replies | 102 +++++++++++------ .../caps_10.0.0_x86_64+amdsev.xml | 1 + .../caps_10.0.0_x86_64.replies | 106 ++++++++++++------ .../caps_10.0.0_x86_64.xml | 2 + .../caps_6.2.0_x86_64.replies | 102 +++++++++++------ .../caps_6.2.0_x86_64.xml | 1 + .../caps_7.0.0_x86_64.replies | 80 +++++++------ .../caps_7.0.0_x86_64.xml | 1 + .../caps_7.1.0_x86_64.replies | 102 +++++++++++------ .../caps_7.1.0_x86_64.xml | 1 + .../caps_7.2.0_x86_64+hvf.replies | 102 +++++++++++------ .../caps_7.2.0_x86_64+hvf.xml | 1 + .../caps_7.2.0_x86_64.replies | 102 +++++++++++------ .../caps_7.2.0_x86_64.xml | 1 + .../caps_8.0.0_x86_64.replies | 80 +++++++------ .../caps_8.0.0_x86_64.xml | 1 + .../caps_8.1.0_x86_64.replies | 102 +++++++++++------ .../caps_8.1.0_x86_64.xml | 1 + .../caps_8.2.0_x86_64.replies | 102 +++++++++++------ .../caps_8.2.0_x86_64.xml | 1 + .../caps_9.0.0_x86_64.replies | 80 +++++++------ .../caps_9.0.0_x86_64.xml | 1 + .../caps_9.1.0_x86_64.replies | 102 +++++++++++------ .../caps_9.1.0_x86_64.xml | 1 + .../caps_9.2.0_x86_64+amdsev.replies | 102 +++++++++++------ .../caps_9.2.0_x86_64+amdsev.xml | 1 + .../caps_9.2.0_x86_64.replies | 102 +++++++++++------ .../caps_9.2.0_x86_64.xml | 1 + .../amd-iommu.x86_64-latest.args | 35 ++++++ .../amd-iommu.x86_64-latest.xml | 1 + tests/qemuxmlconfdata/amd-iommu.xml | 39 +++++++ tests/qemuxmlconftest.c | 2 + 42 files changed, 1161 insertions(+), 454 deletions(-) create mode 100644 tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args create mode 120000 tests/qemuxmlconfdata/amd-iommu.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/amd-iommu.xml -- 2.49.0

From: Ján Tomko <jtomko@redhat.com> Check for the presence of the amd-iommu device, so we can conditionalize probing for its properties. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml | 1 + tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml | 1 + tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml | 1 + tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml | 1 + 16 files changed, 17 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 39cf23ebe7..5870d2fc76 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -734,6 +734,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "virtio-scsi.iothread-mapping", /* QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING */ "machine.virt.highmem-mmio-size", /* QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE */ "bus-floppy", /* QEMU_CAPS_BUS_FLOPPY */ + "amd-iommu", /* QEMU_CAPS_AMD_IOMMU */ ); @@ -1423,6 +1424,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "sev-snp-guest", QEMU_CAPS_SEV_SNP_GUEST }, { "acpi-erst", QEMU_CAPS_DEVICE_ACPI_ERST }, { "virtio-mem-ccw", QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW }, + { "amd-iommu", QEMU_CAPS_AMD_IOMMU }, }; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 814ad222ae..2895b5ad8b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -715,6 +715,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING, /* virtio-scsi supports per-virtqueue iothread mapping */ QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE, /* -machine virt,highmem-mmio-size=<size> */ QEMU_CAPS_BUS_FLOPPY, /* floppy bus supported (isa-fdc/sysbus-fdc) */ + QEMU_CAPS_AMD_IOMMU, /* -device amd-iommu */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml index 8da17978fb..e9a4b3c50b 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml @@ -206,6 +206,7 @@ <flag name='shim'/> <flag name='virtio-scsi.iothread-mapping'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>10000000</version> <microcodeVersion>43100285</microcodeVersion> <package>v10.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml index 09332805f2..706fc79baa 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml @@ -205,6 +205,7 @@ <flag name='shim'/> <flag name='virtio-scsi.iothread-mapping'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>10000000</version> <microcodeVersion>43100285</microcodeVersion> <package>v10.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml index e638778ae4..d0c99c6730 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml @@ -173,6 +173,7 @@ <flag name='usb-mtp'/> <flag name='netdev.user'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>6002000</version> <microcodeVersion>43100244</microcodeVersion> <package>v6.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml index 74f2d2772e..16ab85126f 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml @@ -181,6 +181,7 @@ <flag name='acpi-erst'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>7000000</version> <microcodeVersion>43100243</microcodeVersion> <package>v7.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml index 750f992092..a4905644e1 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml @@ -186,6 +186,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>7001000</version> <microcodeVersion>43100244</microcodeVersion> <package>v7.1.0</package> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml index 942484e85c..32bf671942 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml @@ -190,6 +190,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>7002000</version> <microcodeVersion>43100245</microcodeVersion> <package>v7.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml index a40383c637..f618271889 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml @@ -190,6 +190,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>7002000</version> <microcodeVersion>43100245</microcodeVersion> <package>v7.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml index 7a7e567f35..d2a406566c 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml @@ -194,6 +194,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>8000000</version> <microcodeVersion>43100244</microcodeVersion> <package>v8.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml index b9c3952c48..c310291f8d 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml @@ -196,6 +196,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>8001000</version> <microcodeVersion>43100245</microcodeVersion> <package>v8.1.0</package> diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml index 669c9a2304..88da4fa1be 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml @@ -199,6 +199,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>8002000</version> <microcodeVersion>43100246</microcodeVersion> <package>v8.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml index b7bd10271a..95d6000ad1 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml @@ -201,6 +201,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>9000000</version> <microcodeVersion>43100245</microcodeVersion> <package>v9.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml index aed9ba6564..ec8d226db0 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml @@ -200,6 +200,7 @@ <flag name='machine-i8042-opt'/> <flag name='migrate-incoming.exit-on-error'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>9001000</version> <microcodeVersion>43100246</microcodeVersion> <package>v9.1.0</package> diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml index 96426a28a7..6b4c9eee83 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml +++ b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml @@ -204,6 +204,7 @@ <flag name='netdev-stream-reconnect-miliseconds'/> <flag name='migrate-incoming.exit-on-error'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>9002000</version> <microcodeVersion>43100247</microcodeVersion> <package>v9.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml index adb9202ff2..f26ebd5480 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml @@ -202,6 +202,7 @@ <flag name='netdev-stream-reconnect-miliseconds'/> <flag name='migrate-incoming.exit-on-error'/> <flag name='bus-floppy'/> + <flag name='amd-iommu'/> <version>9002000</version> <microcodeVersion>43100247</microcodeVersion> <package>v9.2.0</package> -- 2.49.0

From: Ján Tomko <jtomko@redhat.com> Introduced by QEMU commit f864a3235ea1d1d714b3cde2d9a810ea6344a7b5 the presence of this attribute allows libvirt to specify the alias of the AMDVI-PCI device explicitly. (It was implicit before the introduction of this attribute) Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_capabilities.c | 8 ++ src/qemu/qemu_capabilities.h | 1 + .../caps_10.0.0_x86_64+amdsev.replies | 102 +++++++++++------ .../caps_10.0.0_x86_64.replies | 106 ++++++++++++------ .../caps_10.0.0_x86_64.xml | 1 + .../caps_6.2.0_x86_64.replies | 102 +++++++++++------ .../caps_7.0.0_x86_64.replies | 80 +++++++------ .../caps_7.1.0_x86_64.replies | 102 +++++++++++------ .../caps_7.2.0_x86_64+hvf.replies | 102 +++++++++++------ .../caps_7.2.0_x86_64.replies | 102 +++++++++++------ .../caps_8.0.0_x86_64.replies | 80 +++++++------ .../caps_8.1.0_x86_64.replies | 102 +++++++++++------ .../caps_8.2.0_x86_64.replies | 102 +++++++++++------ .../caps_9.0.0_x86_64.replies | 80 +++++++------ .../caps_9.1.0_x86_64.replies | 102 +++++++++++------ .../caps_9.2.0_x86_64+amdsev.replies | 102 +++++++++++------ .../caps_9.2.0_x86_64.replies | 102 +++++++++++------ 17 files changed, 928 insertions(+), 448 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5870d2fc76..7318b06e7c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -735,6 +735,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "machine.virt.highmem-mmio-size", /* QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE */ "bus-floppy", /* QEMU_CAPS_BUS_FLOPPY */ "amd-iommu", /* QEMU_CAPS_AMD_IOMMU */ + "amd-iommu.pci-id", /* QEMU_CAPS_AMD_IOMMU_PCI_ID */ ); @@ -1571,6 +1572,10 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBlkCCW[] = { "loadparm", QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM, NULL }, }; +static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsAMDIOMMU[] = { + { "pci-id", QEMU_CAPS_AMD_IOMMU_PCI_ID, NULL }, +}; + /* see documentation for virQEMUQAPISchemaPathGet for the query format */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { { "blockdev-add/arg-type/+file/drop-cache", QEMU_CAPS_MIGRATION_FILE_DROP_CACHE }, @@ -1732,6 +1737,9 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDeviceProps[] = { { "virtio-blk-ccw", virQEMUCapsDevicePropsVirtioBlkCCW, G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioBlkCCW), QEMU_CAPS_VIRTIO_CCW }, + { "amd-iommu", virQEMUCapsDevicePropsAMDIOMMU, + G_N_ELEMENTS(virQEMUCapsDevicePropsAMDIOMMU), + QEMU_CAPS_AMD_IOMMU }, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2895b5ad8b..c18288d0ca 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -716,6 +716,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE, /* -machine virt,highmem-mmio-size=<size> */ QEMU_CAPS_BUS_FLOPPY, /* floppy bus supported (isa-fdc/sysbus-fdc) */ QEMU_CAPS_AMD_IOMMU, /* -device amd-iommu */ + QEMU_CAPS_AMD_IOMMU_PCI_ID, /* amd-iommu.pci-id */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.replies b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.replies index d781b12ed2..327999a524 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.replies +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.replies @@ -32164,12 +32164,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -32259,7 +32297,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -32267,7 +32305,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -32346,7 +32384,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -32354,7 +32392,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -34527,12 +34565,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -35188,7 +35226,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -35196,7 +35234,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -35315,7 +35353,7 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -35323,7 +35361,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -35530,12 +35568,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -37312,12 +37350,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -37325,12 +37363,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -37338,12 +37376,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -38866,12 +38904,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -38965,12 +39003,12 @@ "capability": "mapped-ram" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -38981,16 +39019,16 @@ "pdh": "AQAAAAE3AAADEAAAAwAAAAIAAAAZzB1NV5cz0ISI+tYZQHDF/dw77x1Zz+u2jw0cUf+KR3u958kjxZlN5IFNIo7sUgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8eYMemS1wynFwgVIgw9ZdHI+6qmsr91sCHKjJHGGBLRF3DHGYtdCLEsYQCVmJQywAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhAAAAIAAAC/3y8ro5AhFTmPkAnaWckGQXhPEnSKInCUEpNnGgufIttDMtWgsjaAX7Jve/Hjcg8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADe6oGDni6/LfA/HHDe0vBW4xoma82CBGyydXkq/PJfhO6fra1H9symYAiEd6db4n8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "cpu0-id": "BlAwmcr4Ruya3YvEGe2EBxuWjMAfIYolslNNM92RsIKxLkWDDRqivqSBOD+qQRCYS9joBYSHMD1g+rmjY+MmVw==" }, - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "Could not open '/dev/sgx_vepc': No such file or directory" @@ -39005,7 +39043,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39406,7 +39444,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39420,7 +39458,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39821,7 +39859,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39836,7 +39874,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -40348,7 +40386,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.replies index 6b2a2c2af7..ddcdee8464 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.replies @@ -32097,12 +32097,54 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + }, + { + "name": "pci-id", + "type": "str" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -32196,7 +32238,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -32204,7 +32246,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -32283,7 +32325,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -32291,7 +32333,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -34464,12 +34506,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -35125,7 +35167,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -35133,7 +35175,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -35252,7 +35294,7 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -35260,7 +35302,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -35467,12 +35509,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -38105,12 +38147,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -38118,12 +38160,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -38131,12 +38173,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -39659,12 +39701,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -39758,16 +39800,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -39776,11 +39818,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "Could not open '/dev/sgx_vepc': No such file or directory" @@ -39795,7 +39837,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -40196,7 +40238,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -40210,7 +40252,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -40611,7 +40653,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -40626,7 +40668,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -41138,7 +41180,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml index 706fc79baa..ed82896506 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml @@ -206,6 +206,7 @@ <flag name='virtio-scsi.iothread-mapping'/> <flag name='bus-floppy'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.pci-id'/> <version>10000000</version> <microcodeVersion>43100285</microcodeVersion> <package>v10.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies index b2b6bcdf0d..6d6072cab5 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.replies @@ -25740,12 +25740,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -25824,7 +25862,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -25832,7 +25870,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -25906,7 +25944,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -25914,7 +25952,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -27654,12 +27692,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -28142,7 +28180,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -28150,7 +28188,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -28253,7 +28291,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -28261,7 +28299,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -28425,12 +28463,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -30454,12 +30492,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -30467,12 +30505,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -30480,12 +30518,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -31805,12 +31843,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -31892,16 +31930,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -31910,11 +31948,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -31929,7 +31967,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32262,7 +32300,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32276,7 +32314,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -32609,7 +32647,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -32624,7 +32662,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -32957,7 +32995,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies index 1ad960c99b..16fad62b37 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.replies @@ -26276,12 +26276,28 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "error": { + "class": "DeviceNotFound", + "desc": "Device 'example-device' not found" + }, + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -26360,7 +26376,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -26368,7 +26384,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -26442,7 +26458,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -26450,7 +26466,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -28206,12 +28222,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -28712,7 +28728,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -28720,7 +28736,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -28823,7 +28839,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -28831,7 +28847,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -29008,12 +29024,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -31073,12 +31089,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -31086,12 +31102,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31099,12 +31115,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -32428,12 +32444,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -32515,16 +32531,16 @@ "capability": "background-snapshot" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -32533,7 +32549,7 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -32554,7 +32570,7 @@ } ] }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -32565,7 +32581,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32902,7 +32918,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32916,7 +32932,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33253,7 +33269,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33268,7 +33284,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -33605,7 +33621,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies index cd2116d05a..ff560438f9 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.replies @@ -26999,12 +26999,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -27083,7 +27121,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -27091,7 +27129,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -27165,7 +27203,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -27173,7 +27211,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -28966,12 +29004,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -29490,7 +29528,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -29498,7 +29536,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -29611,7 +29649,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -29619,7 +29657,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -29811,12 +29849,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -31755,12 +31793,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -31768,12 +31806,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31781,12 +31819,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -33110,12 +33148,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -33205,16 +33243,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -33223,11 +33261,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -33242,7 +33280,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -33580,7 +33618,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -33594,7 +33632,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33932,7 +33970,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33947,7 +33985,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -34285,7 +34323,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies index c85be45cd1..e0a72f7ad9 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.replies @@ -27968,12 +27968,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -28057,7 +28095,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -28065,7 +28103,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -28144,7 +28182,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -28152,7 +28190,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -29945,12 +29983,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -30487,7 +30525,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -30495,7 +30533,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -30608,7 +30646,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -30616,7 +30654,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -30808,12 +30846,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -32752,12 +32790,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -32765,12 +32803,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -32778,12 +32816,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -34107,12 +34145,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -34202,16 +34240,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -34220,11 +34258,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -34239,7 +34277,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34577,7 +34615,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34591,7 +34629,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -34929,7 +34967,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -34944,7 +34982,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -35282,7 +35320,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies index 4b56adeafa..fd6578b1c5 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.replies @@ -27968,12 +27968,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -28057,7 +28095,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -28065,7 +28103,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -28144,7 +28182,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -28152,7 +28190,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -29945,12 +29983,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -30487,7 +30525,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -30495,7 +30533,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -30608,7 +30646,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -30616,7 +30654,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -30808,12 +30846,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -32752,12 +32790,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -32765,12 +32803,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -32778,12 +32816,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -34107,12 +34145,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -34202,16 +34240,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -34220,11 +34258,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -34239,7 +34277,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34577,7 +34615,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -34591,7 +34629,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -34929,7 +34967,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -34944,7 +34982,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -35282,7 +35320,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies index 4cad376388..b070a5e569 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.replies @@ -29339,12 +29339,28 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "error": { + "class": "DeviceNotFound", + "desc": "Device 'example-device' not found" + }, + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -29428,7 +29444,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -29436,7 +29452,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -29515,7 +29531,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -29523,7 +29539,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -31340,12 +31356,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -31961,7 +31977,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -31969,7 +31985,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -32082,7 +32098,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -32090,7 +32106,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -32282,12 +32298,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -34333,12 +34349,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -34346,12 +34362,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -34359,12 +34375,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -35805,12 +35821,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -35900,16 +35916,16 @@ "capability": "postcopy-preempt" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -35918,11 +35934,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -35937,7 +35953,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -36280,7 +36296,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -36294,7 +36310,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -36637,7 +36653,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -36652,7 +36668,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -37101,7 +37117,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies index 888a5d3b6a..6f5297b470 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.replies @@ -30094,12 +30094,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -30188,7 +30226,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -30196,7 +30234,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -30275,7 +30313,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -30283,7 +30321,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -32180,12 +32218,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -32821,7 +32859,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -32829,7 +32867,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -32942,7 +32980,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -32950,7 +32988,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -33138,12 +33176,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -35525,12 +35563,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -35538,12 +35576,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -35551,12 +35589,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -37014,12 +37052,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -37117,16 +37155,16 @@ "capability": "dirty-limit" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -37135,11 +37173,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -37154,7 +37192,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -37517,7 +37555,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -37531,7 +37569,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -37894,7 +37932,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -37909,7 +37947,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -38378,7 +38416,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies index 33e4978c38..8a3c54f915 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.replies @@ -30785,12 +30785,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -30884,7 +30922,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -30892,7 +30930,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -30971,7 +31009,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -30979,7 +31017,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -32892,12 +32930,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -33513,7 +33551,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -33521,7 +33559,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -33634,7 +33672,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -33642,7 +33680,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -33830,12 +33868,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -36217,12 +36255,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -36230,12 +36268,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -36243,12 +36281,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -37719,12 +37757,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -37822,16 +37860,16 @@ "capability": "dirty-limit" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -37840,11 +37878,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -37859,7 +37897,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38226,7 +38264,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38240,7 +38278,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -38607,7 +38645,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -38622,7 +38660,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -39095,7 +39133,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies index 89fefb863b..638313f857 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.replies @@ -31003,12 +31003,28 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "error": { + "class": "DeviceNotFound", + "desc": "Device 'example-device' not found" + }, + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31102,7 +31118,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31110,7 +31126,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -31189,7 +31205,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -31197,7 +31213,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -33114,12 +33130,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -33755,7 +33771,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -33763,7 +33779,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -33876,7 +33892,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -33884,7 +33900,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -34076,12 +34092,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -36463,12 +36479,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -36476,12 +36492,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -36489,12 +36505,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -37969,12 +37985,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -38076,16 +38092,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -38094,11 +38110,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SGX is not enabled in KVM" @@ -38113,7 +38129,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38481,7 +38497,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38495,7 +38511,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -38863,7 +38879,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -38878,7 +38894,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -39352,7 +39368,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies index 4838037ee7..47575075bd 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.replies @@ -31390,12 +31390,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31489,7 +31527,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31497,7 +31535,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -31576,7 +31614,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -31584,7 +31622,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -33633,12 +33671,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -34254,7 +34292,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -34262,7 +34300,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -34375,7 +34413,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -34383,7 +34421,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -34575,12 +34613,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -37131,12 +37169,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -37144,12 +37182,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -37157,12 +37195,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -38645,12 +38683,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -38744,16 +38782,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -38762,11 +38800,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "Could not open '/dev/sgx_vepc': No such file or directory" @@ -38781,7 +38819,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39159,7 +39197,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39173,7 +39211,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39551,7 +39589,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39566,7 +39604,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -40054,7 +40092,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.replies b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.replies index 9d074f5843..be063de8aa 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.replies +++ b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.replies @@ -31834,12 +31834,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31933,7 +31971,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31941,7 +31979,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -32020,7 +32058,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -32028,7 +32066,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -34170,12 +34208,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -34821,7 +34859,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -34829,7 +34867,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -34947,7 +34985,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -34955,7 +34993,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -35153,12 +35191,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -36783,12 +36821,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -36796,12 +36834,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -36809,12 +36847,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -38327,12 +38365,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -38426,12 +38464,12 @@ "capability": "mapped-ram" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -38442,16 +38480,16 @@ "pdh": "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", "cpu0-id": "BlAwmcr4Ruya3YvEGe2EBxuWjMAfIYolslNNM92RsIKxLkWDDRqivqSBOD+qQRCYS9joBYSHMD1g+rmjY+MmVw==" }, - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "Could not open '/dev/sgx_vepc': No such file or directory" @@ -38466,7 +38504,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38866,7 +38904,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -38880,7 +38918,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39280,7 +39318,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39295,7 +39333,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -39806,7 +39844,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.replies b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.replies index 6b2ecb40d0..eaff01aba7 100644 --- a/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_9.2.0_x86_64.replies @@ -31726,12 +31726,50 @@ "id": "libvirt-35" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "amd-iommu" + }, + "id": "libvirt-36" +} + +{ + "return": [ + { + "default-value": true, + "name": "pt", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "device-iotlb", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "intremap", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "xtsup", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-36" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31825,7 +31863,7 @@ "type": "bool" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -31833,7 +31871,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -31912,7 +31950,7 @@ "type": "int" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -31920,7 +31958,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -34062,12 +34100,12 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-machines", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -34703,7 +34741,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -34711,7 +34749,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -34829,7 +34867,7 @@ "type": "child<container>" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -34837,7 +34875,7 @@ "arguments": { "typename": "generic-pc-machine" }, - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -35035,12 +35073,12 @@ "type": "bool" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-cpu-definitions", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -37483,12 +37521,12 @@ "deprecated": false } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-tpm-models", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -37496,12 +37534,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-types", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -37509,12 +37547,12 @@ "passthrough", "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-command-line-options", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -39007,12 +39045,12 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-migrate-capabilities", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -39106,16 +39144,16 @@ "capability": "mapped-ram" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-sev-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { - "id": "libvirt-47", + "id": "libvirt-48", "error": { "class": "GenericError", "desc": "SEV: Failed to open /dev/sev: No such file or directory" @@ -39124,11 +39162,11 @@ { "execute": "query-sgx-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "Could not open '/dev/sgx_vepc': No such file or directory" @@ -39143,7 +39181,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39543,7 +39581,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -39557,7 +39595,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39957,7 +39995,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -39972,7 +40010,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { @@ -40483,7 +40521,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } { -- 2.49.0

From: Ján Tomko <jtomko@redhat.com> Introduce a new IOMMU device model 'amd', both the parser and the formatter for QEMU because of our enum warnings. https://issues.redhat.com/browse/RHEL-50560 Signed-off-by: Ján Tomko <jtomko@redhat.com> --- docs/formatdomain.rst | 5 ++- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 13 +++++++ src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_command.c | 28 +++++++++++++ src/qemu/qemu_domain_address.c | 4 ++ src/qemu/qemu_validate.c | 22 +++++++++++ .../amd-iommu.x86_64-latest.args | 35 +++++++++++++++++ .../amd-iommu.x86_64-latest.xml | 1 + tests/qemuxmlconfdata/amd-iommu.xml | 39 +++++++++++++++++++ tests/qemuxmlconftest.c | 2 + 12 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args create mode 120000 tests/qemuxmlconfdata/amd-iommu.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/amd-iommu.xml diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 8753ee9c23..4bd82e4f5f 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -9048,8 +9048,9 @@ Example: ``model`` 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). + (:since:`since 5.5.0`, for ARM virt guests), ``virtio`` + (:since:`since 8.3.0`, for Q35 and ARM virt guests) and + ``amd`` (:since:`since 11.5.0`). ``driver`` The ``driver`` subelement can be used to configure additional options, some diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b3b0bd7329..2e7454f4d6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1350,6 +1350,7 @@ VIR_ENUM_IMPL(virDomainIOMMUModel, "intel", "smmuv3", "virtio", + "amd", ); VIR_ENUM_IMPL(virDomainVsockModel, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 58b97a2b54..bcac061aa6 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3005,6 +3005,7 @@ typedef enum { VIR_DOMAIN_IOMMU_MODEL_INTEL, VIR_DOMAIN_IOMMU_MODEL_SMMUV3, VIR_DOMAIN_IOMMU_MODEL_VIRTIO, + VIR_DOMAIN_IOMMU_MODEL_AMD, VIR_DOMAIN_IOMMU_MODEL_LAST } virDomainIOMMUModel; diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index d0d4bc0bf4..a7e982bec1 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -3080,6 +3080,18 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu) } break; + case VIR_DOMAIN_IOMMU_MODEL_AMD: + if (iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT || + iommu->eim != VIR_TRISTATE_SWITCH_ABSENT || + iommu->aw_bits != 0 || + iommu->dma_translation != VIR_TRISTATE_SWITCH_ABSENT) { + virReportError(VIR_ERR_XML_ERROR, + _("iommu model '%1$s' doesn't support some additional attributes"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } + break; + case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_LAST: break; @@ -3097,6 +3109,7 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu) break; case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + case VIR_DOMAIN_IOMMU_MODEL_AMD: case VIR_DOMAIN_IOMMU_MODEL_LAST: break; } diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 5597d5a66b..f135e6f1d7 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -6190,6 +6190,7 @@ <value>intel</value> <value>smmuv3</value> <value>virtio</value> + <value>amd</value> </choice> </attribute> <interleave> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fec48edfc1..e2517863b5 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6134,6 +6134,7 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, virQEMUCaps *qemuCaps) { g_autoptr(virJSONValue) props = NULL; + g_autoptr(virJSONValue) wrapperProps = NULL; const virDomainIOMMUDef *iommu = def->iommu; if (!iommu) @@ -6178,6 +6179,32 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, /* There is no -device for SMMUv3, so nothing to be done here */ return 0; + case VIR_DOMAIN_IOMMU_MODEL_AMD: + if (virJSONValueObjectAdd(&wrapperProps, + "s:driver", "AMDVI-PCI", + "s:id", iommu->info.alias, + NULL) < 0) + return -1; + + if (qemuBuildDeviceAddressProps(wrapperProps, def, &iommu->info) < 0) + return -1; + + if (qemuBuildDeviceCommandlineFromJSON(cmd, wrapperProps, def, qemuCaps) < 0) + return -1; + + if (virJSONValueObjectAdd(&props, + "s:driver", "amd-iommu", + "s:pci-id", iommu->info.alias, + "S:intremap", qemuOnOffAuto(iommu->intremap), + "T:device-iotlb", iommu->iotlb, + NULL) < 0) + return -1; + + if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps) < 0) + return -1; + + return 0; + case VIR_DOMAIN_IOMMU_MODEL_LAST: default: virReportEnumRangeError(virDomainIOMMUModel, iommu->model); @@ -7010,6 +7037,7 @@ qemuBuildMachineCommandLine(virCommand *cmd, case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + case VIR_DOMAIN_IOMMU_MODEL_AMD: /* These IOMMUs are formatted in qemuBuildIOMMUCommandLine */ break; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index e89cdee487..7b65abac82 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -941,6 +941,9 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev, case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: return virtioFlags | VIR_PCI_CONNECT_INTEGRATED; + case VIR_DOMAIN_IOMMU_MODEL_AMD: + return pciFlags | VIR_PCI_CONNECT_INTEGRATED; + case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: case VIR_DOMAIN_IOMMU_MODEL_LAST: @@ -2359,6 +2362,7 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, switch (iommu->model) { case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + case VIR_DOMAIN_IOMMU_MODEL_AMD: if (virDeviceInfoPCIAddressIsWanted(&iommu->info) && qemuDomainPCIAddressReserveNextAddr(addrs, &iommu->info) < 0) { return -1; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index e45f636418..d15673f9cf 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -5234,6 +5234,28 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, } break; + case VIR_DOMAIN_IOMMU_MODEL_AMD: + if (!qemuDomainIsQ35(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("IOMMU device: '%1$s' is only supported with Q35 machines"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AMD_IOMMU_PCI_ID)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("IOMMU device: '%1$s' is not supported with this QEMU binary"), + 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: '%1$s' needs a PCI address"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } + break; + case VIR_DOMAIN_IOMMU_MODEL_LAST: default: virReportEnumRangeError(virDomainIOMMUModel, iommu->model); diff --git a/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args b/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args new file mode 100644 index 0000000000..36244edb3a --- /dev/null +++ b/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args @@ -0,0 +1,35 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/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":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=off,kernel_irqchip=split,dump-guest-core=off,memory-backend=pc.ram,acpi=on \ +-accel kvm \ +-cpu qemu64 \ +-m size=219136k \ +-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 \ +-device '{"driver":"AMDVI-PCI","id":"iommu0","bus":"pcie.0","addr":"0x1"}' \ +-device '{"driver":"amd-iommu","pci-id":"iommu0","intremap":"on","device-iotlb":true}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-global ICH9-LPC.noreboot=off \ +-watchdog-action reset \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.xml b/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.xml new file mode 120000 index 0000000000..5ba3d4b91b --- /dev/null +++ b/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.xml @@ -0,0 +1 @@ +amd-iommu.xml \ No newline at end of file diff --git a/tests/qemuxmlconfdata/amd-iommu.xml b/tests/qemuxmlconfdata/amd-iommu.xml new file mode 100644 index 0000000000..0668ed4237 --- /dev/null +++ b/tests/qemuxmlconfdata/amd-iommu.xml @@ -0,0 +1,39 @@ +<domain type='kvm'> + <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/> + <ioapic driver='qemu'/> + </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='pci' index='0' model='pcie-root'/> + <controller type='usb' index='0' model='none'/> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <watchdog model='itco' action='reset'/> + <memballoon model='none'/> + <iommu model='amd'> + <driver intremap='on' iotlb='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </iommu> + </devices> +</domain> diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 9a29262d1b..368fb02b0f 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -2753,6 +2753,8 @@ mymain(void) DO_TEST_CAPS_LATEST("acpi-table"); DO_TEST_CAPS_LATEST("acpi-table-many"); + DO_TEST_CAPS_LATEST("amd-iommu"); + DO_TEST_CAPS_LATEST("intel-iommu"); DO_TEST_CAPS_LATEST("intel-iommu-caching-mode"); DO_TEST_CAPS_LATEST("intel-iommu-eim"); -- 2.49.0

From: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com> --- docs/formatdomain.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 4bd82e4f5f..1fa814931f 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -9065,14 +9065,15 @@ Example: ``caching_mode`` The ``caching_mode`` attribute with possible values ``on`` and ``off`` can be used to turn on the VT-d caching mode (useful for assigned devices). - :since:`Since 3.4.0` (QEMU/KVM only) + :since:`Since 3.4.0` (QEMU/KVM and ``intel`` model only) ``eim`` The ``eim`` attribute (with possible values ``on`` and ``off``) can be used to configure Extended Interrupt Mode. A q35 domain with split I/O APIC (as described in `Hypervisor features`_), and both interrupt remapping and EIM turned on for the IOMMU, will be able to - use more than 255 vCPUs. :since:`Since 3.4.0` (QEMU/KVM only) + use more than 255 vCPUs. :since:`Since 3.4.0` (QEMU/KVM and ``intel`` model + only) ``iotlb`` The ``iotlb`` attribute with possible values ``on`` and ``off`` can be @@ -9082,14 +9083,14 @@ Example: ``aw_bits`` The ``aw_bits`` attribute can be used to set the address width to allow mapping larger iova addresses in the guest. :since:`Since 6.5.0` (QEMU/KVM - only) + and ``intel`` model only) ``dma_translation`` The ``dma_translation`` attribute with possible values ``on`` and ``off`` can be used to turn off the dma translation for IOMMU. It is useful when only interrupt remapping is required but dma translation overhead is unwanted, for example to efficiently enable more than 255 vCPUs. - :since:`Since 10.7.0` (QEMU/KVM only) + :since:`Since 10.7.0` (QEMU/KVM and ``intel`` model only) The ``virtio`` IOMMU devices can further have ``address`` element as described in `Device addresses`_ (address has to by type of ``pci``). -- 2.49.0

From: Ján Tomko <jtomko@redhat.com> For the newly supported AMD device. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- docs/formatdomain.rst | 8 ++++++++ src/conf/domain_conf.c | 30 +++++++++++++++++++++++++++++ src/conf/domain_conf.h | 2 ++ src/conf/schemas/domaincommon.rng | 10 ++++++++++ tests/qemuxmlconfdata/amd-iommu.xml | 2 +- 5 files changed, 51 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 1fa814931f..7af14c656f 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -9092,6 +9092,14 @@ Example: example to efficiently enable more than 255 vCPUs. :since:`Since 10.7.0` (QEMU/KVM and ``intel`` model only) + ``passthrough`` + Enable passthrough. In this mode, DMA read/writes are not translated. + :since:`Since 11.5.0` (QEMU/KVM and ``amd`` model only) + + ``xtsup`` + Enable x2APIC mode. Useful for higher number of guest CPUs. + :since:`Since 11.5.0` (QEMU/KVM and ``amd`` model only) + The ``virtio`` IOMMU devices can further have ``address`` element as described in `Device addresses`_ (address has to by type of ``pci``). diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2e7454f4d6..c20fe0e241 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14333,6 +14333,14 @@ virDomainIOMMUDefParseXML(virDomainXMLOption *xmlopt, if (virXMLPropTristateSwitch(driver, "dma_translation", VIR_XML_PROP_NONE, &iommu->dma_translation) < 0) return NULL; + + if (virXMLPropTristateSwitch(driver, "xtsup", VIR_XML_PROP_NONE, + &iommu->xtsup) < 0) + return NULL; + + if (virXMLPropTristateSwitch(driver, "passthrough", VIR_XML_PROP_NONE, + &iommu->pt) < 0) + return NULL; } if (virDomainDeviceInfoParseXML(xmlopt, node, ctxt, @@ -21963,6 +21971,20 @@ virDomainIOMMUDefCheckABIStability(virDomainIOMMUDef *src, virTristateSwitchTypeToString(src->dma_translation)); return false; } + if (src->pt != dst->pt) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target domain IOMMU device dma translation '%1$s' does not match source '%2$s'"), + virTristateSwitchTypeToString(dst->pt), + virTristateSwitchTypeToString(src->pt)); + return false; + } + if (src->xtsup != dst->xtsup) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target domain IOMMU device dma translation '%1$s' does not match source '%2$s'"), + virTristateSwitchTypeToString(dst->xtsup), + virTristateSwitchTypeToString(src->xtsup)); + return false; + } return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info); } @@ -28190,6 +28212,14 @@ virDomainIOMMUDefFormat(virBuffer *buf, virBufferAsprintf(&driverAttrBuf, " dma_translation='%s'", virTristateSwitchTypeToString(iommu->dma_translation)); } + if (iommu->pt != VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(&driverAttrBuf, " passthrough='%s'", + virTristateSwitchTypeToString(iommu->pt)); + } + if (iommu->xtsup != VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(&driverAttrBuf, " xtsup='%s'", + virTristateSwitchTypeToString(iommu->xtsup)); + } virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index bcac061aa6..d1ee598eb0 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3019,6 +3019,8 @@ struct _virDomainIOMMUDef { unsigned int aw_bits; virDomainDeviceInfo info; virTristateSwitch dma_translation; + virTristateSwitch xtsup; + virTristateSwitch pt; }; typedef enum { diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index f135e6f1d7..b180ab46c7 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -6226,6 +6226,16 @@ <ref name="virOnOff"/> </attribute> </optional> + <optional> + <attribute name="xtsup"> + <ref name="virOnOff"/> + </attribute> + </optional> + <optional> + <attribute name="passthrough"> + <ref name="virOnOff"/> + </attribute> + </optional> </element> </optional> <optional> diff --git a/tests/qemuxmlconfdata/amd-iommu.xml b/tests/qemuxmlconfdata/amd-iommu.xml index 0668ed4237..4ad79ce4ae 100644 --- a/tests/qemuxmlconfdata/amd-iommu.xml +++ b/tests/qemuxmlconfdata/amd-iommu.xml @@ -32,7 +32,7 @@ <watchdog model='itco' action='reset'/> <memballoon model='none'/> <iommu model='amd'> - <driver intremap='on' iotlb='on'/> + <driver intremap='on' iotlb='on' passthrough='on' xtsup='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </iommu> </devices> -- 2.49.0

From: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/conf/domain_validate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index a7e982bec1..9659b8900a 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -3093,6 +3093,15 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu) break; case VIR_DOMAIN_IOMMU_MODEL_INTEL: + if (iommu->pt != VIR_TRISTATE_SWITCH_ABSENT || + iommu->xtsup != VIR_TRISTATE_SWITCH_ABSENT) { + virReportError(VIR_ERR_XML_ERROR, + _("iommu model '%1$s' doesn't support some additional attributes"), + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } + break; + case VIR_DOMAIN_IOMMU_MODEL_LAST: break; } -- 2.49.0

From: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/qemu_command.c | 2 ++ tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e2517863b5..8f3548dc9d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6196,6 +6196,8 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, "s:driver", "amd-iommu", "s:pci-id", iommu->info.alias, "S:intremap", qemuOnOffAuto(iommu->intremap), + "T:pt", iommu->pt, + "T:xtsup", iommu->xtsup, "T:device-iotlb", iommu->iotlb, NULL) < 0) return -1; diff --git a/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args b/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args index 36244edb3a..20d7e379e6 100644 --- a/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args +++ b/tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args @@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -no-shutdown \ -boot strict=on \ -device '{"driver":"AMDVI-PCI","id":"iommu0","bus":"pcie.0","addr":"0x1"}' \ --device '{"driver":"amd-iommu","pci-id":"iommu0","intremap":"on","device-iotlb":true}' \ +-device '{"driver":"amd-iommu","pci-id":"iommu0","intremap":"on","pt":true,"xtsup":true,"device-iotlb":true}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -global ICH9-LPC.noreboot=off \ -watchdog-action reset \ -- 2.49.0
participants (1)
-
Ján Tomko