thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
Pablo Greco e6a3ae
From bf545f4a8f40a4ac8f6d63d887a63d9f08329eb6 Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Pablo Greco e6a3ae
Date: Wed, 14 Aug 2019 08:52:10 +0100
Pablo Greco e6a3ae
Subject: [PATCH 10/10] RHEL: disable hostmem-memfd
Pablo Greco e6a3ae
MIME-Version: 1.0
Pablo Greco e6a3ae
Content-Type: text/plain; charset=UTF-8
Pablo Greco e6a3ae
Content-Transfer-Encoding: 8bit
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Pablo Greco e6a3ae
Message-id: <20190814085210.18462-1-marcandre.lureau@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 89974
Pablo Greco e6a3ae
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH] RHEL: disable hostmem-memfd
Pablo Greco e6a3ae
Bugzilla: 1740797
Pablo Greco e6a3ae
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: John Snow <jsnow@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1740797
Pablo Greco e6a3ae
BRANCH: rhel8/rhel-8.1.0
Pablo Greco e6a3ae
UPSTREAM: n/a (downstream only)
Pablo Greco e6a3ae
BREW: 23060214
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 backends/Makefile.objs | 3 ++-
Pablo Greco e6a3ae
 util/memfd.c           | 2 +-
Pablo Greco e6a3ae
 2 files changed, 3 insertions(+), 2 deletions(-)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/backends/Makefile.objs b/backends/Makefile.objs
Pablo Greco e6a3ae
index ad7c032..673fc55 100644
Pablo Greco e6a3ae
--- a/backends/Makefile.objs
Pablo Greco e6a3ae
+++ b/backends/Makefile.objs
Pablo Greco e6a3ae
@@ -15,4 +15,5 @@ common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX)) += \
Pablo Greco e6a3ae
     cryptodev-vhost-user.o
Pablo Greco e6a3ae
 endif
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
-common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
Pablo Greco e6a3ae
+# RHEL: disable memfd
Pablo Greco e6a3ae
+# common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
Pablo Greco e6a3ae
diff --git a/util/memfd.c b/util/memfd.c
Pablo Greco e6a3ae
index b3ecbac..9312653 100644
Pablo Greco e6a3ae
--- a/util/memfd.c
Pablo Greco e6a3ae
+++ b/util/memfd.c
Pablo Greco e6a3ae
@@ -202,7 +202,7 @@ bool qemu_memfd_alloc_check(void)
Pablo Greco e6a3ae
  */
Pablo Greco e6a3ae
 bool qemu_memfd_check(void)
Pablo Greco e6a3ae
 {
Pablo Greco e6a3ae
-#ifdef CONFIG_LINUX
Pablo Greco e6a3ae
+#if 0 /* RHEL: memfd support disabled */
Pablo Greco e6a3ae
     static int memfd_check = MEMFD_TODO;
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
     if (memfd_check == MEMFD_TODO) {
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae