-
Bug
-
Resolution: Unresolved
-
Normal
-
rhel-10.1, rhel-9.7
-
None
-
libvirt-11.4.0-1.el10
-
No
-
Moderate
-
rhel-virt-core-libvirt-1
-
ssg_virtualization
-
21
-
None
-
Dev ack
-
False
-
False
-
-
None
-
None
-
Pass
-
Automated
-
Unspecified
-
Unspecified
-
Unspecified
-
-
s390x
-
11.4.0
-
None
What were you trying to do that didn't work?
When setting a guest vm with virtio-mem device and memory backing with preallocation and hugepage enabled. Start the guest then check qemu cmdline find that virtio-mem memory is not preallocated is not set correctly.
Please provide the package NVR for which the bug is seen:
# rpm -q libvirt qemu-kvm libvirt-11.2.0-1.el10.s390x qemu-kvm-10.0.0-0.rc3.el10.preview.s390x
How reproducible is this bug?:100%
Steps to reproduce
- enable kvm hugepage support on s390x
# modprobe -r kvm # modprobe kvm hpage=1
- allocate hugepages
# echo 3072 > /sys/kernel/mm/hugepages/hugepages-1024kB/nr_hugepages
- Define a guest with below config:
<maxMemory unit='KiB'>15242880</maxMemory>
<memory unit='KiB'>3145728</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<memoryBacking>
<hugepages/>
<allocation mode="immediate" threads='8'/>
</memoryBacking>
...
<memory model='virtio-mem' >
<target>
<size unit='KiB'>2097152</size>
<block unit='KiB'>1024</block>
<requested unit='KiB'>2097152</requested>
</target>
</memory> - Start the guest
# virsh start avocado-vt-vm1
Domain 'avocado-vt-vm1' started
- Check the qemu cmdline
- ps -ef | grep qemu-kvm
... -object {"qom-type":"memory-backend-file","id":"memvirtiomem0","mem-path":"/dev/hugepages/libvirt/qemu/5-avocado-vt-vm1","reserve":false,"size":2147483648} -device {"driver":"virtio-mem-ccw","block-size":1048576,"requested-size":2147483648,"memdev":"memvirtiomem0","id":"virtiomem0","devno":"fe.0.0009"} ... - Check the hugepage usage
# virsh freepages --all Node 0: 4KiB: 5102353 1024KiB: 1746
Expected results
The preallocation and allocation threads should be seen in qemu cmdline, and there should be no 1M hugepage left after starting the guest(virtio-mem related 2G hugepages should be allocated).
Actual results
The preallocation and allocation threads are not seen in qemu cmdline, and there stil 1746 hugepages are not allocated.
- clones
-
RHEL-87532 Fails to enable preallocation for hugepage backed virtio-mem device
-
- Release Pending
-
- is blocked by
-
RHEL-71662 Rebase libvirt in RHEL-10.1
-
- Release Pending
-
- links to
-
RHBA-2025:148139 libvirt bug fix and enhancement update