Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1693066 - with memfd source - Property 'memory-backend-memfd.hugetlbsize' doesn't take value '0'
Summary: with memfd source - Property 'memory-backend-memfd.hugetlbsize' doesn't take ...
Status: POST
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Michal Privoznik
QA Contact: Jing Qi
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-27 05:31 UTC by Jing Qi
Modified: 2019-04-04 02:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

Description Jing Qi 2019-03-27 05:31:27 UTC
Description of problem:
with memfd as source in memorybacking, below error message will be prompted when using <hugepages/>. 

Property 'memory-backend-memfd.hugetlbsize' doesn't take value '0'

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add Edit /etc/default/grub --- append intel_iommu=on default_hugepagesz=2M hugepagesz=2M hugepages=2000 to GRUB_CMDLINE_LINUX line.
and check in the os with mount command -
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=1024M)

2. Edit the domain and add the xml-
    <source type='memfd'/>

3.# virsh start avocado-vt-vm1
error: Failed to start domain avocado-vt-vm1
error: internal error: process exited while connecting to monitor: profiling:/builddir/build/BUILD/libvirt-5.0.0/src/util/.libs/libvirt_util_la-virbitmap.gcda:Cannot open
profiling:/builddir/build/BUILD/libvirt-5.0.0/src/util/.libs/libvirt_util_la-virauthconfig.gcda:Cannot open
profiling:/builddir/build/BUILD/libvirt-5.0.0/src/util/.libs/libvirt_util_la-virauth.gcda:Cannot open
profiling:/builddir/build/BUILD/libvirt-5.0.0/src/util/.libs/libvirt_util_la-viraudit.gcda:Cannot open
profiling:/builddir/build/BUILD/libvirt-5.0.0/src/util/.libs/libvirt_util_la-virarptable.gcda:Cannot open
profiling:/builddir/build/BUILD/libvirt-5.0.0/src/util/.libs/libvirt_util_la-virarch.gcda:Cannot open
profiling:/builddir/build/BUILD/libvirt-5.0.0/src/util/.libs/libvirt_util_la-viralloc.gcda:Cannot open
2019-03-27T05:08:46.706005Z qemu-kvm: -object memory-backend-memfd,id=ram-node0,hugetlb=yes,hugetlbsize=0,size=1073741824,host-nodes=0,policy=preferred: Property 'memory-backend-memfd.hugetlbsize' doesn't take value '0'

Expected results:
NO error. Domain can start with default hugepagesz used. 

Additional info:
Domain can start up with below xml -
      <page size='1048576' unit='KiB'/>
   <source type='memfd'/>

Comment 1 Michal Privoznik 2019-04-01 14:07:30 UTC
Patches posted upstream:

BTW: there's no need to play with kernel cmdline arguments to reproduce this. Simply have a hugetlbfs mount point without "-o pagesize" and then just use <hugepages/> in the domain XML (without any page size).

Comment 2 Michal Privoznik 2019-04-03 14:46:24 UTC
I've just pushed patches uptram:

6864d8f740 qemuBuildMemoryBackendProps: Get pagesize early
465df4771a virfile: Introduce and use virFileGetDefaultHugepage
59a22be864 qemuxml2xmltest: Add memfd tests
a0d53fdab9 qemuxml2xmltest: Move virObjectUnref() call
7086c835b6 qemuxml2argvdata: Drop useless spaces at the beginning of lines


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