[PATCH v2 0/3] PCI: endpoint: Support hardware-owned MSI-X table and PBA

Niklas Cassel cassel at kernel.org
Mon Sep 14 04:51:44 PDT 2026


Hello Koichiro,

On Thu, Sep 03, 2026 at 04:56:18PM +0900, Koichiro Den wrote:
> > 
> > Please share your branch. I should have time to do a quick test.

I did test your patches using pci-epf-test.

EP side:

[  105.770736] using HW-defined MSI-X layout!
[  105.770763] MSI-X table BAR: 4 offset: 0x4000 size: 0x1000
[  105.770777] MSI-X PBA BAR: 4 offset: 0x5000 size: 0x1000
[  113.634512] raising MSI-X doorbell for irq: 1 msg_data: 0
[  114.650505] raising MSI-X doorbell for irq: 2 msg_data: 1
[  114.658509] raising MSI-X doorbell for irq: 3 msg_data: 2
[  114.666499] raising MSI-X doorbell for irq: 4 msg_data: 3
[  114.674508] raising MSI-X doorbell for irq: 5 msg_data: 4
[  114.682498] raising MSI-X doorbell for irq: 6 msg_data: 5
[  114.690508] raising MSI-X doorbell for irq: 7 msg_data: 6
[  114.698500] raising MSI-X doorbell for irq: 8 msg_data: 7
[  114.706508] raising MSI-X doorbell for irq: 9 msg_data: 8
[  114.714500] raising MSI-X doorbell for irq: 10 msg_data: 9
[  114.722508] raising MSI-X doorbell for irq: 11 msg_data: 10
[  114.730500] raising MSI-X doorbell for irq: 12 msg_data: 11
[  114.738511] raising MSI-X doorbell for irq: 13 msg_data: 12
[  114.746498] raising MSI-X doorbell for irq: 14 msg_data: 13
[  114.754509] raising MSI-X doorbell for irq: 15 msg_data: 14
[  114.762499] raising MSI-X doorbell for irq: 16 msg_data: 15
[  114.770509] raising MSI-X doorbell for irq: 17 msg_data: 16
[  114.778500] raising MSI-X doorbell for irq: 18 msg_data: 17
[  114.786508] raising MSI-X doorbell for irq: 19 msg_data: 18
[  114.794501] raising MSI-X doorbell for irq: 20 msg_data: 19
[  114.802507] raising MSI-X doorbell for irq: 21 msg_data: 20
[  114.810500] raising MSI-X doorbell for irq: 22 msg_data: 21
[  114.818509] raising MSI-X doorbell for irq: 23 msg_data: 22
[  114.826502] raising MSI-X doorbell for irq: 24 msg_data: 23
[  114.834509] raising MSI-X doorbell for irq: 25 msg_data: 24
[  114.842502] raising MSI-X doorbell for irq: 26 msg_data: 25
[  114.850509] raising MSI-X doorbell for irq: 27 msg_data: 26
[  114.858499] raising MSI-X doorbell for irq: 28 msg_data: 27
[  114.866510] raising MSI-X doorbell for irq: 29 msg_data: 28
[  114.874500] raising MSI-X doorbell for irq: 30 msg_data: 29
[  114.882510] raising MSI-X doorbell for irq: 31 msg_data: 30
[  114.890500] raising MSI-X doorbell for irq: 32 msg_data: 31


Host side:

#  RUN           pci_ep_basic.MSIX_TEST ...
MSI-X1 returned -110
# pci_endpoint_test.c:168:MSIX_TEST:Expected 0 (0) == ret (-110)
# pci_endpoint_test.c:168:MSIX_TEST:Test failed for MSI-X1
MSI-X2 returned 0
MSI-X3 returned 0
MSI-X4 returned 0
MSI-X5 returned 0
MSI-X6 returned 0
MSI-X7 returned 0
MSI-X8 returned 0
MSI-X9 returned 0
MSI-X10 returned 0
MSI-X11 returned 0
MSI-X12 returned 0
MSI-X13 returned 0
MSI-X14 returned 0
MSI-X15 returned 0
MSI-X16 returned 0
MSI-X17 returned 0
MSI-X18 returned 0
MSI-X19 returned 0
MSI-X20 returned 0
MSI-X21 returned 0
MSI-X22 returned 0
MSI-X23 returned 0
MSI-X24 returned 0
MSI-X25 returned 0
MSI-X26 returned 0
MSI-X27 returned 0
MSI-X28 returned 0
MSI-X29 returned 0
MSI-X30 returned 0
MSI-X31 returned 0
MSI-X32 returned 0
MSI-X33 returned -22
#      SKIP      MSI-X33 is disabled
#            OK  pci_ep_basic.MSIX_TEST
ok 16 pci_ep_basic.MSIX_TEST # SKIP MSI-X33 is disabled


There seems to be a bug that "pci_ep_basic.MSIX_TEST"
returns status ok, even though MSI-X1 returned -110 (ETIMEDOUT).

If you don't look closely enough, it is easy to miss the
"MSI-X1 returned -110"
and only see:
ok 16 pci_ep_basic.MSIX_TEST


Perhaps this is what I missed when I was doing the same conversion as you some
time ago.

Anyway, I do see the same problem as you. For some reason IRQ 1 is not working,
but all other IRQs are working.

Unfortunately I don't have any ideas.
MSIX_DOORBELL_VECTOR is 10:0 so msg_data can have value 0-2047.
Thus, it looks correct that dw_pcie_ep_raise_msix_irq_doorbell()
sets msg_data =  (interrupt_num - 1);

FWIW, I think you should send out patch 1/7 as a standalone patch, so that
it can be picked up ASAP.


Kind regards,
Niklas



More information about the Linux-nvme mailing list