Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: "Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Frank Li" <Frank.Li@nxp.com>,
	"Damien Le Moal" <dlemoal@kernel.org>,
	"Koichiro Den" <den@valinux.co.jp>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: dwc: ep: Cache MSI outbound iATU mapping
Date: Tue, 23 Dec 2025 08:12:09 +0100	[thread overview]
Message-ID: <aUpAyag1bJLpOruG@ryzen> (raw)
In-Reply-To: <424133b7-bd6b-4602-96ea-4413ce4f985d@rock-chips.com>

On Tue, Dec 23, 2025 at 02:23:39PM +0800, Shawn Lin wrote:
> > On 12/23/2025 6:42 AM, Shawn Lin wrote:
> > > I checked the IP configurtion parameters for RK3588 DM controller for
> > > sure, it sets MSIX_TABLE_EN=1.
> > > 
> > > Looking into dw_pcie_ep_raise_msix_irq_doorbell(), it doesn't seem to
> > > match the dwc databook. No matter for non-AXI mode or AXI access mode,
> > > shouldn't we need to generate a MSI-X table RAM with data/address/
> > > vector/TC in advanced? Am I missing anything because I didn't look
> > The MSI-X table will updated automatically when host updates the MSI-X
> > table, when MSI-X is enabled
> > by host.
> 
> Thanks for these details.
> I re-read the databook, especially "Figure 3-49 iMSIX-TX: MSIX
> Transmit ". Yes, it's updated automatically when host write access
> it, which either comes from RX or local DBI(for debug purpose).

Shawn,

if you have time to help figure out why we cannot simply
replace dw_pcie_ep_raise_msix_irq() with dw_pcie_ep_raise_msix_irq_doorbell()
in rockchip_pcie_raise_irq(), that would be appreciated.

As you can see, we get IOMMU errors on the host side if we
reprogram the outbound iATU while outgoing transactions are in flight.

Mani, perhaps we should even add a WARN_ON() in dw_pcie_ep_raise_msix_irq()
that warns users that this function is broken and will lead to transactions
to random writes on the host side memory, which is quite bad...


Kind regards,
Niklas

  reply	other threads:[~2025-12-23  7:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10  7:13 [PATCH] PCI: dwc: ep: Cache MSI outbound iATU mapping Niklas Cassel
2025-12-22  8:19 ` Krishna Chaitanya Chundru
2025-12-22  8:36   ` Niklas Cassel
2025-12-22  8:42     ` Krishna Chaitanya Chundru
2025-12-22  8:49       ` Niklas Cassel
2025-12-22  9:58   ` Manivannan Sadhasivam
2025-12-22 10:42     ` Niklas Cassel
2025-12-22 11:11     ` Niklas Cassel
2025-12-22 11:19       ` Manivannan Sadhasivam
2025-12-22 12:23       ` Krishna Chaitanya Chundru
2025-12-22 13:00         ` Niklas Cassel
2025-12-23  1:12           ` Shawn Lin
2025-12-23  4:35             ` Krishna Chaitanya Chundru
2025-12-23  6:23               ` Shawn Lin
2025-12-23  7:12                 ` Niklas Cassel [this message]
2026-01-05 11:06                 ` Niklas Cassel
2026-01-06  1:37                   ` Shawn Lin

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=aUpAyag1bJLpOruG@ryzen \
    --to=cassel@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=den@valinux.co.jp \
    --cc=dlemoal@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    --cc=shawn.lin@rock-chips.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