From patchwork Wed Mar 27 12:37:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1066951 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="unD/bpa9"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Tngb6RDWz9sP3 for ; Wed, 27 Mar 2019 23:41:47 +1100 (AEDT) Received: from localhost ([127.0.0.1]:47141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h97sH-0006M0-Jy for incoming@patchwork.ozlabs.org; Wed, 27 Mar 2019 08:41:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h97om-0003i0-Vb for qemu-devel@nongnu.org; Wed, 27 Mar 2019 08:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h97ok-0002Sw-Sm for qemu-devel@nongnu.org; Wed, 27 Mar 2019 08:38:08 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h97ok-0002Sa-JI for qemu-devel@nongnu.org; Wed, 27 Mar 2019 08:38:06 -0400 Received: by mail-wr1-x441.google.com with SMTP id w10so18382110wrm.4 for ; Wed, 27 Mar 2019 05:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=zSJEqu6Q4/n4BrURKnFhVLXdmdiMLkMX3qO5THUb5UY=; b=unD/bpa9NG6J9emJzSmi/eE1PrRMVFD3ch6VsWj8yv2uXmRnQfsFbEzqEsEkike/mq g5nVE7KU9w6UU8hEvjXhqthIkfORvH1k6zkhPQk7gdx288l3zhCLeROYat8Fhjo1OZAi jhsiJWl6WrA9jilWhM8zj7kYyIRGa9ChmlznQy20UgK5VZJQw4oaDgC+C5ILwV7P7Ebh JUTLmn7KwCiI6A0zy4zFefLJwBmXxk59Rj9nFo30PawDWIhzu4DA2ZG+iM4cROzxteQy rDAROz2mc2HGqzinwSKjFH3z0OPSeWHRiMinY1/mVKeS2bv1347avogz+E/WxS/KNVXU 0xeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=zSJEqu6Q4/n4BrURKnFhVLXdmdiMLkMX3qO5THUb5UY=; b=AGw/18AVDcEnwL4jN4SuE6LsPlIDDzabViXxseOWmhwRPEWNdvWJoOQbxUc5/QI/jC T3VNdXKwCoIzt/V+Se5FLpLpzF/I8raYpC325jpCU4vT89tj5YBnoorFuwx1vFuvqj8R byFo0IycoK75rT4iz2FlqStOnsp9ntZj+tz3Ch5SyYsgX3jhxHoRxkhg1+3vMPIho2Zx bVJ9PgJoElSmRJpy4tgCwGjpXTzjT+0eJqrsRhj6XCltRmV5GKX/zJoYhVQH6emdaL9M Oiaur34s4anJuAdbhsqnL0djoWmq9D2vy7z3Q/oVgOc/xL8LDtpnTnq1C+h4jxui9YR9 fCig== X-Gm-Message-State: APjAAAU5m7ukZLjz7fXj8uZ9FPdwTvAGVYEBhmlQ5xpvUlpwSWc8ya93 UqkOP6XoEZmBwwttfQs2m3hTi1Jc X-Google-Smtp-Source: APXvYqxnSp7UX7uEgPOF1AWTeOK9uXoEG+ST8t4sbEVJMzxmu+kQI3TwHdAKgtvoqySpExrTA2rFoQ== X-Received: by 2002:a5d:6a12:: with SMTP id m18mr5608085wru.325.1553690285324; Wed, 27 Mar 2019 05:38:05 -0700 (PDT) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id c20sm27722863wre.28.2019.03.27.05.38.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 05:38:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 27 Mar 2019 13:37:40 +0100 Message-Id: <1553690281-81854-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1553690281-81854-1-git-send-email-pbonzini@redhat.com> References: <1553690281-81854-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PULL 02/23] kconfig: add CONFIG_MSI_NONBROKEN 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: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Not all interrupt controllers have a working implementation of message-signalled interrupts; in some cases, the guest may expect MSI to work but it won't due to the buggy or lacking emulation. 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 | 6 ++++++ hw/ppc/Kconfig | 1 + hw/riscv/Kconfig | 1 + hw/s390x/Kconfig | 1 + 6 files changed, 13 insertions(+) diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig index de10a6b..5347f84 100644 --- a/hw/intc/Kconfig +++ b/hw/intc/Kconfig @@ -12,12 +12,15 @@ config IOAPIC config ARM_GIC bool + select MSI_NONBROKEN config OPENPIC bool + select MSI_NONBROKEN config APIC bool + select MSI_NONBROKEN config ARM_GIC_KVM bool diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig index b39ea29..8c16d96 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_NONBROKEN diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig index 3b8638b..77f8b00 100644 --- a/hw/pci/Kconfig +++ b/hw/pci/Kconfig @@ -7,3 +7,9 @@ config PCI_EXPRESS config PCI_DEVICES bool + +config MSI_NONBROKEN + # selected by interrupt controllers that do not support MSI, + # or support it and have a good implementation. See commit + # 47d2b0f33c664533b8dbd5cb17faa8e6a01afe1f. + bool diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index 2b83637..73b473c 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_NONBROKEN config SPAPR_RNG bool diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index 8c7fc1f..8674211 100644 --- a/hw/riscv/Kconfig +++ b/hw/riscv/Kconfig @@ -6,6 +6,7 @@ config HART config SIFIVE bool + select MSI_NONBROKEN config SIFIVE_E bool diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index a7046ea..5e7d8a2 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_NONBROKEN