yeahuh / rpms / qemu-kvm

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