mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/2] PCI: endpoint: pci-epf-vntb: Honor MSI-X selection
@ 2026-10-15  1:44 Koichiro Den
  2026-10-15  1:44 ` [PATCH v5 1/2] PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt setup Koichiro Den
  2026-10-15  1:44 ` [PATCH v5 2/2] PCI: endpoint: pci-epf-vntb: Honor MSI-X selection Koichiro Den
  0 siblings, 2 replies; 5+ messages in thread
From: Koichiro Den @ 2026-10-15  1:44 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Frank Li, Niklas Cassel, Bjorn Helgaas
  Cc: Jon Mason, Dave Jiang, Allen Hubbe, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, ntb, linux-pci, linux-kernel

Hi,

This small patch set fixes vNTB ignoring the host's MSI-X selection. On
endpoint controllers that expose an MSI-X capability, such as RK3588,
ntb_hw_epf can select MSI-X, but pci-epf-vntb still configures and
raises MSI. When MSI-X is selected, doorbell interrupts are not
delivered, and the host may report IOMMU faults if it's enabled.

The fix allocates space for the MSI-X Table and PBA in a BAR, using an
EPF-owned layout. This brings vNTB in line with other EPF
implementations, such as pci-epf-test and nvmet-pci-epf.

This series is based on pci/endpoint plus:
https://lore.kernel.org/r/20261014071448.2473208-1-den@valinux.co.jp/
Although the changes are logically independent, this avoids conflicts
when applying the two patches after it.

Side note: I initially planned to have vNTB make use of the pre-mapped
	   MSI-X Table/PBA regions when available [1]. That work is on
	   hold because of an unresolved issue on RK3588 [2]: host
	   writes to the Message Address field (the 1st eight bytes) of
	   table entry #0 did not seem to reach the internal Table RAM.

[1] In the earlier series, I called this a "hardware-owned" layout to
    distinguish it from an "EPF-owned" layout. In hindsight,
    "hardware-owned" might sound a bit awkward.
[2] https://lore.kernel.org/r/sor2mm4jzgeprhn3fjw4jmcaowwkhhuus6exi4k5kum6frqvug@gatkk7r4qyxd/

Best regards,
Koichiro Den
---
Changes since v4:
  - Split out the local epf cleanup into a prep patch. (Frank)
    Now that there are two patches, I've resurrected the cover letter.
  - Minimize the diff by not updating the MSI labels in the
    interrupt-numbering comment. (Frank)

v4: https://lore.kernel.org/r/20261014053256.2378817-1-den@valinux.co.jp/
v3: https://lore.kernel.org/r/20260919172021.1055451-1-den@valinux.co.jp/

The earlier series also tried to use the fixed MSI-X Table/PBA regions,
but ran into the RK3588 issue mentioned above:
(v2: https://lore.kernel.org/r/20260830151948.3547577-1-den@valinux.co.jp/)
(v1: https://lore.kernel.org/r/20260827182012.1984960-1-den@valinux.co.jp/)


Koichiro Den (2):
  PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt
    setup
  PCI: endpoint: pci-epf-vntb: Honor MSI-X selection

 drivers/pci/endpoint/functions/pci-epf-vntb.c | 58 +++++++++++++++----
 1 file changed, 46 insertions(+), 12 deletions(-)


base-commit: 5cdbd6d3a3a147fa9975e35f2602cbec9a72a932
prerequisite-patch-id: 77967f15b7e75c72ca5f9b236d16c2866e3c6e1c
-- 
2.54.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-15  2:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15  1:44 [PATCH v5 0/2] PCI: endpoint: pci-epf-vntb: Honor MSI-X selection Koichiro Den
2026-10-15  1:44 ` [PATCH v5 1/2] PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt setup Koichiro Den
2026-10-15  2:05   ` Frank Li
2026-10-15  1:44 ` [PATCH v5 2/2] PCI: endpoint: pci-epf-vntb: Honor MSI-X selection Koichiro Den
2026-10-15  2:12   ` Frank Li

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®