From nobody Wed Apr 24 18:05:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552574648038277.5280820380997; Thu, 14 Mar 2019 07:44:08 -0700 (PDT) Received: from localhost ([127.0.0.1]:38851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4RaT-0006Ke-1t for importer@patchew.org; Thu, 14 Mar 2019 10:44:01 -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) Content-Transfer-Encoding: quoted-printable 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Alistair Francis Reviewed-by: Michael S. Tsirkin --- 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 =20 config ARM_GIC bool + select MSI =20 config OPENPIC bool + select MSI =20 config APIC bool + select MSI =20 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 =20 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 =20 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 --=20 2.20.1 From nobody Wed Apr 24 18:05:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552574605057463.81624563021376; Thu, 14 Mar 2019 07:43:25 -0700 (PDT) Received: from localhost ([127.0.0.1]:38849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4RZk-0005oJ-St for importer@patchew.org; Thu, 14 Mar 2019 10:43:16 -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) Content-Transfer-Encoding: quoted-printable 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Alistair Francis Reviewed-by: Michael S. Tsirkin --- 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 =20 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 =3D \ CONFIG_X11=3D$(CONFIG_X11) \ CONFIG_VHOST_USER=3D$(CONFIG_VHOST_USER) \ CONFIG_VIRTFS=3D$(CONFIG_VIRTFS) \ - CONFIG_LINUX=3D$(CONFIG_LINUX) + CONFIG_LINUX=3D$(CONFIG_LINUX) \ + CONFIG_PVRDMA=3D$(CONFIG_PVRDMA) =20 MINIKCONF_INPUTS =3D $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig MINIKCONF =3D $(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 =20 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 =20 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 =20 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 =20 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 =20 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 =20 config IOH3420 bool default y if PCI_DEVICES - depends on PCI_EXPRESS + depends on PCI_EXPRESS && MSI =20 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) +=3D rdma_utils.o rdma_backend.o rdma_rm.o -obj-$(CONFIG_PCI) +=3D vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ +obj-$(CONFIG_VMW_PVRDMA) +=3D rdma_utils.o rdma_backend.o rdma_rm.o +obj-$(CONFIG_VMW_PVRDMA) +=3D vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o -endif --=20 2.20.1