[PATCH 0/2] hw/usb/hcd-xhci: check the DCBAA read in Address Device

Junjie Cao posted 2 patches 3 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261031033725.1275414-1-junjie.cao@linux.dev
Maintainers: Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
hw/usb/hcd-xhci.c               | 41 ++++++++++------
tests/qtest/usb-hcd-xhci-test.c | 87 ++++++++++++++++++++++++++++-----
2 files changed, 102 insertions(+), 26 deletions(-)
[PATCH 0/2] hw/usb/hcd-xhci: check the DCBAA read in Address Device
Posted by Junjie Cao 3 weeks, 2 days ago
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
(20261030165807.79423-1-tcalifano@redhat.com); 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