Message ID | 20221111135206.521387616@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 l7csp760516wru; Fri, 11 Nov 2022 06:08:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf6WV0KBbgu1+BDus3RQMB/WHvtTFBrSidyYCDOkdzTlKG9rsFOAxLv9J+9joFdhbHupNKpF X-Received: by 2002:a63:dd4f:0:b0:470:14fa:a294 with SMTP id g15-20020a63dd4f000000b0047014faa294mr1794324pgj.361.1668175739517; Fri, 11 Nov 2022 06:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668175739; cv=none; d=google.com; s=arc-20160816; b=uPY88Hf0V+Q5mqasYCYUl1bKJd19Bn1j7dAac4xYWwWQefpALAkcLwbBygfg/izuuG yh0oPx7d6CzZIcgMrLINwASlKzJPthwRZuPZD85kZd6Ul3wdDtz9TZDH0LKSYQJLZZLO stPbLzxOsMLeTE4qdEkDNf60oW49BO8g1Encx6kch15wsDArkMvkPOEfbhudoENG3jeq P+UkM+uGGn3PdrEI7C3OQDKcZ7bSxF9tOfdJQkVwBoqPoccLC2jN1/3tx9b3JOeF3v13 gjjKEsOE5dR8QBbP/B6xEoiHtfDciMeqZLouOZVyL4onNSonR9gpy4jy4Io32vgTsAJr B96g== 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=LtweMGx7oKuU2/h3mTO1bStczI1HafJrlhjPsVZ18gQ=; b=Zd+vXdtjmA0c/8Uk0uXc+pL4OtMyqzRaFJBac5EOFYi5HzyBd1aHbdN201IGiQ8j9Y +Nbmjs8C1Y52uYkvIQs0iqX6XtdjPL5zqNWihyJ8rpq0vlASui1DGjkzs/TuLyUfFIi3 EoLzZBJN2r+8Y3OO/1ZBwDXB1vqbBkqKGlrNTo2JYS5wjl5v3CrjcuKCYHVuFr4uZPWA VRr/ywSgAfU0zg+cAYUZUrlObPQcY1a8CMC2ab3QIDXym3AKHPqYX6uUI5DowYjRPhvW tVdmTyA32I8D0ZDU3No3rknqMSIsG/bsbrJA3XIyVeIJWlHqozGnKbmSD+ucMwCUUmNe cVxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ctm1DuFD; 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 u9-20020a170902e80900b00186b3464c9esi2976770plg.251.2022.11.11.06.08.44; Fri, 11 Nov 2022 06:08:59 -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=Ctm1DuFD; 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 S234399AbiKKOIB (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Fri, 11 Nov 2022 09:08:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234531AbiKKOHE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Nov 2022 09:07:04 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C0808BA91; Fri, 11 Nov 2022 05:59:54 -0800 (PST) Message-ID: <20221111135206.521387616@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668175126; 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=LtweMGx7oKuU2/h3mTO1bStczI1HafJrlhjPsVZ18gQ=; b=Ctm1DuFDy0HMJYdK9qCz1YVmZZR5lyZM+sN3sOYYfE75QgQVFJMayaXVW+5l8ZSJwAPuN+ +GSlJ5SO58Gg6TnKKUONA4rPqWgn0Hy2gQZD3WTmbMv4P9TqKVaO8Q/t/quIGF1od/zCVM nqtFqwQC8F669AYvhxpu1URqit3Qvut11TVNde3tib92Gp0sUpa8Vfe95FIlG0JsqOVutD bSeIuJFnobA1p+MMuRRUSdneNUz9tYhawMrl/V2m6HYR1AoVHvQiPqGxsWpP30STvlrqQQ kKwASJfN4/OhiWltGqJIu3aeAszVDUK6pckOimNXlcc/BgKcRazi8y3tdpv5OA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668175126; 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=LtweMGx7oKuU2/h3mTO1bStczI1HafJrlhjPsVZ18gQ=; b=nv8txJEj8304vPLR4WxDND2n+tA605ka1X9Eieo9KDRFXP8JJT6fDJKSRkumhizd/TVqVD FQvjzajS4jVYlrDQ== 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>, "Ahmed S. Darwish" <darwi@linutronix.de>, Reinette Chatre <reinette.chatre@intel.com> Subject: [patch 22/33] genirq/msi: Provide MSI_FLAG_MSIX_ALLOC_DYN References: <20221111133158.196269823@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Fri, 11 Nov 2022 14:58:46 +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?1749209044188890648?= X-GMAIL-MSGID: =?utf-8?q?1749209044188890648?= |
Series |
genirq, PCI/MSI: Support for per device MSI and PCI/IMS - Part 3 implementation
|
|
Commit Message
Thomas Gleixner
Nov. 11, 2022, 1:58 p.m. UTC
Provide a new MSI feature flag in preparation for dynamic MSIX allocation
after the initial MSI-X enable has been done.
This needs to be an explicit MSI interrupt domain feature because quite
some implementations (both interrupt domains and legacy allocation mode)
have clear expectations that the allocation code is only invoked when MSI-X
is about to be enabled. They either talk to hypervisors or do some other
work and are not prepared to be invoked on an already MSI-X enabled device.
This is also explicit MSI-X only because rewriting the size of the MSI
entries is only possible when disabling MSI which in turn might cause lost
interrupts on the device.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/msi.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Fri, Nov 11, 2022 at 02:58:46PM +0100, Thomas Gleixner wrote: > Provide a new MSI feature flag in preparation for dynamic MSIX allocation > after the initial MSI-X enable has been done. > > This needs to be an explicit MSI interrupt domain feature because quite > some implementations (both interrupt domains and legacy allocation mode) > have clear expectations that the allocation code is only invoked when MSI-X > is about to be enabled. They either talk to hypervisors or do some other > work and are not prepared to be invoked on an already MSI-X enabled device. > > This is also explicit MSI-X only because rewriting the size of the MSI > entries is only possible when disabling MSI which in turn might cause lost > interrupts on the device. > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > --- > include/linux/msi.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason
--- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -523,7 +523,8 @@ enum { MSI_FLAG_LEVEL_CAPABLE = (1 << 18), /* MSI-X entries must be contiguous */ MSI_FLAG_MSIX_CONTIGUOUS = (1 << 19), - + /* PCI/MSI-X vectors can be dynamically allocated/freed post MSI-X enable */ + MSI_FLAG_PCI_MSIX_ALLOC_DYN = (1 << 20), }; /**