Skip to content

Add XHCI TR NOOP support, plus PCI, MSIX changes

Nicholas Piggin qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8qtest/pci: Enforce balanced iomap/unmaptests/qtest/ahci-test.c tests/qtest/libqos/ahci.c tests/qtest/libqos/ahci.h +4 more+48 -20 replies
2/8qtest/libqos/pci: Fix qpci_msix_enable sharing bar0tests/qtest/libqos/pci.c tests/qtest/libqos/pci.h+35 -60 replies
3/8pci/msix: Implement PBA writeshw/pci/msix.c tests/qtest/libqos/pci.c tests/qtest/libqos/pci.h+34 -32 replies
4/8tests/qtest/e1000e|igb: Fix e1000e and igb tests to re-trigger interruptstests/qtest/e1000e-test.c tests/qtest/igb-test.c tests/qtest/libqos/e1000e.c+13 -50 replies
5/8hw/usb/xhci: Move HCD constants to a header and add register constantshw/usb/hcd-xhci.c hw/usb/hcd-xhci.h+250 -2233 replies
6/8qtest/xhci: Add controller and device setup and ring testshw/usb/hcd-xhci.c hw/usb/hcd-xhci.h tests/qtest/usb-hcd-xhci-test.c+499 -130 replies
7/8hw/usb/xhci: Support TR NOOP commandshw/usb/hcd-xhci.c+27 -10 replies
8/8qtest/xhci: add a test for TR NOOP commandstests/qtest/usb-hcd-xhci-test.c+39 -20 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchFabiano Rosas
1/8R-b
2/8R-b
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] Add XHCI TR NOOP support, plus PCI, MSIX changes

Hi,

This series adds XHCI "TR NOOP" support, but adding qtests ran into issues with PCI and MSIX, and fixing those irritated what looks like a bug in the e1000e/igb tests.

Firstly, the XHCI NEC PCI host has a shared BAR for device registers and MSIX space, which is not handled by qtest/pci. Keeping track of BAR mappings in qtest and allowing MSIX to use an existing mapping seems to work.

For the XHCI qtest, I added a MSIX check to ensure interrupts are working correctly, similarly to e1000e it polls the PBA bit with the interrupt masked. Doing this never actually clears the pending msix irq, because that is not implemented in the hw/pci code. So a test that waits for an interrupt to be triggered multiple times will fail.

Adding the PBA write operations to clear/trigger pending interrupts breaks e1000e/igb tests that wait for multiple triggers, because they are actually buggy and only triggering the irq once, but the missing MSIX write support was saving them because it made it look like the irq had triggered.

My XHCI qtest caught that issue because it has some code which asserts that the interrupt is *not* pending.

Since RFC I fixed up some checkpatch issues as Fabiano pointed out, and also dug into the e1000e/igb test failure a bit more and hopefully fixed it properly.

Thanks,
Nick

Nicholas Piggin (8):
qtest/pci: Enforce balanced iomap/unmap
qtest/libqos/pci: Fix qpci_msix_enable sharing bar0 pci/msix: Implement PBA writes
tests/qtest/e1000e|igb: Fix e1000e and igb tests to re-trigger
interrupts
hw/usb/xhci: Move HCD constants to a header and add register constants qtest/xhci: Add controller and device setup and ring tests hw/usb/xhci: Support TR NOOP commands
qtest/xhci: add a test for TR NOOP commands

 hw/usb/hcd-xhci.h               | 197 ++++++++++++
 tests/qtest/libqos/ahci.h       |   1 +
 tests/qtest/libqos/pci.h        |   4 +
 tests/qtest/libqos/virtio-pci.h |   1 +
 hw/pci/msix.c                   |  16 +
 hw/usb/hcd-xhci.c               | 318 ++++++-------------
 tests/qtest/ahci-test.c         |   2 +
 tests/qtest/e1000e-test.c       |   8 +-
 tests/qtest/igb-test.c          |   8 +-
 tests/qtest/libqos/ahci.c       |   6 +
 tests/qtest/libqos/e1000e.c     |   2 +-
 tests/qtest/libqos/pci.c        |  92 +++++-
 tests/qtest/libqos/virtio-pci.c |   6 +-
 tests/qtest/usb-hcd-xhci-test.c | 535 +++++++++++++++++++++++++++++++-
 14 files changed, 943 insertions(+), 253 deletions(-)
Signature · 1 line
2.45.2