| Summary: | Redirected usb-hid devices do not work when using an emulated xhci controller | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Hans de Goede <hdegoede> | ||||
| Component: | qemu | Assignee: | Fedora Virtualization Maintainers <virt-maint> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 25 | CC: | amit.shah, berrange, cfergeau, dwmw2, hdegoede, itamar, kraxel, pbonzini, rjones, virt-maint | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | qemu-2.7.0-3.fc25 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-10-12 18:57:56 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Hans de Goede
2016-10-06 11:27:06 UTC
> Things do work when replacing "-device nec-usb-xhci" with "-readconfig
> /etc/qemu/ich9-ehci-uhci.cfg" on the qemu commandline, suggesting that this
> is a problem with interrupt endpoint handling in the xhci emulation.
>
> Note this should reproduce
> with host-redirection too, so using spice is not necessary.
Well, it doesn't, usb-host is doing fine.
I suspect it is a missing usb_wakeup() call somewhere in the redirection code.
ehci and uhci don't fall over in that case because we must poll anyway for correctness reasons. Worst case is a delay in case ehci throttles polling due to inactivity on the usb bus. xhci depends on wakeup calls though. The different hardware design allows us to *not* poll constantly.
Care to have a look? You know the redirection code better than me ...
Created attachment 1208771 [details]
qemu-2.7.0-usb-redirect-wakeup.patch
Hi Gerd,
You were right, although the wakeup was there it was being called too early, it seems that now a days more work is done directly (rather then being scheduled) as a result of the call to wakeup and usbredir.c was not ready to handle this when it called usb_wakeup(). This patch fixes this. I've kicked of F25+ builds with this patch and I'll create an update.
Can you take care of upstreaming this ? Feel free to add my S-o-b, I created the patch using the Fedora pkgs, as I no longer have a qemu git clone around.
Regards,
Hans
qemu-2.7.0-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1db1147b8e qemu-2.7.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. |