From patchwork Fri Jul 14 08:33:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 107738 Delivered-To: patches@linaro.org Received: by 10.140.101.44 with SMTP id t41csp598978qge; Fri, 14 Jul 2017 01:33:51 -0700 (PDT) X-Received: by 10.99.96.141 with SMTP id u135mr13546467pgb.129.1500021231530; Fri, 14 Jul 2017 01:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500021231; cv=none; d=google.com; s=arc-20160816; b=B74WM/Q6BM0f5qN6Wb9hGl9r63JOUOX+NdoIdLFfJfleA6mCPUPuVFowlI7nGRn/v4 jS5PmzvdMgip1hErE9YbuV8XCM9IW4vhIkpUyl+7z4j905vMT90zlt8Tbf7/KXOlI8dS PIh32TO7ZnMkx+h8t7QNmf0KWGILCXJFYjgMjHKxJ1tdSU82LbVwBip4ao3fboiQR26h NPdQLWmk9k3G1Dff7hKg7UDHKTphlXy2sP9X0emDjSt7zE+Kg4A4+QC2N6PsUf9QNGx/ kVs78bR2yVJjIDlOZDO/l4bbx7bqEWoNBHuK3ANwb7xiR86zd2oqbVrdTXCn/iZlT6Nz rY5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=39rMXk2uSXAuX1N4xKEXRmKOagY1P4a7lpGqI/K/LUw=; b=RG4KMqjsgg2kNgVRsTi1hxdCZMF9zX/vmScLpStCUahFGzzIe4jxhMV8iiAnhk12f/ seYRxWRa1ZuUb9EYjvnlRo8vKfoXAR3OympceYraDorl2PxhoFrrZeah+Xv8K8LB/RvH W5IW6ZR8ZQ2VN2tOzkckatgFUfBGJdpYUjV6dvjiqq+5VqE17GwKinfWBPLqgVtFd9/4 WOczkc2y5uabESr9QgIa95q6J0VDETjjmH4Wu4PkvwPRwxqANkF4GmWDtSp1iLiymqTg QM7OJMXatPg8kg2Z3TXnXWLjC7a7DJDn+yQLIrE5iyKB7Yf+VHwa5idOArv9FBBEFecR 9mtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id o81si6018537pfi.131.2017.07.14.01.33.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jul 2017 01:33:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 Cc: patches@linaro.org, Kamil Rytarowski , Markus Armbruster Subject: [PATCH 1/3] configure: Rename CONFIG_IVSHMEM to CONFIG_IVSHMEM_DEVICE 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> 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 --- hw/misc/Makefile.objs | 2 +- default-configs/pci.mak | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 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) += 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/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=y CONFIG_EDU=y CONFIG_VGA=y CONFIG_VGA_PCI=y -CONFIG_IVSHMEM=$(CONFIG_EVENTFD) +CONFIG_IVSHMEM_DEVICE=$(CONFIG_EVENTFD) CONFIG_ROCKER=y CONFIG_VHOST_USER_SCSI=$(CONFIG_LINUX) From patchwork Fri Jul 14 08:33:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 107737 Delivered-To: patches@linaro.org Received: by 10.140.101.44 with SMTP id t41csp598935qge; Fri, 14 Jul 2017 01:33:48 -0700 (PDT) X-Received: by 10.46.9.71 with SMTP id 68mr484322ljj.120.1500021228455; Fri, 14 Jul 2017 01:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500021228; cv=none; d=google.com; s=arc-20160816; b=dW2n1ENxtmwB2aP2UtVct1b2fXaWCrjQ5QUQEdvt1lOu+nLTl0JGDGbTi69gmEQcqT dZcyGfihvu1J6LvR2Kx3N6/WU781sIhvDHpkO1Qy3B+sEM5HSC2bx7cfJy4TfpQgVzFf NP1CMhMKIp1gst7jRCNYv8kWTMqXmHVXNaZ9k/OzD+pXzF+7e2SQq/yNv/Hkn0XcDsai q36b9Z4MLTYpGJkaz/jjPu2ErUZeLwWbo+6ZU5lhmFF3yFKumGKfIk9AgdB5+yWUA2Pk c0DD7rCJfjsq42Emk8zlFAGcbkITlMls12NfdNy40pn5FKYt/g3NhqWngkZUEhtDrywe gTvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sco9iKzg6///ImzkfewZj31chZdRvH4JcJonMNbWQ7o=; b=IZ8ybvdAIofpvsJvhGyTPkFFe4I5MSVuxxsKxe7nY6/tQNjFQmfFUiO/5B3R75RFuB qnL89K9OuHH6tGj02qdKCbuilMbrDH2nzKPutDw5+UhPz0E01R46PJmrxPwcIETd1Osa yakJ5bT/eJxeY+sIMCfjaaZdfRf4u2gwoo/oYdAIpIU5hoRPuiWfTCofIfekZ2xb5fm8 j3y6AU4WY+11cvzqRXbQ5d84Ub6/SyoUlm2lGSL0iUh1uu4J2L+1XxE8DwuRdapoWLgy Z6cZKxlqxs8jsRgjzNBeLzvkCeJKTcRymsYxpBWLaTVB1O5TMIRnS0Kk9/8mUNoM6YeR 6zLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id q87si4200389lfi.67.2017.07.14.01.33.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jul 2017 01:33:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 Cc: patches@linaro.org, Kamil Rytarowski , Markus Armbruster Subject: [PATCH 2/3] configure: Use an explicit CONFIG_IVSHMEM rather than CONFIG_EVENTFD 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> 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 --- configure | 9 +++++++++ tests/Makefile.include | 4 ++-- default-configs/pci.mak | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/configure b/configure index 5096cbc..dea46c5 100755 --- a/configure +++ b/configure @@ -4969,6 +4969,11 @@ 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" @@ -5955,6 +5960,10 @@ if test "$have_static_assert" = "yes" ; then echo "CONFIG_STATIC_ASSERT=y" >> $config_host_mak fi +if test "$ivshmem" = "yes" ; then + echo "CONFIG_IVSHMEM=y" >> $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 += 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 @@ -303,7 +303,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) 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=y CONFIG_EDU=y CONFIG_VGA=y CONFIG_VGA_PCI=y -CONFIG_IVSHMEM_DEVICE=$(CONFIG_EVENTFD) +CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM) CONFIG_ROCKER=y CONFIG_VHOST_USER_SCSI=$(CONFIG_LINUX) From patchwork Fri Jul 14 08:33:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 107736 Delivered-To: patches@linaro.org Received: by 10.140.101.44 with SMTP id t41csp598927qge; Fri, 14 Jul 2017 01:33:48 -0700 (PDT) X-Received: by 10.223.132.7 with SMTP id 7mr4294964wrf.187.1500021228070; Fri, 14 Jul 2017 01:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500021228; cv=none; d=google.com; s=arc-20160816; b=PQwcQUe/60+nKkQ5Q2cimJJjx8oRSW1CuuXRYVVR6IkDjLRqUB2pgQyZBrjfLVThtr 97EqPBiNvDC/YK1F1ZjzQMpvVjxm/TjI6JUfwIU41PaA4JiKw6BagmVpevhzXKk943SS MWlrBrjbB5z9w1ul4/R5W+qnjszB3Jy6AzHytMA8oSXqXbxUgRfGrpOhTx9/tokgdbuY e2CQnWwuHEUBnlI2/ExjCbVAGOgRi/KnRaRR9v2wcLcbAO9KwVMQ1cji6m1xokK+6wrE TSxxyUgqSpYPz7LM+B3jfnx0BMmDOpnHwDpcTBRQatIEyqpzBnOPVrtyEs4Pb6FARQvY hZRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=P8t+9gUNz+1Tk1jAcfv8Lw4d/0hfBIbCsGpAHjRQeTg=; b=AAcpO2hum+wL0WzFYFxTfwqSvVR8vqF7qMO0Cy6JlGmRHO8InGAxivbq1yY4iYFyjI PdOB1++bNiheK8tlPc4LLikscs6Bjdkdu0PO/oLaapNhS/Jnrbuxk8vnF+GEoZ1v9SZT IDwUcDE7CFei9zHUl/YjGiGsiXkeA66TbdonqQXvaKb/4PKnSPiOLvNoFiRd9JEWP73m Bm4vNOFwvp1HR7UAkJlD/hIR1Z6UcWgw51bNCsgvAoJu9B0Bmaa33eBsZ+UZoilyWaTg L026kCqdhlPTdk7DNK1ueIXOTZaz6IyrY14mRcNP4JMlSLu57etk2Pbk15lK+1i89UJO 91Hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id q48si6007239wrb.280.2017.07.14.01.33.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jul 2017 01:33:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 Cc: patches@linaro.org, Kamil Rytarowski , Markus Armbruster Subject: [PATCH 3/3] configure: Don't build ivshmem tools unless CONFIG_IVSHMEM is set 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> 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 --- configure | 2 ++ Makefile | 2 ++ Makefile.objs | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/configure b/configure index dea46c5..b54bc2e 100755 --- a/configure +++ b/configure @@ -4979,6 +4979,8 @@ 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 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 +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/Makefile.objs b/Makefile.objs index bfd5a6c..24a4ea0 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -107,8 +107,8 @@ qga-vss-dll-obj-y = qga/ ###################################################################### # contrib -ivshmem-client-obj-y = contrib/ivshmem-client/ -ivshmem-server-obj-y = contrib/ivshmem-server/ +ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/ +ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/ libvhost-user-obj-y = contrib/libvhost-user/ vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS) vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)