Message ID | 166869767519.4906.15352965310185673367.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp452601wrr; Thu, 17 Nov 2022 07:10:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf7/NmOsRe6pd0aBBxIYDfm5ymoLVNTmXF9Fng/99DiIWnN/FWTpKnPtyo2MbSS9qjOLEkIh X-Received: by 2002:a17:906:3607:b0:78d:585e:d183 with SMTP id q7-20020a170906360700b0078d585ed183mr2422556ejb.768.1668697849957; Thu, 17 Nov 2022 07:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668697849; cv=none; d=google.com; s=arc-20160816; b=uZ7F12JWvDagyfg7OeIEPflp0NMDBQjWFo0yEBm706biV0vbpE+n/9RQXhLge3zYJO SkPuwZxv5AlC/u9jTnKQaPl+Dp0EB6bI8pmIiUJ/ryL6pbfmv0IqKX2FIRumqyTioR9K fzaZIsGJi+NPaR4bO7XiMlFjSRpk7z2ceMglbNOu7Sdq0+KifNpW/F+/aRDlyiwWfgiG xN+NofjyeugSyOiTXMPBPS+1y0OyjMtC8umFpUL6D8s4BI/0CzgEKGa7x49OhalumO1q d5Pk17/hTbOYeFivScYoUOn9v3icHkfEyBB5WNoidWa4MBSI91I1bKh1SPGFyHwCPZun Ho0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=PqSrWor0W3gt7s1Oft9gM5a9a3arhJ6cJus3p2ui2qI=; b=m0IomF2LxFOKzclCvii8ofuPWWEG73zCDbsTZtyrytSvg24vknCvbraBUbWJ8niac4 M/lstBaugB3W6ZIdq4llg07Rg3O9H6RmDd6WE6FlTn5djPNBURaQvw/TZANuOZzOsDL8 InBZUESHzPK7BFae9CQ/NImKsj4EG11bTNWxjc2q66W6ybiTLTjI8Sgt8qVgJVamQFCO 98+G66jAwWQTZE2w992ZDWQjKzB12YSRTq75AJIyYd2HVly/czhlNDsE09Gp3ZBsStAg HMjxgZfPvNR41oIf742FDkEqS1zBzpJnLn+TgY2PxcxIK3yE7wEUkUu2U4etszbWcvst eXpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SkpTF0wJ; dkim=neutral (no key) header.i=@linutronix.de header.b=v2tP2c+y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf21-20020a1709077f1500b007ae4ed41508si830587ejc.738.2022.11.17.07.10.11; Thu, 17 Nov 2022 07:10:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SkpTF0wJ; dkim=neutral (no key) header.i=@linutronix.de header.b=v2tP2c+y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239956AbiKQPIZ (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 17 Nov 2022 10:08:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240037AbiKQPH6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 10:07:58 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C814E74AA4; Thu, 17 Nov 2022 07:07:57 -0800 (PST) Date: Thu, 17 Nov 2022 15:07:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668697676; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PqSrWor0W3gt7s1Oft9gM5a9a3arhJ6cJus3p2ui2qI=; b=SkpTF0wJhT3WzN7CQiW/AndPqPQxGMStYzurk/jwu44MtE0Ak986n9lGmfkNx7zuy9motk eWGIkhmYmuWZ6DiM6+eGn2KxBCelaZy9GUJ38sbaLQ4LRJJKjdyc6ge1XJvm6ewFVZfF2/ VFI9mCPasrQ0hJoH4xoQ6LzRvIKL5pOpc3t+5Zf8ZcjTEqg8K3T8W/AvFFR1Z8ENTq+TA0 lQ8DxoXTEpN5XPr6ushEer9clkQhL7wYJRWgWm6yWD/x2s6HP+Sdp49ToBaEpXyEImKzcO 5Rmj1Xe7JtutC1BBYaOyipwa/FY4lQWtj9er7j0bCcnQpYZX3iYozulPliBu2w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668697676; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PqSrWor0W3gt7s1Oft9gM5a9a3arhJ6cJus3p2ui2qI=; b=v2tP2c+yKFFBoZHxB4tTlOU76e4i6RnbArV8LRKeR8na/IyWBstTo2ERiexFijTdGdqvWt PAV7YJYNm8G7pIAg== From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] PCI/MSI: Reject MSI-X early Cc: Thomas Gleixner <tglx@linutronix.de>, Jason Gunthorpe <jgg@nvidia.com>, Bjorn Helgaas <bhelgaas@google.com>, x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20221111122015.631728309@linutronix.de> References: <20221111122015.631728309@linutronix.de> MIME-Version: 1.0 Message-ID: <166869767519.4906.15352965310185673367.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749208454418919210?= X-GMAIL-MSGID: =?utf-8?q?1749756517133167396?= |
Series |
[tip:,irq/core] PCI/MSI: Reject MSI-X early
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Nov. 17, 2022, 3:07 p.m. UTC
The following commit has been merged into the irq/core branch of tip: Commit-ID: 99f3d279765725920aa5924fa445537a20129a6f Gitweb: https://git.kernel.org/tip/99f3d279765725920aa5924fa445537a20129a6f Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Fri, 11 Nov 2022 14:55:11 +01:00 Committer: Thomas Gleixner <tglx@linutronix.de> CommitterDate: Thu, 17 Nov 2022 15:15:22 +01:00 PCI/MSI: Reject MSI-X early Similar to PCI multi-MSI reject MSI-X enablement when a irq domain is attached to the device which does not support MSI-X. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20221111122015.631728309@linutronix.de --- drivers/pci/msi/msi.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index bc84647..0740acd 100644 --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -762,6 +762,10 @@ int __pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, int if (WARN_ON_ONCE(dev->msix_enabled)) return -EINVAL; + /* Check MSI-X early on irq domain enabled architectures */ + if (!pci_msi_domain_supports(dev, MSI_FLAG_PCI_MSIX, ALLOW_LEGACY)) + return -ENOTSUPP; + if (!pci_msi_supported(dev, nvec) || dev->current_state != PCI_D0) return -EINVAL;