From 46f1b3ea37fb9e93dfffe7ade2bc1082388b41dc Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Thu, 22 Jun 2017 18:50:04 +0200 Subject: [PATCH] CONFIG_IVSHMEM_DEVICE-test --- Makefile | 6 ++++-- configure | 10 ++++++++++ contrib/ivshmem-client/Makefile.objs | 2 +- contrib/ivshmem-server/Makefile.objs | 2 +- default-configs/pci.mak | 2 +- hw/misc/Makefile.objs | 2 +- roms/seabios | 2 +- tests/Makefile.include | 4 ++-- 8 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 16a0430c6c..46318774e1 100644 --- a/Makefile +++ b/Makefile @@ -266,8 +266,8 @@ dummy := $(call unnest-vars,, \ chardev-obj-y \ util-obj-y \ qga-obj-y \ - ivshmem-client-obj-y \ - ivshmem-server-obj-y \ + ivshmem-client-obj-$(CONFIG_IVSHMEM) \ + ivshmem-server-obj-$(CONFIG_IVSHMEM) \ libvhost-user-obj-y \ vhost-user-scsi-obj-y \ qga-vss-dll-obj-y \ @@ -470,10 +470,12 @@ ifneq ($(EXESUF),) qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) endif +ifdef CONFIG_IVSHMEM ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS) $(call LINK, $^) ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) $(call LINK, $^) +endif vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) $(call LINK, $^) diff --git a/configure b/configure index ff0f8b915c..60307975d5 100755 --- a/configure +++ b/configure @@ -4881,11 +4881,18 @@ qemu_moddir=$libdir$confsuffix qemu_datadir=$datadir$confsuffix qemu_localedir="$datadir/locale" +# We can only support ivshmem if we have eventfd +if [ "$eventfd" = "yes" ]; then + ivshmem=yes +fi + tools="" if test "$want_tools" = "yes" ; then tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then tools="qemu-nbd\$(EXESUF) $tools" + fi + if [ "$ivshmem" = "yes" ]; then tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools" fi fi @@ -5449,6 +5456,9 @@ fi if test "$fallocate_zero_range" = "yes" ; then echo "CONFIG_FALLOCATE_ZERO_RANGE=y" >> $config_host_mak fi +if test "$ivshmem" = "yes" ; then + echo "CONFIG_IVSHMEM=y" >> $config_host_mak +fi if test "$posix_fallocate" = "yes" ; then echo "CONFIG_POSIX_FALLOCATE=y" >> $config_host_mak fi diff --git a/contrib/ivshmem-client/Makefile.objs b/contrib/ivshmem-client/Makefile.objs index bfab2d20dd..bf8485267b 100644 --- a/contrib/ivshmem-client/Makefile.objs +++ b/contrib/ivshmem-client/Makefile.objs @@ -1 +1 @@ -ivshmem-client-obj-y = ivshmem-client.o main.o +ivshmem-client-obj-$(CONFIG_IVSHMEM_DEVICE) = ivshmem-client.o main.o diff --git a/contrib/ivshmem-server/Makefile.objs b/contrib/ivshmem-server/Makefile.objs index c060dd3698..4c25cb3a35 100644 --- a/contrib/ivshmem-server/Makefile.objs +++ b/contrib/ivshmem-server/Makefile.objs @@ -1 +1 @@ -ivshmem-server-obj-y = ivshmem-server.o main.o +ivshmem-server-obj-$(CONFIG_IVSHMEM_DEVICE) = ivshmem-server.o main.o diff --git a/default-configs/pci.mak b/default-configs/pci.mak index 53ff10975c..acaa70301a 100644 --- a/default-configs/pci.mak +++ b/default-configs/pci.mak @@ -41,6 +41,6 @@ CONFIG_SDHCI=y CONFIG_EDU=y CONFIG_VGA=y CONFIG_VGA_PCI=y -CONFIG_IVSHMEM=$(CONFIG_EVENTFD) +CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM) CONFIG_ROCKER=y CONFIG_VHOST_USER_SCSI=$(CONFIG_LINUX) diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs index 20198466f0..f27f6dd1bc 100644 --- a/hw/misc/Makefile.objs +++ b/hw/misc/Makefile.objs @@ -22,7 +22,7 @@ common-obj-$(CONFIG_PUV3) += puv3_pm.o common-obj-$(CONFIG_MACIO) += macio/ -obj-$(CONFIG_IVSHMEM) += ivshmem.o +obj-$(CONFIG_IVSHMEM_DEVICE) += ivshmem.o obj-$(CONFIG_REALVIEW) += arm_sysctl.o obj-$(CONFIG_NSERIES) += cbus.o diff --git a/roms/seabios b/roms/seabios index 5f4c7b13cd..7759d3a5be 160000 --- a/roms/seabios +++ b/roms/seabios @@ -1 +1 @@ -Subproject commit 5f4c7b13cdf9c450eb55645f4362ea58fa61b79b +Subproject commit 7759d3a5be049eb8d0b4f7c6b1f1a0ba5e871cf3 diff --git a/tests/Makefile.include b/tests/Makefile.include index ae889cae02..9d175e8550 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -201,7 +201,7 @@ gcov-files-pci-y += hw/display/virtio-gpu-pci.c gcov-files-pci-$(CONFIG_VIRTIO_VGA) += hw/display/virtio-vga.c check-qtest-pci-y += tests/intel-hda-test$(EXESUF) gcov-files-pci-y += hw/audio/intel-hda.c hw/audio/hda-codec.c -check-qtest-pci-$(CONFIG_EVENTFD) += tests/ivshmem-test$(EXESUF) +check-qtest-pci-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF) gcov-files-pci-y += hw/misc/ivshmem.c check-qtest-pci-y += tests/megasas-test$(EXESUF) gcov-files-pci-y += hw/scsi/megasas.c @@ -302,7 +302,7 @@ check-qtest-ppc64-y += tests/test-filter-mirror$(EXESUF) check-qtest-ppc64-y += tests/test-filter-redirector$(EXESUF) check-qtest-ppc64-y += tests/display-vga-test$(EXESUF) check-qtest-ppc64-y += tests/numa-test$(EXESUF) -check-qtest-ppc64-$(CONFIG_EVENTFD) += tests/ivshmem-test$(EXESUF) +check-qtest-ppc64-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF) check-qtest-sh4-y = tests/endianness-test$(EXESUF) -- 2.13.1