yeahuh / rpms / qemu-kvm

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