[libvirt] [PATCH] clarify the xml example for NVDIMM more clealy

Luyao Zhong posted 1 patch 4 years, 7 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1569233182-21261-1-git-send-email-luyao.zhong@intel.com
docs/formatdomain.html.in | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
[libvirt] [PATCH] clarify the xml example for NVDIMM more clealy
Posted by Luyao Zhong 4 years, 7 months ago
The NVDIMM backend file can be a normal file or a real device file,
Current xml example and explainations may mislead users. So add more
info about the NVDIMM related elements and update the xml examples.

Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
---
 docs/formatdomain.html.in | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 86a5261..556a39f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -8533,7 +8533,6 @@ qemu-kvm -net nic,model=? /dev/null
   &lt;memory model='nvdimm'&gt;
     &lt;source&gt;
       &lt;path&gt;/tmp/nvdimm&lt;/path&gt;
-      &lt;alignsize unit='KiB'&gt;2048&lt;/alignsize&gt;
     &lt;/source&gt;
     &lt;target&gt;
       &lt;size unit='KiB'&gt;524288&lt;/size&gt;
@@ -8544,9 +8543,10 @@ qemu-kvm -net nic,model=? /dev/null
       &lt;readonly/&gt;
     &lt;/target&gt;
   &lt;/memory&gt;
-  &lt;memory model='nvdimm'&gt;
+  &lt;memory model='nvdimm' access='shared'&gt;
     &lt;source&gt;
       &lt;path&gt;/dev/dax0.0&lt;/path&gt;
+      &lt;alignsize unit='KiB'&gt;2048&lt;/alignsize&gt;
       &lt;pmem/&gt;
     &lt;/source&gt;
     &lt;target&gt;
@@ -8580,6 +8580,8 @@ qemu-kvm -net nic,model=? /dev/null
           module basis. Values are the same as
           <a href="#elementsMemoryBacking">Memory Backing</a>:
           <code>shared</code> and <code>private</code>.
+          For <code>nvdimm</code> model, if using real NVDIMM DAX device as
+          backend, <code>shared</code> is required.
         </p>
       </dd>
 
@@ -8643,7 +8645,8 @@ qemu-kvm -net nic,model=? /dev/null
               alignment used to mmap the address range for the backend
               <code>path</code>. If not supplied the host page size is used.
               For example, to mmap a real NVDIMM device a 2M-aligned page may
-              be required.
+              be required, and host page size is 4KB, then we need to set this
+              element to 2MB.
               <span class="since">Since 5.0.0</span>
             </p>
           </dd>
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] clarify the xml example for NVDIMM more clealy
Posted by Michal Privoznik 4 years, 6 months ago
On 9/23/19 12:06 PM, Luyao Zhong wrote:
> The NVDIMM backend file can be a normal file or a real device file,
> Current xml example and explainations may mislead users. So add more
> info about the NVDIMM related elements and update the xml examples.
> 
> Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
> ---
>   docs/formatdomain.html.in | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com> and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list