mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Introduce 'readonly' element into xml for NVDIMM memory
The 'readonly' option allows users to mark vNVDIMM read-only:
<devices>
...
<memory model='nvdimm' access='shared'>
<source>
<path>/dev/dax0.0</path>
</source>
<target>
<size unit='MiB'>4094</size>
<node>0</node>
<label>
<size unit='MiB'>2</size>
</label>
<readonly/>
</target>
</memory>
...
</devices>
Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
@@ -8330,6 +8330,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<label>
|
||||
<size unit='KiB'>128</size>
|
||||
</label>
|
||||
<readonly/>
|
||||
</target>
|
||||
</memory>
|
||||
<memory model='nvdimm'>
|
||||
@@ -8465,19 +8466,39 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
NUMA nodes configured.
|
||||
</p>
|
||||
<p>
|
||||
For NVDIMM type devices one can optionally use
|
||||
<code>label</code> and its subelement <code>size</code>
|
||||
to configure the size of namespaces label storage
|
||||
within the NVDIMM module. The <code>size</code> element
|
||||
has usual meaning described
|
||||
<a href="#elementsMemoryAllocation">here</a>.
|
||||
For QEMU domains the following restrictions apply:
|
||||
The following optional elements may be used:
|
||||
</p>
|
||||
<ol>
|
||||
<li>the minimum label size is 128KiB,</li>
|
||||
<li>the remaining size (total-size - label-size) has to be aligned to
|
||||
4KiB</li>
|
||||
</ol>
|
||||
|
||||
<dl>
|
||||
<dt><code>label</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
For NVDIMM type devices one can optionally use
|
||||
<code>label</code> and its subelement <code>size</code>
|
||||
to configure the size of namespaces label storage
|
||||
within the NVDIMM module. The <code>size</code> element
|
||||
has usual meaning described
|
||||
<a href="#elementsMemoryAllocation">here</a>.
|
||||
For QEMU domains the following restrictions apply:
|
||||
</p>
|
||||
<ol>
|
||||
<li>the minimum label size is 128KiB,</li>
|
||||
<li>the remaining size (total-size - label-size) will be aligned
|
||||
to 4KiB as default.</li>
|
||||
</ol>
|
||||
</dd>
|
||||
|
||||
<dt><code>readonly</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The <code>readonly</code> element is used to mark the vNVDIMM
|
||||
as read-only. Only the real NVDIMM device backend can guarantee
|
||||
the guest write persistence, so other backend types should use
|
||||
the <code>readonly</code> element.
|
||||
<span class="since">Since 5.0.0</span>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user