Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1004834: qemu-system: connecting devices using `usb-host` does not work

390 views
Skip to first unread message

Sicelo A. Mhlongo

unread,
Feb 1, 2022, 6:30:04 PM2/1/22
to
Package: qemu-system
Version: 1:6.2+dfsg-2
Severity: important

When attaching a usb devices on either xhci or ehci emulated controllers, they
using `usb-host` option, they do not get detected by the guest operating
system, whether guest is a Linux or Windows system. Other types of emulated usb
interfaces work (I tested `usb-tablet` and `usb-audio`).

The commandline I use is:

qemu-system-x86_64 -m 4096 \
-enable-kvm -cpu host -smp cores=2 \
-rtc base=localtime,clock=host \
-drive driver=raw,file=${WINDOWS10IMG},if=virtio \
-net nic,model=virtio-net-pci \
-net user,hostfwd=tcp:127.0.0.1:13389-:3389 \
-vga virtio \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid=0x046d,productid=0x0825,id=cam0 \
-device usb-tablet

I have tested with 4 different devices, namely:
- Logitech C270 Webcam (046d:0825)
- USB Flash Disk
- Bluetooth module (internal, 8087:07dc)
- Ericsson N5321 gw modem (internal, 0bdb:193e)

The webcam does show up as an audio interface if I use `usb-audio` option to
add it instead of `usb-host`. It is not usable as `usb-audio` does not support
microphones, but it shows that the `usb-audio` interface in qemu does work for
USB devices.

All the devices show up in qemu monitor's `info usbhost` command output, and
after adding them with `usb-host`, the monitor shows them, even though they
are completely inaccessible to the guest.



-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-3-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
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

Versions of packages qemu-system depends on:
ii qemu-system-arm 1:6.2+dfsg-2
ii qemu-system-mips 1:6.2+dfsg-2
ii qemu-system-misc 1:6.2+dfsg-2
ii qemu-system-ppc 1:6.2+dfsg-2
ii qemu-system-sparc 1:6.2+dfsg-2
ii qemu-system-x86 1:6.2+dfsg-2

qemu-system recommends no packages.

qemu-system suggests no packages.

-- no debconf information
0 new messages