Message ID | 20221111122013.713848846@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp752663wru; Fri, 11 Nov 2022 05:56:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf4KiUhMYs9+F/oFiAetmXk+lLZf+7wUo5iY53RzjdRSlN+drJNOeOU7G/aZoRZ+OumTpY5z X-Received: by 2002:a50:fd15:0:b0:458:fc30:f1ff with SMTP id i21-20020a50fd15000000b00458fc30f1ffmr1538792eds.132.1668174993680; Fri, 11 Nov 2022 05:56:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668174993; cv=none; d=google.com; s=arc-20160816; b=P0SNSRkgXU3RacIs9P//1TGS6iyEERxvHsJGU48pVMj23tl1TyC+JFI3Q8C2BKRDfH lvUp8450xj6M9mYtWZ1MBWeB884fRf7R2Z+nRWCb75fmhQI0bVqPTwGQ8kjOW5d72lVu n7zJOR2jBOf95AjE0MNRX+QB+Su8kgoE9RgNXp3KHvQXEI2gdK2nkIwjos4UBPCzTe1d wxAGBi3GLF44IW4dtEAwihU52StRNmgbuzNi2IkOM0nQe/DzQVpdO0WHAXsWmlmugyav BiVESsW+lpPEmNUChC9ebUVGw2uLh1Jpw1553zC+jd9EEvB3RZG4XQeg/6tCHOaTj8N7 vbAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=lEZvgy6HHUzbXINFeZhEm07cTVI+tuFx6PeXgAOnbxo=; b=WusGcamzaNreYkzs+SHxGU0UmjG21AOCiEEswJB1exRSb4FFisIPKT2zWuXzl9bUJi G9UqI+kqf4oTn/EhJseSa3hYkltz4vMWFueHlsZwNKE4AciQ9YvWpnMovsI95G9Nn5nG bjky0inJswMEXGPxC3Kb4HhLaTHif+rrkYWTBf762BZDLW/E6Ib5FYsLPqlXSRDx2KmD ntRN0cDnq/dSP3D4tyh5gtLlguZUuo8eL5aaCAM0hwAsQaJYxraQGD5q7mmeK2H8Ls2e 1eYJ2hm1VhgfRXPMsq9ssQ0KGVfC/fIsTcFhDF+1k9muH5s580UENXXivXo3pFYnEfEK yQLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="d/SC/+T3"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 d15-20020a1709063ecf00b007ad8bc64c89si1448549ejj.701.2022.11.11.05.55.34; Fri, 11 Nov 2022 05:56:33 -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="d/SC/+T3"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S233308AbiKKNy1 (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Fri, 11 Nov 2022 08:54:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233395AbiKKNyT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Nov 2022 08:54:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B35849B45; Fri, 11 Nov 2022 05:54:19 -0800 (PST) Message-ID: <20221111122013.713848846@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668174857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=lEZvgy6HHUzbXINFeZhEm07cTVI+tuFx6PeXgAOnbxo=; b=d/SC/+T3CdcHrZ8MbLToM6SSgF7cmkTyPqkaOcSGfaaP5mtPj0fjgr8rnBLbwbwdHmYuYk 7SKAOEcT6nKblCt9++hnKZvd+jnkTl1ZCW97zgckpAOxOBJmCDcHjFZupqhfm+PjbkhQpC Ckkz+Hj5GFVPZ1huA0zuyZ4hM4+gKcRlEFFA6OkAyaW7XRBfOils813Wxb61S8hx7uF8YS FPIL8fs5LmFd8YyN/0q1ix84xHIH4WCefuDCyBQmTAKbmEhRdRl4r/t8EE8uoiDCjoenXT EZBdsG29ygGfSFeQEzfgGUkF5RfcjPEM2Ne/1LcpX0GDjhCM/BBOezUEg+g0jQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668174857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=lEZvgy6HHUzbXINFeZhEm07cTVI+tuFx6PeXgAOnbxo=; b=eImqZwzolHHQM3N4D4bpfBwXxwGdxDtOGKetRv0eo1dAL0/gfurg2TqhJroXzqv0ZskPkU k56t5cHRVmzfcUCQ== From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: x86@kernel.org, Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Marc Zyngier <maz@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jason Gunthorpe <jgg@mellanox.com>, Dave Jiang <dave.jiang@intel.com>, Alex Williamson <alex.williamson@redhat.com>, Kevin Tian <kevin.tian@intel.com>, Dan Williams <dan.j.williams@intel.com>, Logan Gunthorpe <logang@deltatee.com>, Ashok Raj <ashok.raj@intel.com>, Jon Mason <jdmason@kudzu.us>, Allen Hubbe <allenbh@gmail.com>, Michael Ellerman <mpe@ellerman.id.au>, Christophe Leroy <christophe.leroy@csgroup.eu>, linuxppc-dev@lists.ozlabs.org, "Ahmed S. Darwish" <darwi@linutronix.de>, Reinette Chatre <reinette.chatre@intel.com> Subject: [patch 02/39] iommu/vt-d: Remove bogus check for multi MSI-X References: <20221111120501.026511281@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Fri, 11 Nov 2022 14:54:17 +0100 (CET) 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?1749208262382472286?= X-GMAIL-MSGID: =?utf-8?q?1749208262382472286?= |
Series |
genirq, PCI/MSI: Support for per device MSI and PCI/IMS - Part 1 cleanups
|
|
Commit Message
Thomas Gleixner
Nov. 11, 2022, 1:54 p.m. UTC
PCI/Multi-MSI is MSI specific and not supported for MSI-X.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/iommu/intel/irq_remapping.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Fri, Nov 11, 2022 at 02:54:17PM +0100, Thomas Gleixner wrote: > PCI/Multi-MSI is MSI specific and not supported for MSI-X. > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > --- > drivers/iommu/intel/irq_remapping.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > --- a/drivers/iommu/intel/irq_remapping.c > +++ b/drivers/iommu/intel/irq_remapping.c > @@ -1334,8 +1334,7 @@ static int intel_irq_remapping_alloc(str > > if (!info || !iommu) > return -EINVAL; > - if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI && > - info->type != X86_IRQ_ALLOC_TYPE_PCI_MSIX) > + if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI) > return -EINVAL; > > /* > This check is only making sure that when multi-msi is requested that the type has to be either MSI/MSIX. Wouldn't this change return -EINVAL when type = MSIX?
On Wed, Nov 16 2022 at 07:52, Ashok Raj wrote: > On Fri, Nov 11, 2022 at 02:54:17PM +0100, Thomas Gleixner wrote: >> PCI/Multi-MSI is MSI specific and not supported for MSI-X. >> >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> >> --- >> drivers/iommu/intel/irq_remapping.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> --- a/drivers/iommu/intel/irq_remapping.c >> +++ b/drivers/iommu/intel/irq_remapping.c >> @@ -1334,8 +1334,7 @@ static int intel_irq_remapping_alloc(str >> >> if (!info || !iommu) >> return -EINVAL; >> - if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI && >> - info->type != X86_IRQ_ALLOC_TYPE_PCI_MSIX) >> + if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI) >> return -EINVAL; >> >> /* >> > > This check is only making sure that when multi-msi is requested that the > type has to be either MSI/MSIX. MSI-X does not support multi vector allocations on a single entry. > Wouldn't this change return -EINVAL when type = MSIX? Rightfully so. MSIX vectors are allocated one by one. Has been that way forever. Thanks, tglx
On Wed, Nov 16, 2022 at 06:02:30PM +0100, Thomas Gleixner wrote: > On Wed, Nov 16 2022 at 07:52, Ashok Raj wrote: > > On Fri, Nov 11, 2022 at 02:54:17PM +0100, Thomas Gleixner wrote: > >> PCI/Multi-MSI is MSI specific and not supported for MSI-X. > >> > >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > >> --- > >> drivers/iommu/intel/irq_remapping.c | 3 +-- > >> 1 file changed, 1 insertion(+), 2 deletions(-) > >> > >> --- a/drivers/iommu/intel/irq_remapping.c > >> +++ b/drivers/iommu/intel/irq_remapping.c > >> @@ -1334,8 +1334,7 @@ static int intel_irq_remapping_alloc(str > >> > >> if (!info || !iommu) > >> return -EINVAL; > >> - if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI && > >> - info->type != X86_IRQ_ALLOC_TYPE_PCI_MSIX) > >> + if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI) > >> return -EINVAL; > >> > >> /* > >> > > > > This check is only making sure that when multi-msi is requested that the > > type has to be either MSI/MSIX. > > MSI-X does not support multi vector allocations on a single entry. > > > Wouldn't this change return -EINVAL when type = MSIX? > > Rightfully so. MSIX vectors are allocated one by one. Has been that way > forever. > I thought why block multi-vector allocation on MSIX, but if there is no use case makes perfect sense. Thanks for the clarification. Reviewed-by: Ashok Raj <ashok.raj@intel.com>
--- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel/irq_remapping.c @@ -1334,8 +1334,7 @@ static int intel_irq_remapping_alloc(str if (!info || !iommu) return -EINVAL; - if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI && - info->type != X86_IRQ_ALLOC_TYPE_PCI_MSIX) + if (nr_irqs > 1 && info->type != X86_IRQ_ALLOC_TYPE_PCI_MSI) return -EINVAL; /*