From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Check availability of "-object memory-backend-memfd".
Reviewed-by: John Ferlan <jferlan(a)redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
10 files changed, 11 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index e04a3d775f..d866fbc183 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -508,6 +508,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
/* 315 */
"vfio-pci.display",
"blockdev",
+ "memory-backend-memfd",
);
@@ -1147,6 +1148,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "vhost-vsock-device", QEMU_CAPS_DEVICE_VHOST_VSOCK },
{ "mch", QEMU_CAPS_DEVICE_MCH },
{ "sev-guest", QEMU_CAPS_SEV_GUEST },
+ { "memory-backend-memfd", QEMU_CAPS_OBJECT_MEMORY_MEMFD },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index a0134493aa..b56d92c2f9 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -492,6 +492,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 315 */
QEMU_CAPS_VFIO_PCI_DISPLAY, /* -device vfio-pci.display */
QEMU_CAPS_BLOCKDEV, /* -blockdev and blockdev-add are supported */
+ QEMU_CAPS_OBJECT_MEMORY_MEMFD, /* -object memory-backend-memfd */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index 71c3d0f53f..e4de7da349 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -163,6 +163,7 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
+ <flag name='memory-backend-memfd'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>344910</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index d638663c75..ffe451b332 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -161,6 +161,7 @@
<flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
+ <flag name='memory-backend-memfd'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>425694</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index f1a154c4c4..7fa50bdfaa 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -129,6 +129,7 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
+ <flag name='memory-backend-memfd'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>374287</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 2bded9fc38..b3f6bdc302 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -204,6 +204,7 @@
<flag name='sev-guest'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
+ <flag name='memory-backend-memfd'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>413556</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
index ce70bbad61..f3df19fc33 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -161,6 +161,7 @@
<flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
+ <flag name='memory-backend-memfd'/>
<version>2012050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>444131</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
index f6e74ee7c6..bf04826ad0 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
@@ -101,6 +101,7 @@
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
+ <flag name='memory-backend-memfd'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
index b6b1bc12db..b5f8f94052 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
@@ -101,6 +101,7 @@
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
+ <flag name='memory-backend-memfd'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
index 1d910a9679..2f22fd10b6 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
@@ -206,6 +206,7 @@
<flag name='usb-storage.werror'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
+ <flag name='memory-backend-memfd'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>425157</microcodeVersion>
--
2.19.0