This capability tracks if memory-backend-file has pmem
attribute or not.
Signed-off-by: Luyao Zhong <luyao.zhong(a)intel.com>
---
src/qemu/qemu_capabilities.c | 4 ++++
src/qemu/qemu_capabilities.h | 3 +++
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 +
4 files changed, 9 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index db368b7..e5ae4b6 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -516,6 +516,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"machine.pseries.cap-nested-hv",
"egl-headless.rendernode",
"memory-backend-file.align",
+
+ /* 325 */
+ "memory-backend-file.pmem",
);
@@ -1367,6 +1370,7 @@ static virQEMUCapsObjectTypeProps virQEMUCapsDeviceProps[] = {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = {
{ "discard-data", QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD },
{ "align", QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN },
+ { "pmem", QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 9df4a87..84c5404 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -501,6 +501,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
QEMU_CAPS_EGL_HEADLESS_RENDERNODE, /* -display egl-headless,rendernode= */
QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN, /* -object memory-backend-file,align= */
+ /* 325 */
+ QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */
+
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
index 48f4fdf..175233a 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
@@ -167,6 +167,7 @@
<flag name='iothread.poll-max-ns'/>
<flag name='machine.pseries.cap-nested-hv'/>
<flag name='memory-backend-file.align'/>
+ <flag name='memory-backend-file.pmem'/>
<version>3000091</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>437731</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
index 6be80ce..faafbcd 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
@@ -210,6 +210,7 @@
<flag name='iothread.poll-max-ns'/>
<flag name='egl-headless.rendernode'/>
<flag name='memory-backend-file.align'/>
+ <flag name='memory-backend-file.pmem'/>
<version>3000092</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>440395</microcodeVersion>
--
2.7.4