From b4e8a49f8d0614f8c933f69a830fc470f871e21b Mon Sep 17 00:00:00 2001
From: Michal Privoznik
Date: Thu, 28 Jul 2016 18:54:18 +0200
Subject: [PATCH] Introduce NVDIMM memory model
NVDIMM is new type of memory introduced into QEMU 2.6. The idea
is that we have a Non-Volatile memory module that keeps the data
persistent across domain reboots.
At the domain XML level, we already have some representation of
'dimm' modules. Long story short, NVDIMM will utilize the
existing element that lives under by adding
a new attribute 'nvdimm' to the existing @model and introduce a
new element for while reusing other fields. The
resulting XML would appear as:
/tmp/nvdimm5232640
So far, this is just a XML parser/formatter extension. QEMU
driver implementation is in the next commit.
For more info on NVDIMM visit the following web page:
http://pmem.io/
Signed-off-by: Michal Privoznik
---
docs/formatdomain.html.in | 56 ++++++++---
docs/schemas/domaincommon.rng | 32 +++---
src/conf/domain_conf.c | 97 ++++++++++++++-----
src/conf/domain_conf.h | 2 +
src/qemu/qemu_command.c | 6 ++
src/qemu/qemu_domain.c | 5 +
.../qemuxml2argv-memory-hotplug-nvdimm.xml | 56 +++++++++++
.../qemuxml2xmlout-memory-hotplug-nvdimm.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
9 files changed, 205 insertions(+), 51 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-nvdimm.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-memory-hotplug-nvdimm.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 9a204f845c..0189920a84 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -7092,7 +7092,6 @@ qemu-kvm -net nic,model=? /dev/null
guests' memory resource needs.
Some hypervisors may require NUMA configured for the guest.
- Since 1.2.14
- Currently only the dimm model is supported in order to
- add a virtual DIMM module to the guest.
+ Provide dimm to add a virtual DIMM module to the guest.
+ Since 1.2.14
+ Provide nvdimm model adds a Non-Volatile DIMM
+ module. Since 3.2.0
source
- The optional source element allows to fine tune the source of the
- memory used for the given memory device. If the element is not
- provided defaults configured via numatune are used.
+ For model dimm this element is optional and allows to
+ fine tune the source of the memory used for the given memory device.
+ If the element is not provided defaults configured via
+ numatune are used. If dimm is provided,
+ then the following optional elements can be provided as well:
-
- pagesize can optionally be used to override the default
- host page size used for backing the memory device.
- The configured value must correspond to a page size supported by the
- host.
-
+
+
pagesize
+
+
+ This element can be used to override the default
+ host page size used for backing the memory device.
+ The configured value must correspond to a page size
+ supported by the host.
+
+
+
+
nodemask
+
+
+ This element can be used to override the default
+ set of NUMA nodes where the memory would be
+ allocated.
+
+
+
+
- nodemask can optionally be used to override the default
- set of NUMA nodes where the memory would be allocated.
+ For model nvdimm this element is mandatory and has a
+ single child element path that represents a path
+ in the host that backs the nvdimm module in the guest.