[PATCH v5 0/2] PCI: endpoint: pci-epf-vntb: Honor MSI-X selection
From: Koichiro Den
Date: Wed Oct 14 2026 - 21:47:09 EST
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@xxxxxxxxxxxxx/
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@xxxxxxxxxxxxx/
v3: https://lore.kernel.org/r/20260919172021.1055451-1-den@xxxxxxxxxxxxx/
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@xxxxxxxxxxxxx/)
(v1: https://lore.kernel.org/r/20260827182012.1984960-1-den@xxxxxxxxxxxxx/)
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