yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-virtiofsd-Add-Makefile-wiring-for-virtiofsd-contrib.patch

22c213
From 709408de33112d32b7c6675f8c9320b8bebccd58 Mon Sep 17 00:00:00 2001
22c213
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
22c213
Date: Mon, 27 Jan 2020 19:01:05 +0100
22c213
Subject: [PATCH 034/116] virtiofsd: Add Makefile wiring for virtiofsd contrib
22c213
MIME-Version: 1.0
22c213
Content-Type: text/plain; charset=UTF-8
22c213
Content-Transfer-Encoding: 8bit
22c213
22c213
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
22c213
Message-id: <20200127190227.40942-31-dgilbert@redhat.com>
22c213
Patchwork-id: 93482
22c213
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 030/112] virtiofsd: Add Makefile wiring for virtiofsd contrib
22c213
Bugzilla: 1694164
22c213
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
22c213
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
22c213
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
22c213
22c213
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
22c213
22c213
Wire up the building of the virtiofsd in tools.
22c213
22c213
virtiofsd relies on Linux-specific system calls and seccomp.  Anyone
22c213
wishing to port it to other host operating systems should do so
22c213
carefully and without reducing security.
22c213
22c213
Only allow building on Linux hosts.
22c213
22c213
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22c213
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
22c213
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
22c213
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
22c213
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22c213
(cherry picked from commit 81bfc42dcf473bc8d3790622633410da72d8e622)
22c213
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
22c213
---
22c213
 Makefile                      | 10 ++++++++++
22c213
 Makefile.objs                 |  1 +
22c213
 tools/virtiofsd/Makefile.objs |  9 +++++++++
22c213
 3 files changed, 20 insertions(+)
22c213
 create mode 100644 tools/virtiofsd/Makefile.objs
22c213
22c213
diff --git a/Makefile b/Makefile
22c213
index 4254950..1526775 100644
22c213
--- a/Makefile
22c213
+++ b/Makefile
22c213
@@ -330,6 +330,10 @@ endif
22c213
 endif
22c213
 endif
22c213
 
22c213
+ifdef CONFIG_LINUX
22c213
+HELPERS-y += virtiofsd$(EXESUF)
22c213
+endif
22c213
+
22c213
 # Sphinx does not allow building manuals into the same directory as
22c213
 # the source files, so if we're doing an in-tree QEMU build we must
22c213
 # build the manuals into a subdirectory (and then install them from
22c213
@@ -430,6 +434,7 @@ dummy := $(call unnest-vars,, \
22c213
                 elf2dmp-obj-y \
22c213
                 ivshmem-client-obj-y \
22c213
                 ivshmem-server-obj-y \
22c213
+                virtiofsd-obj-y \
22c213
                 rdmacm-mux-obj-y \
22c213
                 libvhost-user-obj-y \
22c213
                 vhost-user-scsi-obj-y \
22c213
@@ -675,6 +680,11 @@ rdmacm-mux$(EXESUF): LIBS += "-libumad"
22c213
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
22c213
 	$(call LINK, $^)
22c213
 
22c213
+ifdef CONFIG_LINUX # relies on Linux-specific syscalls
22c213
+virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS)
22c213
+	$(call LINK, $^)
22c213
+endif
22c213
+
22c213
 vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) libqemuutil.a libqemustub.a
22c213
 	$(call LINK, $^)
22c213
 
22c213
diff --git a/Makefile.objs b/Makefile.objs
22c213
index fcf63e1..1a8f288 100644
22c213
--- a/Makefile.objs
22c213
+++ b/Makefile.objs
22c213
@@ -125,6 +125,7 @@ vhost-user-blk-obj-y = contrib/vhost-user-blk/
22c213
 rdmacm-mux-obj-y = contrib/rdmacm-mux/
22c213
 vhost-user-input-obj-y = contrib/vhost-user-input/
22c213
 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
22c213
+virtiofsd-obj-y = tools/virtiofsd/
22c213
 
22c213
 ######################################################################
22c213
 trace-events-subdirs =
22c213
diff --git a/tools/virtiofsd/Makefile.objs b/tools/virtiofsd/Makefile.objs
22c213
new file mode 100644
22c213
index 0000000..45a8075
22c213
--- /dev/null
22c213
+++ b/tools/virtiofsd/Makefile.objs
22c213
@@ -0,0 +1,9 @@
22c213
+virtiofsd-obj-y = buffer.o \
22c213
+                  fuse_opt.o \
22c213
+                  fuse_log.o \
22c213
+                  fuse_lowlevel.o \
22c213
+                  fuse_signals.o \
22c213
+                  fuse_virtio.o \
22c213
+                  helper.o \
22c213
+                  passthrough_ll.o
22c213
+
22c213
-- 
22c213
1.8.3.1
22c213