mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	bhelgaas@google.com, kwilczynski@kernel.org,
	aliceryhl@google.com, daniel.almeida@collabora.com,
	ojeda@kernel.org, boqun@kernel.org, gary@garyguo.net,
	bjorn3_gh@protonmail.com, lossin@kernel.org,
	a.hindborg@kernel.org, tmgross@umich.edu, tamird@kernel.org,
	acourbot@nvidia.com, work@onurozkan.dev, ttabi@nvidia.com,
	apopple@nvidia.com, ecourtney@nvidia.com, shashanks@nvidia.com,
	zhiw@nvidia.com
Cc: driver-core@lists.linux.dev, linux-pci@vger.kernel.org,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/5] Rework PCI IRQ vector code
Date: Wed, 12 Aug 2026 18:20:46 -0700	[thread overview]
Message-ID: <4048251d-7989-4818-9e66-21d06188570d@nvidia.com> (raw)
In-Reply-To: <20260811233952.3000968-1-dakr@kernel.org>

On 8/11/26 4:39 PM, Danilo Krummrich wrote:
> This series reworks the Rust PCI interrupt vector abstractions, motivated by
> review feedback on the nova-core interrupt support series [1].
> 
> Convert IrqVectorRegistration to a lifetime-managed owning type, replacing the
> devres-based approach. Since vector() borrows the registration, the returned
> IrqVector inherits that lifetime, preventing the allocation from being dropped
> while any handler is live.
> 
> IrqVector embeds a resolved IrqRequest, making the conversion infallible. The
> request_irq()/request_threaded_irq() wrappers on Device are removed since their
> &self receiver could refer to an unrelated device.
> 
> Add pci_irq_type() as a C function in include/linux/pci.h, replacing open-coded
> checks across drivers [2], and wrap it for Rust.
> 
> [1] https://lore.kernel.org/all/20260808031120.363869-1-jhubbard@nvidia.com/
> [2] https://elixir.bootlin.com/linux/v7.1/source/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c#L196
> 
> Changes in v2:
>   - Drop the IrqRequestAnchor approach and keep IrqVector as a new type over
>     IrqRequest.
> 

I've integrated this version into my work-in-progress v2 patchset for interrupt
support for nova[1], and it still passes tests on some real GPU hardware.

For example:

$ dmesg -t | grep -B1 'interrupt self-test'
nova-core 0000:c1:00.0: NVIDIA (Chipset: TU117, Architecture: Turing, Revision: a.1)
nova-core 0000:c1:00.0: interrupt self-test: starting on vector 129, subtree 2, with Msi
nova-core 0000:c1:00.0: interrupt self-test: passed, subtree 2, 2 deliveries
--
nova-core 0000:c2:00.0: NVIDIA (Chipset: GB202, Architecture: BlackwellGB20x, Revision: a.1)
nova-core 0000:c2:00.0: interrupt self-test: starting on vector 129, subtree 2, with Msi
nova-core 0000:c2:00.0: interrupt self-test: passed, subtree 2, 2 deliveries
--
nova-core 0000:01:00.0: NVIDIA (Chipset: GA104, Architecture: Ampere, Revision: a.1)
nova-core 0000:01:00.0: interrupt self-test: starting on vector 129, subtree 2, with Msi
nova-core 0000:01:00.0: interrupt self-test: passed, subtree 2, 2 deliveries

So for the series, please feel free to add:

Tested-by: John Hubbard <jhubbard@nvidia.com>


[1] https://github.com/johnhubbard/linux/tree/nova-core-gin-interrupt-tree-v2

thanks,
-- 
John Hubbard


      parent reply	other threads:[~2026-08-13  1:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 23:39 Danilo Krummrich
2026-08-11 23:39 ` [PATCH v2 1/5] rust: pci: convert IrqVectorRegistration to a lifetime-managed owning type Danilo Krummrich
2026-08-12 16:26   ` Gary Guo
2026-08-12 17:37     ` Danilo Krummrich
2026-08-12 18:11       ` Gary Guo
2026-08-12 18:47         ` Danilo Krummrich
2026-08-12 19:01           ` Gary Guo
2026-08-12 19:57             ` Danilo Krummrich
2026-08-11 23:39 ` [PATCH v2 2/5] rust: pci: resolve IRQ in vector() and embed IrqRequest in IrqVector Danilo Krummrich
2026-08-12 16:38   ` Gary Guo
2026-08-12 17:44     ` Danilo Krummrich
2026-08-12 18:09       ` Gary Guo
2026-08-12 19:31         ` Danilo Krummrich
2026-08-11 23:39 ` [PATCH v2 3/5] rust: pci: remove request_irq() and request_threaded_irq() from Device Danilo Krummrich
2026-08-11 23:39 ` [PATCH v2 4/5] PCI: Add pci_irq_type() to query the allocated interrupt type Danilo Krummrich
2026-08-11 23:39 ` [PATCH v2 5/5] rust: pci: expose " Danilo Krummrich
2026-08-12 16:44   ` Gary Guo
2026-08-12 17:57     ` Danilo Krummrich
2026-08-12 18:16       ` Gary Guo
2026-08-12 20:48         ` Danilo Krummrich
2026-08-13  1:20 ` John Hubbard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4048251d-7989-4818-9e66-21d06188570d@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=shashanks@nvidia.com \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=ttabi@nvidia.com \
    --cc=work@onurozkan.dev \
    --cc=zhiw@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®