902636
From 559d5899473dea180ced39a32bfbfbf2310c6e04 Mon Sep 17 00:00:00 2001
902636
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
902636
Date: Mon, 25 May 2020 15:33:06 +0100
902636
Subject: [PATCH 4/7] Revert "RHEL: disable hostmem-memfd"
902636
MIME-Version: 1.0
902636
Content-Type: text/plain; charset=UTF-8
902636
Content-Transfer-Encoding: 8bit
902636
902636
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
902636
Message-id: <20200525153306.15373-1-marcandre.lureau@redhat.com>
902636
Patchwork-id: 96747
902636
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH] Revert "RHEL: disable hostmem-memfd"
902636
Bugzilla: 1839030
902636
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
902636
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
902636
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
902636
902636
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1839030
902636
BRANCH: rhel-av-8.2.1
902636
UPSTREAM: RHEL-only
902636
BREW: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=28817132
902636
902636
This reverts commit f7587ddb9a2731bf678a24156b6285dda79a4b2b.
902636
902636
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 backends/Makefile.objs | 3 +--
902636
 util/memfd.c           | 2 +-
902636
 2 files changed, 2 insertions(+), 3 deletions(-)
902636
902636
diff --git a/backends/Makefile.objs b/backends/Makefile.objs
902636
index f328d40..f069111 100644
902636
--- a/backends/Makefile.objs
902636
+++ b/backends/Makefile.objs
902636
@@ -16,5 +16,4 @@ endif
902636
 
902636
 common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o
902636
 
902636
-# RHEL: disable memfd
902636
-# common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
902636
+common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
902636
diff --git a/util/memfd.c b/util/memfd.c
902636
index 3303ec9..4a3c07e 100644
902636
--- a/util/memfd.c
902636
+++ b/util/memfd.c
902636
@@ -193,7 +193,7 @@ bool qemu_memfd_alloc_check(void)
902636
  */
902636
 bool qemu_memfd_check(unsigned int flags)
902636
 {
902636
-#if 0 /* RHEL: memfd support disabled */
902636
+#ifdef CONFIG_LINUX
902636
     int mfd = memfd_create("test", flags | MFD_CLOEXEC);
902636
 
902636
     if (mfd >= 0) {
902636
-- 
902636
1.8.3.1
902636