Your message dated Wed, 2 Feb 2022 23:21:56 +0200
with message-id <[email protected]>
and subject line Bug#1004834: Closing (qemu-system: connecting devices using 
`usb-host` does not work)
has caused the Debian Bug report #1004834,
regarding qemu-system: connecting devices using `usb-host` does not work
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1004834: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004834
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
After further testing, I found that it does work if you launch qemu as root. 
Setting up a suitable udev rule that uses uaccess tags makes the
device(s) work without need for root permissions.

Closing

--- End Message ---

Reply via email to