[libvirt] [PATCH v5 02/11] nvdimm: introduce 'pmem' element into xml for NVDIMM memory
John Ferlan
jferlan at redhat.com
Thu Dec 20 17:06:35 UTC 2018
$SUBJ:
conf: Introduce
On 12/20/18 4:14 AM, Luyao Zhong wrote:
> The 'pmem' option allows users to specify whether the backend
> storage of memory-backend-file is a real persistent memory:
>
> <devices>
> ...
> <memory model='nvdimm' access='shared'>
> <source>
> <path>/dev/dax0.0</path>
> <pmem/>
> </source>
> <target>
> <size unit='MiB'>4094</size>
> <node>0</node>
> <label>
> <size unit='MiB'>2</size>
> </label>
> </target>
> </memory>
> ...
> </devices>
>
> Signed-off-by: Luyao Zhong <luyao.zhong at intel.com>
> ---
> docs/formatdomain.html.in | 12 +++++
> docs/schemas/domaincommon.rng | 5 ++
> src/conf/domain_conf.c | 13 +++++
> src/conf/domain_conf.h | 1 +
> .../memory-hotplug-nvdimm-pmem.xml | 58 ++++++++++++++++++++++
> .../memory-hotplug-nvdimm-pmem.xml | 1 +
> tests/qemuxml2xmltest.c | 1 +
> 7 files changed, 91 insertions(+)
> create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
> create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-pmem.xml
>
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index 515e656..0781f24 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -8323,6 +8323,7 @@ qemu-kvm -net nic,model=? /dev/null
> <source>
> <path>/tmp/nvdimm</path>
> <alignsize unit='KiB'>2048</alignsize>
> + <pmem/>
Should a whole new entry be created, e.g. rather than modifying the
above use:
<memory model='nvdimm'>
<source>
<path>/dev/dax0.0</path>
<pmem/>
</source>
<target>
<size unit='KiB'>524288</size>
<node>1</node>
<label>
<size unit='KiB'>128</size>
</label>
</target>
</memory>
?
Whether the <target> values make sense or not is something you can clarify.
> </source>
> <target>
> <size unit='KiB'>524288</size>
> @@ -8423,6 +8424,17 @@ qemu-kvm -net nic,model=? /dev/null
> <span class="since">Since 5.0.0</span>
> </p>
> </dd>
> +
> + <dt><code>pmem</code></dt>
> + <dd>
> + <p>
> + This element can be used to specify whether the backend storage
> + of memory-backend-file is a real persistent memory. If the
> + backend is a real persistence memory and <code>pmem</code> is set,
> + QEMU will guarantee the persistence of its own writes to the
> + vNVDIMM backend. <span class="since">Since 5.0.0</span>
Not sure exactly how to rewrite the above to be more hypervisor
agnostic, but how's this?:
If persistent memory is supported and enabled by the hypervisor in order
to guarantee the persistence of writes to the vNVDIMM backend, then use
the <code>pmem</code> element in order to utilize the feature.
I can make the changes with your OK.
Reviewed-by: John Ferlan <jferlan at redhat.com>
John
[...]
More information about the libvir-list
mailing list