Re: USB passthrough in QEMU

2025-04-04 Thread Vitaly Shevtsov
It is attached as uhid. On Tue, Mar 25, 2025 at 1:33 PM Manuel Bouyer wrote: > > On Tue, Mar 25, 2025 at 01:15:56PM +0500, Vitaly Shevtsov wrote: > > Maybe, but `userconf disable uaudio' didn't help - it is still not > > Maybe > userconf disable uaudio* > > > visible in `info usbhost`. > > is it

Re: USB passthrough in QEMU

2025-03-25 Thread Mario Marietto
---> I don't think so (but I could be wrong). But it definitely requires IOMMU, which I doubt NVMM supports. In FreeBSD there is bhyve that allows the passthru of the GPU without IOMMU

Re: USB passthrough in QEMU

2025-03-25 Thread Vitaly Shevtsov
It seems I've got what the issue is. If I type 'info usbhost' In QEMU monitor, I can see only two devices: Integrated SmartCard Reader, Biometric Coprocessor. So only these two can be pass-throughed. The rest of host USB devices are not visible by QEMU and therefore cannot be used in guests. On Tu

Re: USB passthrough in QEMU

2025-03-25 Thread Vitaly Shevtsov
Okay, thank you all :) вт, 25 мар. 2025 г., 14:41 Manuel Bouyer : > On Tue, Mar 25, 2025 at 02:13:13PM +0500, Vitaly Shevtsov wrote: > > It is attached as uhid. > > This explains why qemu can't see it > > -- > Manuel Bouyer > NetBSD: 26 ans d'experience feront toujours la difference > -- >

Re: USB passthrough in QEMU

2025-03-25 Thread Manuel Bouyer
On Tue, Mar 25, 2025 at 02:13:13PM +0500, Vitaly Shevtsov wrote: > It is attached as uhid. This explains why qemu can't see it -- Manuel Bouyer NetBSD: 26 ans d'experience feront toujours la difference --

Re: USB passthrough in QEMU

2025-03-25 Thread Manuel Bouyer
On Tue, Mar 25, 2025 at 01:15:56PM +0500, Vitaly Shevtsov wrote: > Maybe, but `userconf disable uaudio' didn't help - it is still not Maybe userconf disable uaudio* > visible in `info usbhost`. is it attached as ugen ? -- Manuel Bouyer NetBSD: 26 ans d'experience feront toujours la diffe

Re: USB passthrough in QEMU

