Address Device discards the result of the DCBAA entry read. With DCBAAP
pointing at unassigned memory the command still completes with Success
and the slot and ep0 contexts are written to guest address 0:
https://gitlab.com/qemu-project/qemu/-/issues/4706

The series keeps the existing HCE-only error signalling; halting the
controller on a failed host access, as xHCI 4.10.2.6 asks, is a
separate change. The post_load path has no test.

Tested on x86_64 with the reporter's reproducer (before: Success and
address 0 overwritten; after: TRB Error, HCE set, address 0 intact) and
the full usb-hcd-xhci-test.

Patch 2 touches the same test file as the #4658 series
([email protected]); the two apply in either
order with a 3-way merge.

Junjie Cao (2):
  hw/usb/hcd-xhci: fail Address Device when the DCBAA entry is
    unreadable
  tests/qtest/usb-hcd-xhci: test Address Device with an unreadable DCBAA

 hw/usb/hcd-xhci.c               | 41 ++++++++++------
 tests/qtest/usb-hcd-xhci-test.c | 87 ++++++++++++++++++++++++++++-----
 2 files changed, 102 insertions(+), 26 deletions(-)


base-commit: 9703b6cf418d2ce72fae8d00e511135ce0bfda43
-- 
2.43.0


Reply via email to