[qubes-users] unable to attach the usb controller to win10 hvm

Hey!

I've windows tools installed in windows 10 and when I'm trying to attach the usb controller by:

[user@dom0 ~]$ qvm-pci attach win10 --option no-strict-reset=true dom0:00_14.0

I get these errors in journalctl:

Jan 30 20:22:52 dom0 libvirtd[2160]: 2021-01-30 20:22:52.571+0000: 2507: error : virPCIDeviceReset:1002 : internal error: Unable to reset PCI device 0000:00:14.0: no FLR, PM reset or bus reset available
Jan 30 20:22:52 dom0 libvirtd[2160]: 2021-01-30 20:22:52.576+0000: 2507: error : libxlDomainAttachHostPCIDevice:3250 : internal error: libxenlight failed to attach pci device 0000:00:14.0
Jan 30 20:22:52 dom0 libvirtd[2160]: 2021-01-30 20:22:52.576+0000: 2507: error : virPCIDeviceReset:1002 : internal error: Unable to reset PCI device 0000:00:14.0: internal error: libxenlight failed to attach pci device 0000:00:14.0
Jan 30 20:22:52 dom0 qubesd[2523]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.device.pci.Attach' dest=b'win10 arg=b'dom0+00_14.0' len(untrusted_payload)=20
Jan 30 20:22:52 dom0 qubesd[2523]: Traceback (most recent call last):
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib/python3.5/site-packages/qubes/api/__init__.py", line 275, in respond
Jan 30 20:22:52 dom0 qubesd[2523]: untrusted_payload=untrusted_payload)
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib64/python3.5/asyncio/futures.py", line 381, in __iter__
Jan 30 20:22:52 dom0 qubesd[2523]: yield self # This tells Task to wait for completion.
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib64/python3.5/asyncio/tasks.py", line 310, in _wakeup
Jan 30 20:22:52 dom0 qubesd[2523]: future.result()
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib64/python3.5/asyncio/futures.py", line 294, in result
Jan 30 20:22:52 dom0 qubesd[2523]: raise self._exception
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib64/python3.5/asyncio/tasks.py", line 240, in _step
Jan 30 20:22:52 dom0 qubesd[2523]: result = coro.send(None)
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib/python3.5/site-packages/qubes/api/admin.py", line 1276, in vm_device_attach
Jan 30 20:22:52 dom0 qubesd[2523]: yield from self.dest.devices[devclass].attach(assignment)
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib/python3.5/site-packages/qubes/devices.py", line 254, in attach
Jan 30 20:22:52 dom0 qubesd[2523]: device=device, options=device_assignment.options)
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib/python3.5/site-packages/qubes/events.py", line 231, in fire_event_async
Jan 30 20:22:52 dom0 qubesd[2523]: kwargs, pre_event=pre_event)
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib/python3.5/site-packages/qubes/events.py", line 166, in _fire_event
Jan 30 20:22:52 dom0 qubesd[2523]: effect = func(self, event, **kwargs)
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib/python3.5/site-packages/qubes/ext/pci.py", line 241, in on_device_pre_attached_pci
Jan 30 20:22:52 dom0 qubesd[2523]: device=device, vm=vm, options=options))
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib/python3.5/site-packages/qubes/app.py", line 101, in wrapper
Jan 30 20:22:52 dom0 qubesd[2523]: return attr(*args, **kwargs)
Jan 30 20:22:52 dom0 qubesd[2523]: File "/usr/lib64/python3.5/site-packages/libvirt.py", line 563, in attachDevice
Jan 30 20:22:52 dom0 qubesd[2523]: if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
Jan 30 20:22:52 dom0 qubesd[2523]: libvirt.libvirtError: internal error: Unable to reset PCI device 0000:00:14.0: internal error: libxenlight failed to attach pci device 0000:00:14.0

Is this a bug to be reported or does someone has ideas to resolve that?

liked2@gmx.de:

[user@dom0 ~]$ qvm-pci attach win10 --option no-strict-reset=true dom0:00_14.0

Is this a bug to be reported or does someone has ideas to resolve that?

According to the man page, the --option should be prior to the vmname so try that first. Also see if attaching via the GUI (with the no strict reset option selected) works any differently.

I could solve the issue:
After the install of the Windows Qubes Tools, the Xenbus VBD couldn't be properly activated by Win10. With this hint:

I've updated the driver of Xenbus VBD with these Xen-drivers:
https://xenbits.xen.org/pvdrivers/win/8.2.2/xenvbd.tar

After that I could successfully mount the USB-Bus to this Win10 vm. Still the USB 3.0 Host was not working. I have to disable and re-enable it after every windows restart.

Any ideas to solve that are welcome!

Thanks awokd for the support.