[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1843711] [NEW] qemu-xhci device should detect if libus
From: |
Anisse Astier |
Subject: |
[Qemu-devel] [Bug 1843711] [NEW] qemu-xhci device should detect if libusb host supports streams |
Date: |
Thu, 12 Sep 2019 12:51:50 -0000 |
Public bug reported:
When using USBÂ passthrough with the qemu-xhci (and nec-usb-xhci),
streams are enabled by default, but if the host xHCI controller doesn't
support them, it will trigger hard-to-debug UAS guest errors.
This should be possible to detect since the kernel returns ENOSYS (errno 38)
when xhci host controller does not support streams:
libusb: error [do_streams_ioctl] streams-ioctl failed error -1
errno 38
qemu: libusb_alloc_streams: -99 [OTHER]
Maybe libusb should return a dedicated error instead of
LIBUSB_ERROR_OTHER in this case, but qemu does not handle any other
error code anyway.
Just trying to enable streams before enabling them in qemu should do it.
I don't know if it should be done in hcd-xhci.c, host-libusb.c or
elsewhere, but this would be detectable at launch instead of a static
option true/false, maybe a ternary with auto would be better.
** Affects: qemu
Importance: Undecided
Status: New
** Tags: feature-request
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1843711
Title:
qemu-xhci device should detect if libusb host supports streams
Status in QEMU:
New
Bug description:
When using USBÂ passthrough with the qemu-xhci (and nec-usb-xhci),
streams are enabled by default, but if the host xHCI controller
doesn't support them, it will trigger hard-to-debug UAS guest errors.
This should be possible to detect since the kernel returns ENOSYS (errno 38)
when xhci host controller does not support streams:
libusb: error [do_streams_ioctl] streams-ioctl failed error -1
errno 38
qemu: libusb_alloc_streams: -99 [OTHER]
Maybe libusb should return a dedicated error instead of
LIBUSB_ERROR_OTHER in this case, but qemu does not handle any other
error code anyway.
Just trying to enable streams before enabling them in qemu should do
it. I don't know if it should be done in hcd-xhci.c, host-libusb.c or
elsewhere, but this would be detectable at launch instead of a static
option true/false, maybe a ternary with auto would be better.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1843711/+subscriptions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [Bug 1843711] [NEW] qemu-xhci device should detect if libusb host supports streams,
Anisse Astier <=