RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1724980 - The qemu command line for nvdimm is wrong
Summary: The qemu command line for nvdimm is wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.7
Assignee: Michal Privoznik
QA Contact: Jing Qi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-28 07:58 UTC by Fangge Jin
Modified: 2020-03-31 19:59 UTC (History)
7 users (show)

Fixed In Version: libvirt-4.5.0-24.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:58:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vm xml (16.36 KB, text/html)
2019-06-28 07:58 UTC, Fangge Jin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1094 0 None None None 2020-03-31 19:59:23 UTC

Description Fangge Jin 2019-06-28 07:58:50 UTC
Created attachment 1585481 [details]
vm xml

Description of problem:
The qemu command line for nvdimm is wrong

Version-Release number of selected component (if applicable):
libvirt-4.5.0-23.virtcov.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a vm with nvdimm device:
...
  <memoryBacking>
    <hugepages>
      <page size='2048' unit='KiB'/>
    </hugepages>
    <discard/>
    <access mode='shared'/>
    <allocation mode='immediate'/>
    <nosharepages/>
  </memoryBacking>
...
<devices>
...
    <memory model='nvdimm'>
      <source>
        <path>/tmp/nvdimm</path>
      </source>
      <target>
        <size unit='KiB'>524288</size>
        <node>1</node>
        <label>
          <size unit='KiB'>128</size>
        </label>
      </target>
      <address type='dimm' slot='1'/>
    </memory>

2.Start vm

3.Check qemu command line, it didn't use the path "/tmp/nvdimm', it used "/dev/hugepages/libvirt/qemu/2-rhel7.6" instead:
...
-machine pc-i440fx-rhel7.6.0,accel=kvm,usb=off,vmport=on,dump-guest-core=off,mem-merge=off,nvdimm=on \
-object memory-backend-file,id=memnvdimm1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu/2-rhel7.6,share=yes,size=536870912,host-nodes=0,policy=bind \
-device nvdimm,node=1,label-size=131072,memdev=memnvdimm1,id=nvdimm1,slot=1 \

Actual results:
The qemu command line for nvdimm device uses mem-path=/dev/hugepages/libvirt/qemu/2-rhel7.6

Expected results:
The qemu command line for nvdimm device should use mem-path=/tmp/nvdimm

Additional info:

Comment 2 Fangge Jin 2019-06-28 09:02:14 UTC
Hi Jaroslav

This bug can not be reproduced on RHEL8.0-av:
libvirt-5.0.0-11.module+el8.0.1+3459+e357ef2f.x86_64

Comment 3 Michal Privoznik 2019-06-28 15:20:51 UTC
(In reply to Fangge Jin from comment #2)
> Hi Jaroslav
> 
> This bug can not be reproduced on RHEL8.0-av:
> libvirt-5.0.0-11.module+el8.0.1+3459+e357ef2f.x86_64

This is because it was fixed in v4.7.0-rc1~197. Moving back to RHEL-7.7 and to POST:

http://post-office.corp.redhat.com/archives/rhvirt-patches/2019-June/msg01047.html

Comment 6 Jing Qi 2019-08-19 03:27:08 UTC
Verified with libvirt-4.5.0-24.el7.x86_64.rpm & qemu-kvm-rhev-2.12.0-18.el7_6.3.x86_64
Domain with below xml  -
<memoryBacking>
    <hugepages/>
    <source type='file'/>
    <allocation mode='immediate'/>
</memoryBacking>
....
<memory model='nvdimm'>
      <source>
        <path>/tmp/nvdimm</path>
      </source>
      <target>
        <size unit='KiB'>524288</size>
        <node>0</node>
        <label>
          <size unit='KiB'>128</size>
        </label>
      </target>
      <address type='dimm' slot='2'/>
    </memory>
# virsh start avocado-vt-vm-numa0

Check the qemu cmd line, id=memnvdimm2,prealloc=yes,mem-path=/tmp/nvdimm      

 ps -fe |grep qemu-kvm |grep /tmp
qemu      23578      1 99 23:26 ?        00:00:31 /usr/libexec/qemu-kvm -name guest=avocado-vt-vm-numa0,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-9-avocado-vt-vm-numa0/master-key.aes -machine pc-i440fx-rhel7.5.0,accel=kvm,usb=off,vmport=on,dump-guest-core=off,mem-merge=off,nvdimm=on,kernel_irqchip=split -cpu qemu64,+kvm_pv_unhalt,pmu=off -bios /usr/share/seabios/bios.bin -m size=1048576k,slots=8,maxmem=134217728k -mem-prealloc -realtime mlock=off -smp 3,sockets=3,cores=1,threads=1 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu/9-avocado-vt-vm-numa0,discard-data=yes,share=yes,size=1073741824,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-2,memdev=ram-node0 -object memory-backend-file,id=memdimm0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu/9-avocado-vt-vm-numa0,discard-data=yes,share=no,size=536870912,host-nodes=0,policy=bind -device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 -object memory-backend-file,id=memdimm1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu/9-avocado-vt-vm-numa0,discard-data=yes,share=yes,size=536870912,host-nodes=0,policy=bind -device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1,addr=4831838208 -object memory-backend-file,id=memnvdimm2,prealloc=yes,mem-path=/tmp/nvdimm,share=yes,size=536870912,host-nodes=0,policy=bind -device nvdimm,node=0,label-size=131072,memdev=memnvdimm2,id=nvdimm2,slot=2 -uuid 431a12a2-c8d3-4234-9558-ab233bb93198

Comment 7 Jing Qi 2020-02-04 09:38:57 UTC
Verified with libvirt-4.5.0-32.virtcov.el7.x86_64 & qemu-kvm-rhev-2.12.0-43.el7.x86_64 by using the steps in Comment 6 and passed.

Comment 9 errata-xmlrpc 2020-03-31 19:58:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1094


Note You need to log in before you can comment on or make changes to this bug.