This patch adds documentation and test for the memdev device
(type=file) share option.
Signed-off-by: Michele Paolino <m.paolino(a)virtualopensystems.com>
---
docs/formatdomain.html.in | 7 +++++++
docs/schemas/domaincommon.rng | 3 +++
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.xml | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0bc0139..3f8bbee 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5307,6 +5307,13 @@ qemu-kvm -net nic,model=? /dev/null
The optional prealloc attribute enables memory preallocation.
</p>
</dd>
+ <dt><code>share</code></dt>
+ <dd>
+ <p>
+ The optional share attribute enables the share option for the backend
+ memory-backed-file(type = 'file').
+ </p>
+ </dd>
<dt><code>source</code></dt>
<dd>The source element describes the device as seen from the host.
the optional <code>mem-path</code> element is required when specified
type = 'file'.
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 709d13e..af51eee 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3157,6 +3157,9 @@
</choice>
</attribute>
<optional>
+ <attribute name='share'>
+ <value>on</value>
+ </attribute>
<attribute name='merge'>
<value>yes</value>
</attribute>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.args
b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.args
index 3a1cd94..6c92194 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.args
@@ -1,7 +1,7 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu -S -M pc \
-m 214 \
--object
memory-backend-file,id=ram0,size=109568K,merge=yes,dump=yes,prealloc=yes,mem-path=/hugepages,\
+-object
memory-backend-file,id=ram0,size=109568K,merge=yes,dump=yes,prealloc=yes,mem-path=/hugepages,share=on,\
host-nodes=0,policy=bind \
-object
memory-backend-file,id=ram1,size=109568K,mem-path=/hugepages,host-nodes=0,policy=bind \
-smp 16 -numa node,nodeid=0,cpus=0-7,memdev=ram0 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.xml
b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.xml
index 03e3a28..d30ee80 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa4.xml
@@ -21,7 +21,7 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
- <memdev type='file' merge='yes' dump='yes'
prealloc='yes'>
+ <memdev type='file' share='on' merge='yes'
dump='yes' prealloc='yes'>
<name>ram0</name>
<capacity unit='KiB'>109550</capacity>
<source mem-path='/hugepages' host-nodes='0'
policy='bind'/>
--
1.9.3