From patchwork Thu Mar 14 14:30:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 10853027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A7586C2 for ; Thu, 14 Mar 2019 14:43:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 158BA28C76 for ; Thu, 14 Mar 2019 14:43:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 072632A521; Thu, 14 Mar 2019 14:43:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A58E228C76 for ; Thu, 14 Mar 2019 14:43:23 +0000 (UTC) Received: from localhost ([127.0.0.1]:38851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4RZq-0006Ke-Tb for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Mar 2019 10:43:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4RXe-0004IV-L4 for qemu-devel@nongnu.org; Thu, 14 Mar 2019 10:41:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4RNZ-0005gH-6m for qemu-devel@nongnu.org; Thu, 14 Mar 2019 10:30:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55319) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h4RNY-0005fo-Sl for qemu-devel@nongnu.org; Thu, 14 Mar 2019 10:30:41 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F36E66230; Thu, 14 Mar 2019 14:30:40 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-69.ams2.redhat.com [10.36.112.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F99C60BE6; Thu, 14 Mar 2019 14:30:37 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2019 15:30:31 +0100 Message-Id: <20190314143032.16870-2-pbonzini@redhat.com> In-Reply-To: <20190314143032.16870-1-pbonzini@redhat.com> References: <20190314143032.16870-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 14 Mar 2019 14:30:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] kconfig: add CONFIG_MSI 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: qemu-riscv@gnu.org, thuth@redhat.com, David Abdurachmanov , abologna@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Not all interrupt controllers support message-signalled interrupts, and some devices *only* support message-signalled interrupts. In QEMU this is represented by the "msi_nonbroken" variable. This patch adds a new configuration symbol enabled whenever the binary contains an interrupt controller that will set "msi_nonbroken". We can then use it to remove devices that cannot be possibly added to the machine, because they require MSI. Signed-off-by: Paolo Bonzini --- hw/intc/Kconfig | 3 +++ hw/pci-host/Kconfig | 1 + hw/pci/Kconfig | 4 ++++ hw/ppc/Kconfig | 1 + hw/s390x/Kconfig | 1 + 5 files changed, 10 insertions(+) diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig index de10a6bcbf..e78b5db3be 100644 --- a/hw/intc/Kconfig +++ b/hw/intc/Kconfig @@ -12,12 +12,15 @@ config IOAPIC config ARM_GIC bool + select MSI config OPENPIC bool + select MSI config APIC bool + select MSI config ARM_GIC_KVM bool diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig index b39ea297ba..58c99f55fa 100644 --- a/hw/pci-host/Kconfig +++ b/hw/pci-host/Kconfig @@ -49,3 +49,4 @@ config PCI_EXPRESS_XILINX config PCI_EXPRESS_DESIGNWARE bool select PCI_EXPRESS + select MSI diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig index 3b8638b51d..574b5d4a4a 100644 --- a/hw/pci/Kconfig +++ b/hw/pci/Kconfig @@ -7,3 +7,7 @@ config PCI_EXPRESS config PCI_DEVICES bool + +config MSI + # selected by interrupt controllers that support MSI + bool diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index 2b83637511..c14f7ea4fe 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -8,6 +8,7 @@ config PSERIES select VFIO if LINUX # needed by spapr_pci_vfio.c select XICS_SPAPR select XIVE_SPAPR + select MSI config SPAPR_RNG bool diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index a7046ea41f..ac0f335584 100644 --- a/hw/s390x/Kconfig +++ b/hw/s390x/Kconfig @@ -9,3 +9,4 @@ config S390_CCW_VIRTIO select S390_FLIC select SCLPCONSOLE select VIRTIO_CCW + select MSI From patchwork Thu Mar 14 14:30:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 10853025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 924DF6C2 for ; Thu, 14 Mar 2019 14:42:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DC392A544 for ; Thu, 14 Mar 2019 14:42:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BAFE2A558; Thu, 14 Mar 2019 14:42:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 075EF2A544 for ; Thu, 14 Mar 2019 14:42:41 +0000 (UTC) Received: from localhost ([127.0.0.1]:38849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4RZB-0005oJ-4B for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Mar 2019 10:42:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4RXe-0004SJ-Jx for qemu-devel@nongnu.org; Thu, 14 Mar 2019 10:41:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4RNb-0005hW-Nc for qemu-devel@nongnu.org; Thu, 14 Mar 2019 10:30:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32904) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h4RNb-0005hC-EV for qemu-devel@nongnu.org; Thu, 14 Mar 2019 10:30:43 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B0ABE3099F9D; Thu, 14 Mar 2019 14:30:42 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-69.ams2.redhat.com [10.36.112.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id A712A60BE6; Thu, 14 Mar 2019 14:30:40 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2019 15:30:32 +0100 Message-Id: <20190314143032.16870-3-pbonzini@redhat.com> In-Reply-To: <20190314143032.16870-1-pbonzini@redhat.com> References: <20190314143032.16870-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 14 Mar 2019 14:30:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] kconfig: add dependencies on CONFIG_MSI 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: qemu-riscv@gnu.org, thuth@redhat.com, David Abdurachmanov , abologna@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP For devices that require msi_init/msix_init to succeed, add a dependency on CONFIG_MSI. This will prevent those devices from appearing in a binary that cannot instantiate them. Signed-off-by: Paolo Bonzini --- Kconfig.host | 3 +++ Makefile | 3 ++- hw/Kconfig | 1 + hw/misc/Kconfig | 4 ++-- hw/net/Kconfig | 4 ++-- hw/pci-bridge/Kconfig | 6 +++--- hw/rdma/Kconfig | 3 +++ hw/rdma/Makefile.objs | 6 ++---- 8 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 hw/rdma/Kconfig diff --git a/Kconfig.host b/Kconfig.host index add5b179f7..aec95365ff 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -31,3 +31,6 @@ config XEN config VIRTFS bool + +config PVRDMA + bool diff --git a/Makefile b/Makefile index 6ccb8639b0..bdffa4e7cc 100644 --- a/Makefile +++ b/Makefile @@ -356,7 +356,8 @@ MINIKCONF_ARGS = \ CONFIG_X11=$(CONFIG_X11) \ CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \ CONFIG_VIRTFS=$(CONFIG_VIRTFS) \ - CONFIG_LINUX=$(CONFIG_LINUX) + CONFIG_LINUX=$(CONFIG_LINUX) \ + CONFIG_PVRDMA=$(CONFIG_PVRDMA) MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \ diff --git a/hw/Kconfig b/hw/Kconfig index d5ecd02070..88b9f15007 100644 --- a/hw/Kconfig +++ b/hw/Kconfig @@ -26,6 +26,7 @@ source pci-bridge/Kconfig source pci-host/Kconfig source pcmcia/Kconfig source pci/Kconfig +source rdma/Kconfig source scsi/Kconfig source sd/Kconfig source smbios/Kconfig diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig index 2c60be99bc..eaf057eb0d 100644 --- a/hw/misc/Kconfig +++ b/hw/misc/Kconfig @@ -34,7 +34,7 @@ config PCI_TESTDEV config EDU bool default y if TEST_DEVICES - depends on PCI + depends on PCI && MSI config PCA9552 bool @@ -67,7 +67,7 @@ config MACIO config IVSHMEM_DEVICE bool default y if PCI_DEVICES - depends on PCI && LINUX && IVSHMEM + depends on PCI && LINUX && IVSHMEM && MSI config ECCMEMCTL bool diff --git a/hw/net/Kconfig b/hw/net/Kconfig index c00ec03cd1..5b6a506627 100644 --- a/hw/net/Kconfig +++ b/hw/net/Kconfig @@ -28,7 +28,7 @@ config E1000_PCI config E1000E_PCI_EXPRESS bool default y if PCI_DEVICES - depends on PCI_EXPRESS + depends on PCI_EXPRESS && MSI config RTL8139_PCI bool @@ -107,7 +107,7 @@ config ETSEC config ROCKER bool default y if PCI_DEVICES - depends on PCI + depends on PCI && MSI config CAN_BUS bool diff --git a/hw/pci-bridge/Kconfig b/hw/pci-bridge/Kconfig index b167b98497..266072b2ee 100644 --- a/hw/pci-bridge/Kconfig +++ b/hw/pci-bridge/Kconfig @@ -1,7 +1,7 @@ config PCIE_PORT bool default y if PCI_DEVICES - depends on PCI_EXPRESS + depends on PCI_EXPRESS && MSI config PXB bool @@ -10,12 +10,12 @@ config PXB config XIO3130 bool default y if PCI_DEVICES - depends on PCI_EXPRESS + depends on PCI_EXPRESS && MSI config IOH3420 bool default y if PCI_DEVICES - depends on PCI_EXPRESS + depends on PCI_EXPRESS && MSI config I82801B11 bool diff --git a/hw/rdma/Kconfig b/hw/rdma/Kconfig new file mode 100644 index 0000000000..69ef0b49be --- /dev/null +++ b/hw/rdma/Kconfig @@ -0,0 +1,3 @@ +config VMW_PVRDMA + default y if PCI_DEVICES + depends on PVRDMA && PCI && MSI diff --git a/hw/rdma/Makefile.objs b/hw/rdma/Makefile.objs index bd36cbf51c..533ab2f84a 100644 --- a/hw/rdma/Makefile.objs +++ b/hw/rdma/Makefile.objs @@ -1,5 +1,3 @@ -ifeq ($(CONFIG_PVRDMA),y) -obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o -obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ +obj-$(CONFIG_VMW_PVRDMA) += rdma_utils.o rdma_backend.o rdma_rm.o +obj-$(CONFIG_VMW_PVRDMA) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o -endif