2025-03-25 Thread Vitaly Shevtsov
Maybe, but `userconf disable uaudio' didn't help - it is still not visible in `info usbhost`. Okay then, I'm giving up for a while :) On Tue, Mar 25, 2025 at 1:08 PM Manuel Bouyer wrote: > > On Tue, Mar 25, 2025 at 01:02:07PM +0500, Vitaly Shevtsov wrote: > > It seems I've got what the issue is.

Re: USB passthrough in QEMU

2025-03-25 Thread Manuel Bouyer
On Tue, Mar 25, 2025 at 01:02:07PM +0500, Vitaly Shevtsov wrote: > It seems I've got what the issue is. If I type 'info usbhost' In QEMU > monitor, I can see only two devices: Integrated SmartCard Reader, > Biometric Coprocessor. So only these two can be pass-throughed. The I guess because these a

Re: USB passthrough in QEMU

2025-03-24 Thread Manuel Bouyer
On Tue, Mar 25, 2025 at 01:30:05AM +0500, Vitaly Shevtsov wrote: > It's just a USB stick (Kingston DataTraveler) > > It's recognized by the kernel as: > [ 15381.341529] umass0 at uhub5 port 2 configuration 1 interface 0 > [ 15381.341529] umass0: Kingston (0x0951) DataTraveler 3.0 (0x1666), > rev 2

Re: USB passthrough in QEMU

2025-03-24 Thread Mario Marietto
Try this one : qemu-system-x86_64 -machine q35 -cpu max -accel nvmm -m 8G -vga std \ -drive file=/mnt/zroot-133/bhyve/img/Android/Android-qemu.img,format=raw \ -rtc base=localtime -device usb-ehci,id=usb,bus=pcie.0,addr=0x3 -device usb-tablet -device usb-kbd \ -smbios type=2 -nodefaults -netdev ta

Re: USB passthrough in QEMU

2025-03-24 Thread Mario Marietto
Just a question : On NetBSD,qemu allows passing an nVidia GPU from the host to a Linux and /or Windows guest ? thanks. On Mon, Mar 24, 2025 at 9:31 PM Vitaly Shevtsov wrote: > It's just a USB stick (Kingston DataTraveler) > > It's recognized by the kernel as: > [ 15381.341529] umass0 at uhub5 p

Re: USB passthrough in QEMU

2025-03-24 Thread Vitaly Shevtsov
I'm sorry, but it still doesn't work :) Do you run QEMU as root to be able to pass USB devices or as a non-root user? I use the following to run VM in QEMU: qemu-system-x86_64 -m 4G -cpu host -smp 4 -M q35 -accel nvmm -usb -device usb-host -drive file=vm.qcow2 -nic user,model=e1000 -rtc base=loca

Re: USB passthrough in QEMU

2025-03-24 Thread Vitaly Shevtsov
Passing as a block device will work for sure :) But I want to pass it as a real USB device to a guest, because then I will want to try with USB headset to get the audio with no latency. Here /dev/sd0 is just for testing. On Tue, Mar 25, 2025 at 1:41 AM Manuel Bouyer wrote: > > On Tue, Mar 25, 202

Re: USB passthrough in QEMU

2025-03-24 Thread Manuel Bouyer
On Tue, Mar 25, 2025 at 12:54:50AM +0500, Vitaly Shevtsov wrote: > I'm sorry, but it still doesn't work :) > > Do you run QEMU as root to be able to pass USB devices or as a non-root user? > > I use the following to run VM in QEMU: > qemu-system-x86_64 -m 4G -cpu host -smp 4 -M q35 -accel nvmm -u

Re: USB passthrough in QEMU

2025-03-24 Thread Vitaly Shevtsov
> On NetBSD,qemu allows passing an nVidia GPU from the host to a Linux and /or > Windows guest ? thanks. I don't think so (but I could be wrong). But it definitely requires IOMMU, which I doubt NVMM supports. On Tue, Mar 25, 2025 at 1:35 AM Mario Marietto wrote: > > Just a question : > > On Net

Re: USB passthrough in QEMU

2025-03-24 Thread Vitaly Shevtsov
It's just a USB stick (Kingston DataTraveler) It's recognized by the kernel as: [ 15381.341529] umass0 at uhub5 port 2 configuration 1 interface 0 [ 15381.341529] umass0: Kingston (0x0951) DataTraveler 3.0 (0x1666), rev 2.10/0.01, addr 7 [ 15381.341529] umass0: using SCSI over Bulk-Only [ 15381.35

Re: USB passthrough in QEMU

2025-03-24 Thread Vitaly Shevtsov
This is what I was looking for. Thanks! :) On Tue, Mar 25, 2025 at 12:32 AM Manuel Bouyer wrote: > > On Mon, Mar 24, 2025 at 11:59:00PM +0500, Vitaly Shevtsov wrote: > > Hello! > > > > Was anyone able to pass through a USB device in QEMU? When I try using > > `-usb -device usb-host`, I get the f

Re: USB passthrough in QEMU

2025-03-24 Thread Manuel Bouyer
On Mon, Mar 24, 2025 at 11:59:00PM +0500, Vitaly Shevtsov wrote: > Hello! > > Was anyone able to pass through a USB device in QEMU? When I try using > `-usb -device usb-host`, I get the following error: > qemu-system-x86_64: libusb_kernel_driver_active: -12 [NOT_SUPPORTED] > > Is it even supporte