Page MenuHomeFreeBSD

bhyve: usb: add a finer-grained mutex for the event thread
AcceptedPublic

Authored by kevans on Fri, Sep 18, 1:58 AM.
Tags
None
Referenced Files
F172603828: D59779.diff
Sat, Sep 19, 3:13 PM
F172520165: D59779.id187144.diff
Sat, Sep 19, 12:27 AM
F172493182: D59779.diff
Fri, Sep 18, 8:28 PM
F172491103: D59779.diff
Fri, Sep 18, 8:12 PM
Unknown Object (File)
Fri, Sep 18, 7:53 PM
Unknown Object (File)
Fri, Sep 18, 7:20 PM
Unknown Object (File)
Fri, Sep 18, 5:34 PM
Unknown Object (File)
Fri, Sep 18, 2:54 PM

Details

Reviewers
markj
bnovkov
Group Reviewers
bhyve
Summary

Nothing today will serialize er_enq_idx / er_events_cnt updates against
the ERDP handler recalculations. This isn't strictly a problem until
we add support for a USB passthru device (which adds another thread for
handling libusb events), but pushing it in advance makes the meatier
bits of passthru more reviewable.

Sponsored by: The FreeBSD Foundation (aokblast)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 77045
Build 73928: arc lint + arc unit

Event Timeline

Seems ok, but pci_xhci_reset() resets the event fields as well. Is there a reason not to use this mutex to synchronize with those events too?

usr.sbin/bhyve/pci_xhci.c
2182

The high bits case above does touch those fields though.

kevans marked an inline comment as done.

Extend locking to ERSTBA handling and pci_xhci_reset()

This revision is now accepted and ready to land.Fri, Sep 18, 8:39 PM
bnovkov added a subscriber: bnovkov.
bnovkov added inline comments.
usr.sbin/bhyve/pci_xhci.c
268–276

Small nit.