Blob Blame History Raw
From bf545f4a8f40a4ac8f6d63d887a63d9f08329eb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 14 Aug 2019 08:52:10 +0100
Subject: [PATCH 10/10] RHEL: disable hostmem-memfd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: <20190814085210.18462-1-marcandre.lureau@redhat.com>
Patchwork-id: 89974
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH] RHEL: disable hostmem-memfd
Bugzilla: 1740797
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
RH-Acked-by: John Snow <jsnow@redhat.com>

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1740797
BRANCH: rhel8/rhel-8.1.0
UPSTREAM: n/a (downstream only)
BREW: 23060214

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
 backends/Makefile.objs | 3 ++-
 util/memfd.c           | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/backends/Makefile.objs b/backends/Makefile.objs
index ad7c032..673fc55 100644
--- a/backends/Makefile.objs
+++ b/backends/Makefile.objs
@@ -15,4 +15,5 @@ common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX)) += \
     cryptodev-vhost-user.o
 endif
 
-common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
+# RHEL: disable memfd
+# common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
diff --git a/util/memfd.c b/util/memfd.c
index b3ecbac..9312653 100644
--- a/util/memfd.c
+++ b/util/memfd.c
@@ -202,7 +202,7 @@ bool qemu_memfd_alloc_check(void)
  */
 bool qemu_memfd_check(void)
 {
-#ifdef CONFIG_LINUX
+#if 0 /* RHEL: memfd support disabled */
     static int memfd_check = MEMFD_TODO;
 
     if (memfd_check == MEMFD_TODO) {
-- 
1.8.3.1