From nobody Mon Apr 29 13:20:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500023771399592.3277859265262; Fri, 14 Jul 2017 02:16:11 -0700 (PDT) Received: from localhost ([::1]:36418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwhm-0005oz-8m for importer@patchew.org; Fri, 14 Jul 2017 05:16:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwV7-0003qQ-1T for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVwV6-0005xx-Be for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:05 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37570) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVwV6-0005xZ-4V for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:04 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dVw2k-0007Tr-Na; Fri, 14 Jul 2017 09:33:46 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 14 Jul 2017 09:33:43 +0100 Message-Id: <1500021225-4118-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500021225-4118-1-git-send-email-peter.maydell@linaro.org> References: <1500021225-4118-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH 1/3] configure: Rename CONFIG_IVSHMEM to CONFIG_IVSHMEM_DEVICE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Rytarowski , Markus Armbruster , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The current CONFIG_IVSHMEM is confusing, because it looks like it's a flag for "do we have ivshmem support?", but actually it's a flag for "is the ivshmem PCI device being compiled?" (and implicitly "do we have ivshmem support?" is tested with CONFIG_EVENTFD). Rename it to CONFIG_IVSHMEM_DEVICE to clear this confusion up; shortly we will add a new CONFIG_IVSHMEM which really does indicate whether the host can support ivshmem. Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster --- hw/misc/Makefile.objs | 2 +- default-configs/pci.mak | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs index 7e373db..28c1560 100644 --- a/hw/misc/Makefile.objs +++ b/hw/misc/Makefile.objs @@ -23,7 +23,7 @@ common-obj-$(CONFIG_PUV3) +=3D puv3_pm.o =20 common-obj-$(CONFIG_MACIO) +=3D macio/ =20 -obj-$(CONFIG_IVSHMEM) +=3D ivshmem.o +obj-$(CONFIG_IVSHMEM_DEVICE) +=3D ivshmem.o =20 obj-$(CONFIG_REALVIEW) +=3D arm_sysctl.o obj-$(CONFIG_NSERIES) +=3D cbus.o diff --git a/default-configs/pci.mak b/default-configs/pci.mak index 53ff109..2451eb2 100644 --- a/default-configs/pci.mak +++ b/default-configs/pci.mak @@ -41,6 +41,6 @@ CONFIG_SDHCI=3Dy CONFIG_EDU=3Dy CONFIG_VGA=3Dy CONFIG_VGA_PCI=3Dy -CONFIG_IVSHMEM=3D$(CONFIG_EVENTFD) +CONFIG_IVSHMEM_DEVICE=3D$(CONFIG_EVENTFD) CONFIG_ROCKER=3Dy CONFIG_VHOST_USER_SCSI=3D$(CONFIG_LINUX) --=20 2.7.4 From nobody Mon Apr 29 13:20:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500023120822809.0023379635682; Fri, 14 Jul 2017 02:05:20 -0700 (PDT) Received: from localhost ([::1]:36361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwWt-0005kU-CI for importer@patchew.org; Fri, 14 Jul 2017 05:04:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwV8-0003rQ-5h for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVwV7-0005yJ-9M for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:06 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37570) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVwV6-0005xZ-UY for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:05 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dVw2l-0007U7-6P; Fri, 14 Jul 2017 09:33:47 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 14 Jul 2017 09:33:44 +0100 Message-Id: <1500021225-4118-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500021225-4118-1-git-send-email-peter.maydell@linaro.org> References: <1500021225-4118-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH 2/3] configure: Use an explicit CONFIG_IVSHMEM rather than CONFIG_EVENTFD X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Rytarowski , Markus Armbruster , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Kamil Rytarowski Rather than relying on everywhere that cares about whether the host supports ivshmem using CONFIG_EVENTFD, make configure set an explicit CONFIG_IVSHMEM. Signed-off-by: Kamil Rytarowski [PMM: split out from another patch, add commit message] Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster --- configure | 9 +++++++++ tests/Makefile.include | 4 ++-- default-configs/pci.mak | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 5096cbc..dea46c5 100755 --- a/configure +++ b/configure @@ -4969,6 +4969,11 @@ qemu_moddir=3D$libdir$confsuffix qemu_datadir=3D$datadir$confsuffix qemu_localedir=3D"$datadir/locale" =20 +# We can only support ivshmem if we have eventfd +if [ "$eventfd" =3D "yes" ]; then + ivshmem=3Dyes +fi + tools=3D"" if test "$want_tools" =3D "yes" ; then tools=3D"qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" @@ -5955,6 +5960,10 @@ if test "$have_static_assert" =3D "yes" ; then echo "CONFIG_STATIC_ASSERT=3Dy" >> $config_host_mak fi =20 +if test "$ivshmem" =3D "yes" ; then + echo "CONFIG_IVSHMEM=3Dy" >> $config_host_mak +fi + # Hold two types of flag: # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name = on # a thread we have a handle to diff --git a/tests/Makefile.include b/tests/Makefile.include index 42e17e2..6d6cb74 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -201,7 +201,7 @@ gcov-files-pci-y +=3D hw/display/virtio-gpu-pci.c gcov-files-pci-$(CONFIG_VIRTIO_VGA) +=3D hw/display/virtio-vga.c check-qtest-pci-y +=3D tests/intel-hda-test$(EXESUF) gcov-files-pci-y +=3D hw/audio/intel-hda.c hw/audio/hda-codec.c -check-qtest-pci-$(CONFIG_EVENTFD) +=3D tests/ivshmem-test$(EXESUF) +check-qtest-pci-$(CONFIG_IVSHMEM) +=3D tests/ivshmem-test$(EXESUF) gcov-files-pci-y +=3D hw/misc/ivshmem.c check-qtest-pci-y +=3D tests/megasas-test$(EXESUF) gcov-files-pci-y +=3D hw/scsi/megasas.c @@ -303,7 +303,7 @@ check-qtest-ppc64-y +=3D tests/test-filter-mirror$(EXES= UF) check-qtest-ppc64-y +=3D tests/test-filter-redirector$(EXESUF) check-qtest-ppc64-y +=3D tests/display-vga-test$(EXESUF) check-qtest-ppc64-y +=3D tests/numa-test$(EXESUF) -check-qtest-ppc64-$(CONFIG_EVENTFD) +=3D tests/ivshmem-test$(EXESUF) +check-qtest-ppc64-$(CONFIG_IVSHMEM) +=3D tests/ivshmem-test$(EXESUF) =20 check-qtest-sh4-y =3D tests/endianness-test$(EXESUF) =20 diff --git a/default-configs/pci.mak b/default-configs/pci.mak index 2451eb2..acaa703 100644 --- a/default-configs/pci.mak +++ b/default-configs/pci.mak @@ -41,6 +41,6 @@ CONFIG_SDHCI=3Dy CONFIG_EDU=3Dy CONFIG_VGA=3Dy CONFIG_VGA_PCI=3Dy -CONFIG_IVSHMEM_DEVICE=3D$(CONFIG_EVENTFD) +CONFIG_IVSHMEM_DEVICE=3D$(CONFIG_IVSHMEM) CONFIG_ROCKER=3Dy CONFIG_VHOST_USER_SCSI=3D$(CONFIG_LINUX) --=20 2.7.4 From nobody Mon Apr 29 13:20:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500023845396725.6164601791546; Fri, 14 Jul 2017 02:17:25 -0700 (PDT) Received: from localhost ([::1]:36420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwix-0006Ux-T2 for importer@patchew.org; Fri, 14 Jul 2017 05:17:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwVE-0003wC-1G for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVwVD-00060e-4d for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:12 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37573) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVwVC-00060O-TL for qemu-devel@nongnu.org; Fri, 14 Jul 2017 05:03:11 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dVw2l-0007UL-Kz; Fri, 14 Jul 2017 09:33:47 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 14 Jul 2017 09:33:45 +0100 Message-Id: <1500021225-4118-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500021225-4118-1-git-send-email-peter.maydell@linaro.org> References: <1500021225-4118-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH 3/3] configure: Don't build ivshmem tools unless CONFIG_IVSHMEM is set X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Rytarowski , Markus Armbruster , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Kamil Rytarowski Don't try to build the ivshmem-server and ivshmem-client tools unless CONFIG_IVSHMEM is set. This fixes in passing a build bug on NetBSD, which fails to build the ivshmem tools because they use shm_open() and on NetBSD that requires linking against -lrt. Signed-off-by: Kamil Rytarowski [PMM: moved some code into earlier patches; minor bugfixes; added commit message] Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster --- configure | 2 ++ Makefile | 2 ++ Makefile.objs | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index dea46c5..b54bc2e 100755 --- a/configure +++ b/configure @@ -4979,6 +4979,8 @@ if test "$want_tools" =3D "yes" ; then tools=3D"qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" if [ "$linux" =3D "yes" -o "$bsd" =3D "yes" -o "$solaris" =3D "yes" ] ; = then tools=3D"qemu-nbd\$(EXESUF) $tools" + fi + if [ "$ivshmem" =3D "yes" ]; then tools=3D"ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools" fi fi diff --git a/Makefile b/Makefile index 16a0430..5d5bd6a 100644 --- a/Makefile +++ b/Makefile @@ -470,10 +470,12 @@ ifneq ($(EXESUF),) qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) endif =20 +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, $^) =20 diff --git a/Makefile.objs b/Makefile.objs index bfd5a6c..24a4ea0 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -107,8 +107,8 @@ qga-vss-dll-obj-y =3D qga/ =20 ###################################################################### # contrib -ivshmem-client-obj-y =3D contrib/ivshmem-client/ -ivshmem-server-obj-y =3D contrib/ivshmem-server/ +ivshmem-client-obj-$(CONFIG_IVSHMEM) =3D contrib/ivshmem-client/ +ivshmem-server-obj-$(CONFIG_IVSHMEM) =3D contrib/ivshmem-server/ libvhost-user-obj-y =3D contrib/libvhost-user/ vhost-user-scsi.o-cflags :=3D $(LIBISCSI_CFLAGS) vhost-user-scsi.o-libs :=3D $(LIBISCSI_LIBS) --=20 2.7.4