Skip to content

hw/usb/hcd-xhci: two isoch fixes with qtests

Junjie Cao qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4hw/usb/hcd-xhci: fix interval alignment after MFINDEX passes 2^32hw/usb/hcd-xhci.c+2 -41 reply
2/4hw/usb/hcd-xhci: don't assert on NAK when retrying an isoch transferhw/usb/hcd-xhci.c+8 -191 reply
3/4tests/qtest/usb-hcd-xhci: test isoch pacing with MFINDEX above 2^32tests/qtest/usb-hcd-xhci-test.c+283 -01 reply
4/4tests/qtest/usb-hcd-xhci: test isoch endpoint type mismatchtests/qtest/usb-hcd-xhci-test.c+35 -00 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéThomas Huth
1/4R-b
2/4R-b
3/4A-b
4/4

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/4] hw/usb/hcd-xhci: two isoch fixes with qtests

Two xHCI bugs from the issue tracker, each with a qtest.

The interval mask is 32 bits wide, so once MFINDEX passes 2^32 isoch TDs with SIA are no longer held until the next interval boundary. This matches #3973: onset after 6.2 days of uptime, cleared by re-binding the controller in the guest.

A guest can declare a non-isoch endpoint as isoch and hit an assertion when the device NAKs (#3886). #544 is the same assertion, reached from the kick timer as in patch 4. Its reproducer from 2021 no longer triggers on master, so it is not tagged.

Both tests fail on master (c1c18d1e64). Tested on x86_64 with an ASan/UBSan build: usb-hcd-xhci-test, usb-hcd-ehci-test and usb-hcd-uhci-test pass. The new tests skip on ppc64.

Junjie Cao (4):
hw/usb/hcd-xhci: fix interval alignment after MFINDEX passes 2^32 hw/usb/hcd-xhci: don't assert on NAK when retrying an isoch transfer tests/qtest/usb-hcd-xhci: test isoch pacing with MFINDEX above 2^32 tests/qtest/usb-hcd-xhci: test isoch endpoint type mismatch

 hw/usb/hcd-xhci.c               |  33 +---
 tests/qtest/usb-hcd-xhci-test.c | 318 ++++++++++++++++++++++++++++++++
 2 files changed, 328 insertions(+), 23 deletions(-)

base-commit: c1c18d1e640b64292859ce9f30f3c344edfb0294

Signature · 1 line
2.43.0