Re: [BUG] KVM USB passthrough did not claim interface before use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 10, 2022 at 10:22:55AM -0400, Peter Geis wrote:
> On Mon, Oct 10, 2022 at 10:07 AM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Mon, Oct 10, 2022 at 09:56:53AM -0400, Peter Geis wrote:
> > > Good Morning,
> > >
> > > I've run into a bug with a new usb device when attempting to pass
> > > through using qemu-kvm. Another device is passed through without
> > > issue, and qemu spice passthrough does not exhibit the issue. The usb
> > > device shows up in the KVM machine, but is unusable. I'm unsure if
> > > this is a usbfs bug, a qemu bug, or a bug in the device driver.
> > >
> > > usb 3-6.2: usbfs: process 365671 (CPU 2/KVM) did not claim interface 0
> > > before use
> > > usb 3-6.2: usbfs: process 365671 (CPU 2/KVM) did not claim interface 0
> > > before use
> > > usb 3-6.2: usbfs: process 365672 (CPU 3/KVM) did not claim interface 1
> > > before use
> > > usb 3-6.2: usbfs: process 365671 (CPU 2/KVM) did not claim interface 0
> > > before use
> > > usb 3-6.2: usbfs: process 365672 (CPU 3/KVM) did not claim interface 0
> > > before use
> > > usb 3-6.2: usbfs: process 365672 (CPU 3/KVM) did not claim interface 0
> > > before use
> >
> > These are warnings, not bugs, although one could claim that the warnings
> > are caused by a bug in qemu-kvm.
> 
> The bug is the device is unusable in passthrough, this is the only
> direction as to why. The question is which piece of software is
> causing it. I figure qemu is the most likely suspect, but they request
> bugs that are possibly in kvm start here. The cdc-acm driver is the
> least likely in my mind, as the other device that works also uses it.
> I just tested removing the other working device and only passing
> through the suspect device, and it still triggers the bug. So whatever
> the problem is, it's specific to this one device.

Does anything of interest about the device show up in the virtual 
machine's kernel log?

You can collect a usbmon trace on the host system to gather more 
information about what the virtual machine is trying to do.  Your 
previous post shows that the device is on bus 3, so before starting 
qemu-kvm you would do:

	cat /sys/kernel/debug/usb/usbmon/3u >mon.txt

in a separate window.  Kill the cat process when the test is over and 
post the output file.

It'll help if you unplug the working device (and in fact as many devices 
on bus 3 as is practical) before running the test, so that the trace 
includes only traffic to the non-working device.

For comparison, you could also acquire a usbmon trace of what happens 
when you try using the device on a real, non-virtual machine.  For this 
test you would start the trace before plugging in the device.

Alan Stern



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux