All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Koichiro Den" <den@valinux.co.jp>,
	"Shinichiro Kawasaki" <shinichiro.kawasaki@wdc.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: dwc: ep: Fix regression in dw_pcie_ep_raise_msi_irq()
Date: Wed, 25 Feb 2026 22:56:39 +0100	[thread overview]
Message-ID: <aZ9wF5QjHTtbBc2d@fedora> (raw)
In-Reply-To: <20260225200553.GA3783348@bhelgaas>

On Wed, Feb 25, 2026 at 02:05:53PM -0600, Bjorn Helgaas wrote:
> On Tue, Feb 10, 2026 at 07:12:25PM +0100, Niklas Cassel wrote:
> 
> I put this on pci/for-linus for v7.0, thanks!
> 
> I'd like to make the commit log a little more general, since the issue
> affects any endpoint driver.  Here's my proposal; I'll update it based
> on your feedback:
> 
>   PCI: dwc: ep: Fix dw_pcie_ep_raise_msi_irq() Message Address cache
> 
>   Endpoint drivers use dw_pcie_ep_raise_msi_irq() to raise MSI interrupts to
>   the host.  After 8719c64e76bf ("PCI: dwc: ep: Cache MSI outbound iATU
>   mapping"), dw_pcie_ep_raise_msi_irq() caches the Message Address from the
>   MSI Capability in ep->msi_msg_addr.  But that Message Address is controlled
>   by the host, and it may change.  For example, if:
> 
>     - firmware on the host configures the Message Address and triggers an
>       MSI,
> 
>     - a driver on the Endpoint raises the MSI via dw_pcie_ep_raise_msi_irq(),
>       which caches the Message Address,
> 
>     - a kernel on the host reconfigures the Message Address and the host
>       kernel driver triggers another MSI,
> 
>   dw_pcie_ep_raise_msi_irq() notices that the Message Address no longer
>   matches the cached ep->msi_msg_addr, warns about it, and returns error
>   instead of raising the MSI.  The host kernel may hang because it never
>   receives the MSI.
> 
>   This was seen with the nvmet_pci_epf_driver: the host UEFI performs NVMe
>   commands, e.g. Identify Controller to get the name of the controller,
>   nvmet-pci-epf posts the completion queue entry and raises an IRQ using
>   dw_pcie_ep_raise_msi_irq().  When the host boots Linux, we see a
>   WARN_ON_ONCE() from dw_pcie_ep_raise_msi_irq(), and the host kernel hangs
>   because the nvme driver never gets an IRQ.
> 
>   Remove the warning when dw_pcie_ep_raise_msi_irq() notices that Message
>   Address has changed, remap using the new address, and update the
>   ep->msi_msg_addr cache.

Looks good to me!

You've been reviewing/discussing the patch already, so you were already
very familiar with the problem. Thank you for picking it up!


Kind regards,
Niklas

      reply	other threads:[~2026-02-25 21:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 18:12 [PATCH] PCI: dwc: ep: Fix regression in dw_pcie_ep_raise_msi_irq() Niklas Cassel
2026-02-10 19:32 ` Bjorn Helgaas
2026-02-10 20:22   ` Niklas Cassel
2026-02-10 20:33     ` Niklas Cassel
2026-02-10 20:39     ` Bjorn Helgaas
2026-02-11  8:52       ` Niklas Cassel
2026-02-11 18:08         ` Bjorn Helgaas
2026-02-25 14:59     ` Manivannan Sadhasivam
2026-02-11 16:44 ` Koichiro Den
2026-02-12  9:42 ` Shinichiro Kawasaki
2026-02-25 15:01 ` Manivannan Sadhasivam
2026-02-25 15:51   ` Niklas Cassel
2026-02-25 16:30     ` Manivannan Sadhasivam
2026-02-25 20:05 ` Bjorn Helgaas
2026-02-25 21:56   ` Niklas Cassel [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=aZ9wF5QjHTtbBc2d@fedora \
    --to=cassel@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=den@valinux.co.jp \
    --cc=helgaas@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    --cc=shinichiro.kawasaki@wdc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.