Re: [PATCH v8 1/5] PCI: dwc: ep: Clear MSI iATU mapping in dw_pcie_ep_cleanup()

Manivannan Sadhasivam <[email protected]>
Newsgroups gmane.linux.ports.ppc.embedded,gmane.linux.kernel.pci,gmane.linux.kernel,gmane.linux.ports.arm.kernel,gmane.linux.ports.arm.msm,gmane.linux.ports.arm.rockchip
Message-ID <k5zkz2wnvkb2kzwyazafghgncqefv4cvuzrwwek6xi27vvldej@o4ostebesrbm>
On Mon, Jul 27, 2026 at 06:18:37PM +0200, Niklas Cassel wrote:
> On Mon, May 18, 2026 at 08:29:13PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> > From: Manivannan Sadhasivam <[email protected]>
> > 
> > The MSI iATU mapping is currently only cleared when the endpoint is
> > stopped via configfs or when the host updates the MSI address/size.
> > This avoids redundant iATU reconfiguration every time the endpoint
> > raises an MSI interrupt.
> > 
> > However, a fundamental reset triggered by PERST# assert/deassert
> > resets all iATU inbound/outbound registers without going through the
> > configfs stop path. If the host also retains the same MSI address/size
> > after PERST# deassert, the driver never clears the stale MSI iATU
> > mapping. It then continues using this stale mapping to raise the MSI
> > interrupts, which can cause IOMMU faults and MSI failures on the host.
> > 
> > Fix this by clearing the MSI iATU mapping inside dw_pcie_ep_cleanup(),
> > which is already called as part of the PERST# assert/deassert sequence.
> > This unmaps the MSI iATU region and sets the msi_iatu_mapped flag to
> > false, ensuring that dw_pcie_ep_raise_msi_irq() performs a fresh iATU
> > mapping on its next invocation, regardless of whether the host changed
> > the MSI address/size.
> > 
> > Signed-off-by: Manivannan Sadhasivam <[email protected]>
> 
> Doesn't this need a Fixes tag?
> 

It needs one yes!

> 
> Side node: It seems like this series does no longer apply on pci/next.
> 
> Perhaps need to rebase and resend?
> 

Yep. I'm preparing th next version. Will post it asap.

- Mani

-- 
மணிவண்ணன் சதாசிவம்
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.