From 73fc8c491eaf2c3559953a260ed21d955761ba56 Mon Sep 17 00:00:00 2001
From: Luyao Zhong
Date: Thu, 20 Dec 2018 17:14:41 +0800
Subject: [PATCH] conf: Introduce 'pmem' element into xml for NVDIMM memory
The 'pmem' option allows users to specify whether the backend
storage of memory-backend-file is a real persistent memory:
...
/dev/dax0.040940
...
Signed-off-by: Luyao Zhong
Reviewed-by: John Ferlan
---
docs/formatdomain.html.in | 24 ++++++++
docs/schemas/domaincommon.rng | 5 ++
src/conf/domain_conf.c | 13 +++++
src/conf/domain_conf.h | 1 +
.../memory-hotplug-nvdimm-pmem.xml | 58 +++++++++++++++++++
.../memory-hotplug-nvdimm-pmem.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
7 files changed, 103 insertions(+)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-pmem.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index a5d5a6fb24..0b1b478b2a 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -8332,6 +8332,19 @@ qemu-kvm -net nic,model=? /dev/null
</label>
</target>
</memory>
+ <memory model='nvdimm'>
+ <source>
+ <path>/dev/dax0.0</path>
+ <pmem/>
+ </source>
+ <target>
+ <size unit='KiB'>524288</size>
+ <node>1</node>
+ <label>
+ <size unit='KiB'>128</size>
+ </label>
+ </target>
+ </memory>
</devices>
...
@@ -8422,6 +8435,17 @@ qemu-kvm -net nic,model=? /dev/null
Since 5.0.0
+
+
pmem
+
+
+ If persistent memory is supported and enabled by the hypervisor
+ in order to guarantee the persistence of writes to the vNVDIMM
+ backend, then use the pmem element in order to
+ utilize the feature.
+ Since 5.0.0
+