Volker Gruenewald
2025-Dec-08 13:40 UTC
[Pkg-xen-devel] Bug#1122188: xen-hypervisor-4.20-amd64: USB Passthrough to qemu HVM not pussible
Package: src:xen Version: 4.20.2+7-g1badcf5035-0+deb13u1 Severity: normal X-Debbugs-Cc: submit at bugs.debian.org, volkerg at arcor.de -- System Information: Debian Release: 13.2 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.12.57+deb13-amd64 (SMP w/12 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled xen-hypervisor-4.20-amd64 depends on no packages. Versions of packages xen-hypervisor-4.20-amd64 recommends: ii xen-hypervisor-common 4.20.2+7-g1badcf5035-0+deb13u1 ii xen-utils-4.20 4.20.2+7-g1badcf5035-0+deb13u1 xen-hypervisor-4.20-amd64 suggests no packages. -- no debconf information Hi, i am not able to passthrough USB Devices to a running HVM DomU as i did with bookworm or Ubuntu Every try fails Even not possible in the XL Config File Example: xl create /etc/xen/smart10.cfg Parsing config from /etc/xen/smart10.cfg [root at debian01:/usr/local/admin/scripts]# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 4c4a:4155 Jieli Technology USB Composite Device Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 001 Device 004: ID 046a:c110 CHERRY KC 4500 Ergo Keyboard Bus 001 Device 005: ID 10c4:ea60 Silicon Labs CP210x UART Bridge Bus 001 Device 006: ID 0557:7000 ATEN International Co., Ltd Hub Bus 001 Device 007: ID 0557:2419 ATEN International Co., Ltd Virtual mouse/keyboard device Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 004 Device 002: ID 0bda:9210 Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 011 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 012 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub [root at debian01:/usr/local/admin/scripts]# [root at debian01:/usr/local/admin/scripts]# xl usbdev-attach smart10 hostbus=1 hostaddr=5 libxl: error: libxl_qmp.c:1837:qmp_ev_parse_error_messages: Domain 13:Bus 'xenusb-0.0' not found libxl: error: libxl_device.c:1500:device_addrm_aocomplete: unable to add device libxl_device_usbdev_add failed. USB Controlles is created as expcted, but not possible [root at debian01:/usr/local/admin/scripts]# xl usb-lis smart10 Devid Type BE state usb-ver ports 0 devicemodel 0 0 2 6 Port 1: Port 2: Port 3: Port 4: Port 5: Port 6: other USB Device - same error [root at debian01:/usr/local/admin/scripts]# xl usbdev-attach smart10 hostbus=1 hostaddr=4 libxl: error: libxl_qmp.c:1837:qmp_ev_parse_error_messages: Domain 13:Bus 'xenusb-0.0' not found libxl: error: libxl_device.c:1500:device_addrm_aocomplete: unable to add device
Maximilian Engelhardt
2025-Dec-15 18:12 UTC
[Pkg-xen-devel] Bug#1122188: xen-hypervisor-4.20-amd64: USB Passthrough to qemu HVM not pussible
On Monday, 8 December 2025 14:40:40 CET Volker Gruenewald wrote:> [root at debian01:/usr/local/admin/scripts]# xl usbdev-attach smart10 hostbus=1 > hostaddr=5 libxl: error: libxl_qmp.c:1837:qmp_ev_parse_error_messages: > Domain 13:Bus 'xenusb-0.0' not found libxl: error: > libxl_device.c:1500:device_addrm_aocomplete: unable to add device > libxl_device_usbdev_add failed. > > USB Controlles is created as expcted, but not possible > > [root at debian01:/usr/local/admin/scripts]# xl usb-lis smart10 > Devid Type BE state usb-ver ports > 0 devicemodel 0 0 2 6 > Port 1: > Port 2: > Port 3: > Port 4: > Port 5: > Port 6:This looks like you are trying to pass through a usb1 device, but there is only a virtual usb2 controller in your vm. If you adjust your vm configuration to create a virtual usb1 controller this error will probably go away. You can do this by specifying usb = 1 or alternatively for an usb1 and usb2 controller usbctrl = [ "version=1, ports=2", "version=2, ports=6" ] in your vms configuration. However you likely will run into a different error: $ xl usbdev-attach testvm hostbus=1 hostaddr=4 libxl: error: libxl_qmp.c:1837:qmp_ev_parse_error_messages: Domain 6:Parameter 'hostaddr' expects uint64 libxl: error: libxl_device.c:1500:device_addrm_aocomplete: unable to add device libxl_device_usbdev_add failed. This is a bug in xen and I'm currently in contact with xen upstream about that. A possible fix is here: https://lore.kernel.org/xen-devel/20251215135124.11410-1-anthony at xenproject.org/
Volker Gruenewald
2025-Dec-22 14:45 UTC
[Pkg-xen-devel] Bug#1122188: xen-hypervisor-4.20-amd64: USB Passthrough to qemu HVM not pussible
Hi, thx for reply so this must have changed since version Xen-4.17 and before Using xen 4.17 and older i can even define a USB Hostcontroller Version 3 and attach a(ny) USB Device that is the same with a physical System, doesn't matter where i put the USB Stick in ? so for me as a user (since XEN 2x or so) it seems that i loose functionality in every version - in XEN 4.1 i could pass through a USB Device to a PVM , since XEN 4.11 or so only to a HVM - Passthrough for PCI(e) Devices is gone now i have to know which USB Device (Version) i want to attach and have to do it in the correct order ? now with the Patch [root at debian01:~]# xl usb-list usbvm02 Devid? Type? ? ? ? ?BE? state usb-ver ports 0? ? ? devicemodel? 0? ?0? ? ?2? ? ? ?6 ? Port 1: ? Port 2: ? Port 3: ? Port 4: ? Port 5: ? Port 6: Devid? Type? ? ? ? ?BE? state usb-ver ports 1? ? ? devicemodel? 0? ?0? ? ?1? ? ? ?2 ? Port 1: Bus 001 Device 008 ? Port 2: [root at debian01:~]# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 4c4a:4155 Jieli Technology USB Composite Device Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 001 Device 004: ID 046a:c110 CHERRY KC 4500 Ergo Keyboard Bus 001 Device 005: ID 10c4:ea60 Silicon Labs CP210x UART Bridge Bus 001 Device 006: ID 0557:7000 ATEN International Co., Ltd Hub Bus 001 Device 007: ID 0557:2419 ATEN International Co., Ltd Virtual mouse/keyboard device Bus 001 Device 008: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 004 Device 002: ID 0bda:9210 Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 011 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 012 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub [root at debian01:~]# xl usbdev-attach usbvm02 hostbus=1 hostaddr=5 libxl: error: libxl_qmp.c:1837:qmp_ev_parse_error_messages: Domain 14:failed to open host usb device 1:5 libxl: error: libxl_device.c:1500:device_addrm_aocomplete: unable to add device libxl_device_usbdev_add failed. [root at debian01:~]# xl usbdev-attach usbvm02 hostbus=1 hostaddr=5 controller=1 [root at debian01:~]# xl usb-list usbvm02 Devid? Type? ? ? ? ?BE? state usb-ver ports 0? ? ? devicemodel? 0? ?0? ? ?2? ? ? ?6 ? Port 1: ? Port 2: ? Port 3: ? Port 4: ? Port 5: ? Port 6: Devid? Type? ? ? ? ?BE? state usb-ver ports 1? ? ? devicemodel? 0? ?0? ? ?1? ? ? ?2 ? Port 1: Bus 001 Device 008 ? Port 2: Bus 001 Device 005 [root at debian01:~]# with XEN 4.17 (and earlier) i only do xl create /etc/xen/usbvm02.cfg xl usbctrl-attach usbvm02 version=3 ports=6 xl usbdev-attach usbvm02 hostbus=1 hostaddr=5 regards Volker Am 15.12.25 um 19:12 schrieb Maximilian Engelhardt:> usb = 1