mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Introduce @access to <memory/>
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 <cell/>. 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 <mprivozn@redhat.com>
This commit is contained in:
@@ -1417,7 +1417,7 @@
|
||||
<span class='since'>Since 1.2.9</span> the optional attribute
|
||||
<code>memAccess</code> 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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -7100,7 +7100,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<memory model='dimm'>
|
||||
<memory model='dimm' access='private'>
|
||||
<target>
|
||||
<size unit='KiB'>524287</size>
|
||||
<node>0</node>
|
||||
@@ -7139,6 +7139,18 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>access</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
An optional attribute <code>access</code>
|
||||
(<span class="since">since 3.2.0</span>) that provides
|
||||
capability to fine tune mapping of the memory on per
|
||||
module basis. Values are the same as
|
||||
<a href="#elementsMemoryBacking">Memory Backing</a>:
|
||||
<code>shared</code> and <code>private</code>.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>source</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -4750,6 +4750,14 @@
|
||||
<value>nvdimm</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="access">
|
||||
<choice>
|
||||
<value>shared</value>
|
||||
<value>private</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<optional>
|
||||
<ref name="memorydev-source"/>
|
||||
|
||||
Reference in New Issue
Block a user