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