It will be used for the property "intremap" of the device amd-iommu. Signed-off-by: Han Han <hhan@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 8 ++++++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0_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 + 15 files changed, 22 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5ecee07a53..4fe354200d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -718,6 +718,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 465 */ "amd-iommu", /* QEMU_CAPS_DEVICE_AMD_IOMMU */ + "amd-iommu.intremap", /* QEMU_CAPS_AMD_IOMMU_INTREMAP */ ); @@ -1546,6 +1547,10 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioIOMMU[] = { "boot-bypass", QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS, NULL }, }; +static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsAmdIOMMU[] = { + { "intremap", QEMU_CAPS_AMD_IOMMU_INTREMAP, 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 }, @@ -1702,6 +1707,9 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDeviceProps[] = { { "virtio-iommu-pci", virQEMUCapsDevicePropsVirtioIOMMU, G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioIOMMU), QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI }, + { "amd-iommu", virQEMUCapsDevicePropsAmdIOMMU, + G_N_ELEMENTS(virQEMUCapsDevicePropsAmdIOMMU), + QEMU_CAPS_DEVICE_AMD_IOMMU}, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3075fe069c..2b87b1ff97 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -697,6 +697,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 465 */ QEMU_CAPS_DEVICE_AMD_IOMMU, /* -device amd-iommu */ + QEMU_CAPS_AMD_IOMMU_INTREMAP, /* amd-iommu.intremap */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml index c46b023c78..2bbe431a54 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml @@ -162,6 +162,7 @@ <flag name='usb-mtp'/> <flag name='netdev.user'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <version>5002000</version> <microcodeVersion>43100243</microcodeVersion> <package>v5.2.0</package> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml index a189694f3b..ed5415ac50 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml @@ -174,6 +174,7 @@ <flag name='usb-mtp'/> <flag name='netdev.user'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <version>6000000</version> <microcodeVersion>43100242</microcodeVersion> <package>v6.0.0</package> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml index 641841d02d..208378cd3d 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml @@ -180,6 +180,7 @@ <flag name='usb-mtp'/> <flag name='netdev.user'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <version>6001000</version> <microcodeVersion>43100243</microcodeVersion> <package>v6.1.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 e7da931a73..d122272fd5 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml @@ -182,6 +182,7 @@ <flag name='usb-mtp'/> <flag name='netdev.user'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 3218c5aa98..7a5c0d0bff 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml @@ -190,6 +190,7 @@ <flag name='acpi-erst'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 ade421305a..ae41f4a327 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml @@ -195,6 +195,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 f920f96d41..1f02202c1e 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml @@ -199,6 +199,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 3b23debd94..f24418b5bd 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml @@ -199,6 +199,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 1884221439..f80b9e9541 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml @@ -203,6 +203,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 1f2f91ce6f..6b1442e477 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml @@ -205,6 +205,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 ad68484130..f1b183ca7d 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml @@ -208,6 +208,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 f899773766..1caa710622 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml @@ -210,6 +210,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <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 4bdeaa7f62..62a2d48dce 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml @@ -208,6 +208,7 @@ <flag name='intel-iommu.dma-translation'/> <flag name='machine-i8042-opt'/> <flag name='amd-iommu'/> + <flag name='amd-iommu.intremap'/> <version>9001000</version> <microcodeVersion>43100246</microcodeVersion> <package>v9.1.0</package> -- 2.46.2