Bug 1738626 - Disable memfd in QEMU
Summary: Disable memfd in QEMU
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Marc-Andre Lureau
QA Contact: Yumei Huang
URL:
Whiteboard:
Depends On:
Blocks: 1740797 1813852
TreeView+ depends on / blocked
 
Reported: 2019-08-07 15:56 UTC by Ademar Reis
Modified: 2020-11-14 08:07 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-4.1.0-4.module+el8.1.0+4020+16089f93
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1740797 1813852 (view as bug list)
Environment:
Last Closed: 2019-11-06 07:18:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:18:45 UTC

Description Ademar Reis 2019-08-07 15:56:23 UTC
memfd is not needed by layered products right now, but it's currently enabled in our package. Let's disable it in QEMU so it doesn't get exposed unecessarily and untested.

This commit from libvirt gives us a good summary of what the feature is:
(but this BZ is about disabling it in QEMU, which is enough)

commit 24b74d187cab48a9dc9f409ea78900154c709579
Author: Marc-André Lureau <marcandre.lureau>
Date:   Thu Nov 15 15:55:53 2018 +0400

    qemu: add memfd source type
    
    Add a new memoryBacking source type "memfd", supported by QEMU (when
    the capability is available).
    
    A memfd is a specialized anonymous memory kind. As such, an anonymous
    source type could be automatically using a memfd. However, there are
    some complications when migrating from different memory backends in
    qemu (mainly due to the internal object naming at this point, but
    there could be more). For now, it is simpler and safer to simply
    introduce a new source type "memfd". Eventually, the "anonymous" type
    could learn to use memfd transparently in a separate change.
    
    The main benefits are that it doesn't need to create filesystem files,
    and it also enforces sealing, providing a bit more safety.

Comment 1 Danilo de Paula 2019-08-13 14:06:09 UTC
QA_ACK, please?

Comment 4 Yumei Huang 2019-08-20 05:20:19 UTC
Verify:
qemu-kvm-4.1.0-4.module+el8.1.0+4020+16089f93
kernel-4.18.0-131.el8.x86_64

Object memory-backend-memfd is not supported now.

# /usr/libexec/qemu-kvm -object memory-backend-memfd,id=mem0
qemu-kvm: -object memory-backend-memfd,id=mem0: invalid object type: memory-backend-memfd

Comment 6 errata-xmlrpc 2019-11-06 07:18:12 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-2019:3723

Comment 7 Dr. David Alan Gilbert 2020-02-06 10:59:57 UTC
This is a bit unfortunate;  it's a lot easier to work with memfd when you're doing vhost-user and just want to specify share=on


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