From 80af11d3dd4c9e426beee36643baba90e7ff4c15 Mon Sep 17 00:00:00 2001
From: Michal Privoznik
Date: Mon, 1 Aug 2016 14:59:38 +0200
Subject: [PATCH] conf: Introduce @access to
Now that NVDIMM has found its way into libvirt, users might want
to fine tune some settings for each module separately. One such
setting is 'share=on|off' for the memory-backend-file object.
This setting - just like its name suggest already - enables
sharing the nvdimm module with other applications. Under the hood
it controls whether qemu mmaps() the file as MAP_PRIVATE or
MAP_SHARED.
Yet again, we have such config knob in domain XML, but it's just
an attribute to numa . This does not give fine enough
tuning on per-memdevice basis so we need to have the attribute
for each device too.
Signed-off-by: Michal Privoznik
---
docs/formatdomain.html.in | 16 +++++-
docs/schemas/domaincommon.rng | 8 +++
src/conf/domain_conf.c | 15 ++++-
src/conf/domain_conf.h | 2 +
...uxml2argv-memory-hotplug-nvdimm-access.xml | 56 +++++++++++++++++++
...ml2xmlout-memory-hotplug-nvdimm-access.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
7 files changed, 96 insertions(+), 3 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-nvdimm-access.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-memory-hotplug-nvdimm-access.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0189920a84..a8a4191081 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1417,7 +1417,7 @@
Since 1.2.9 the optional attribute
memAccess can control whether the memory is to be
mapped as "shared" or "private". This is valid only for
- hugepages-backed memory.
+ hugepages-backed memory and nvdimm modules.
+ An optional attribute access
+ (since 3.2.0) that provides
+ capability to fine tune mapping of the memory on per
+ module basis. Values are the same as
+ Memory Backing:
+ shared and private.
+