Cannot passthrough usb with bus number and device number

Andreas Tscharner sternenfeuer at gmail.com
Tue Dec 8 09:11:29 UTC 2020


On 08.12.20 09:14, YaoHua Wu wrote:
> Sometimes, qemu cannot find correct usb device number
> Reproduce steps:
> 1、lsusb
> Bus 001 Device 011: ID 090c:1000
> 1、prepare usb device attach xml
> <hostdev managed="yes" mode="subsystem" type="usb">
> <source>
> <vendor id="0x090c" />
> <product id="0x1000" />
> <address bus='001' device='011'/>
> </source><address bus="1" port="1" type="usb" />
> </hostdev>
> 2、virsh attach-device vm usb.xml
> error: internal error: Did not find USB device 090c:1000 bus:1 device 9
> 
> Question:
> why the device number returned in qemu's error report is not what I 
> wrote in xml,
> what I mean is that if my dev number is really wrong, the returned error 
> should also be the number I wrote,
> commonly when using dongle

Looks like the number 011 in your device='011' is interpreted as octal 
number: 1x8 + 1x1 = 9 in decimal

Best regards
	Andreas
-- 
Andreas Tscharner                                 sternenfeuer at gmail.com
------------------------------------------------------------------------
Der entscheidende Vorteil eines Chats gegenueber einem normalen Telefon-
anruf ist der, dass ersterer langsamer geht und mehr kostet (fuer den
lebenswichtigen Austausch von Informationen wie "hya folks", "C U
l8er" und ":-)") ...                       Aus Murphy's Computergesetzen




More information about the libvirt-users mailing list