This commit introduces a new capability that reflects virtio-mem-pci
device support in QEMU:
QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */
The virtio-mem-pci device was introduced in QEMU 5.1.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 +
5 files changed, 6 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index d41b4a4753..ff6aa8f433 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -614,6 +614,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 390 */
"vhost-user-blk",
+ "virtio-mem-pci",
);
@@ -1335,6 +1336,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "am53c974", QEMU_CAPS_SCSI_AM53C974 },
{ "virtio-pmem-pci", QEMU_CAPS_DEVICE_VIRTIO_PMEM_PCI },
{ "vhost-user-blk", QEMU_CAPS_DEVICE_VHOST_USER_BLK },
+ { "virtio-mem-pci", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI },
};
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 8cb5673042..3531ff2982 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -594,6 +594,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 390 */
QEMU_CAPS_DEVICE_VHOST_USER_BLK, /* -device vhost-user-blk */
+ QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
index f7d0be69cb..2f5a1dac32 100644
--- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
@@ -251,6 +251,7 @@
<flag name='am53c974'/>
<flag name='virtio-pmem-pci'/>
<flag name='vhost-user-blk'/>
+ <flag name='virtio-mem-pci'/>
<version>5001000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100242</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
index 52a755ffc8..bbdbe9ca96 100644
--- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
@@ -252,6 +252,7 @@
<flag name='am53c974'/>
<flag name='virtio-pmem-pci'/>
<flag name='vhost-user-blk'/>
+ <flag name='virtio-mem-pci'/>
<version>5002000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100243</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
index fcc416206c..1c7492485d 100644
--- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
@@ -253,6 +253,7 @@
<flag name='virtio-pmem-pci'/>
<flag name='vhost-user-fs.bootindex'/>
<flag name='vhost-user-blk'/>
+ <flag name='virtio-mem-pci'/>
<version>5002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100242</microcodeVersion>
--
2.26.2