Description of problem: The "memfd" memory backend in QEMU provides a way to back QEMU guest RAM with sharable memory that does not have to be backed by files. This supports use of both normal sized and huge pages. This is desirable to support for KubeVirt, because their containers are blocked from accessing /dev/hugepages mount point with the default OpenShift SELinux policy. The memfd backend should give them a way to use hugepages without needing access to the mount point, thus eliminating a deployment permissions hurdle. Version-Release number of selected component (if applicable): qemu-4.2.0-19.el8_2 How reproducible: Always Steps to Reproduce: 1. # /usr/libexec/qemu-kvm -object memory-backend-memfd,id=mem1,hugetlb=yes,hugetlbsize=2097152,size=268435456 Actual results: qemu-kvm: -object memory-backend-memfd,id=mem1,size=1G: invalid object type: memory-backend-memfd Expected results: QEMU boots with huge pages used and /dev/hugepages does not need to be mounted / accessible
See bug 1837334 which links to bug 1738626 (explicit removal downstream in 8.1) as well as a couple of other bugs that would need to be unwound. This could be duped there or vice-versa I believe. Assigning to Marc-Andre for now so we can figure the best way forward as it seems from the removal description that more work is necessary. Setting prio to high so that to work towards getting an answer more quickly.
Setting ITR=8.2.1 as the patch was sent targetting 8.2.1 Marc Andre, please check if this is intended. @QA: QA_ACK, please.
*** Bug 1837334 has been marked as a duplicate of this bug. ***
Verify: qemu-kvm-4.2.0-23.module+el8.2.1+6917+927fbb44 kernel-4.18.0-193.6.1.el8_2.x86_64 Steps: Setup hugepages on host, boot guest with memory-backend-memfd, and hotplug memory with memory-backend-memfd, guest works well, host hugepages are consumed as expected. QEMU cli: /usr/libexec/qemu-kvm \ -m 4G,slots=20,maxmem=20G \ -object memory-backend-memfd,id=mem1,hugetlb=yes,hugetlbsize=2M,size=1G \ -device pc-dimm,id=dimm1,memdev=mem1 \ ... Hotplug memory, (qemu) object_add memory-backend-memfd,id=mem2,hugetlb=yes,hugetlbsize=2M,size=1G (qemu) device_add pc-dimm,memdev=mem2,id=dimm2
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:3172