[vfio-users] USB controller no longer being released properly by QEmu/vfio

Nicolas Roy-Renaud nicolas.roy-renaud.1 at ens.etsmtl.ca
Tue May 3 18:35:16 UTC 2016


Up until about a week ago, I could pass through the USB controller for 
my front panel to my gaming VM and it would work just fine. Since then, 
though, and I'm not exactly sure what triggered it, it appears as if 
said controller isn't properly being released by the VM when it shuts 
down on its own (i.e : When I initiate a shutdown from within the guest 
and let it complete). Interestingly, getting libvirt to destroy the VM 
works just fine, and I can reboot without issues this way.

On a "bad" shut down, virt-manager says the VM is "Shutting down" and 
won't let me do anything with it. Trying to use virsh directly doesn't 
seem to do anything, as the operation just blocks forever. Trying to 
restart libvirtd only makes it unresponsive. The Qemu logs for the VM 
themselves have this interesting bit :

    vfio : Cannot reset device 0000:00:14.0, no available reset mechanism

Going back to earlier entries makes it seem like the USB controller 
always did this, although this line would usually be followed by 
something like this :

    terminating on signal 15 prom pid 8360

This no longer appears in newer entries.

Trying to do a device remove/rescan blocks the shell with an unkillable 
task, while dmesg outputs this :

    vfio-pci 0000:00:14.0: Relaying device request to user (#0)
    vfio-pci 0000:00:14.0: Relaying device request to user (#10)
    vfio-pci 0000:00:14.0: Relaying device request to user (#20)
    vfio-pci 0000:00:14.0: Relaying device request to user (#30)
    vfio-pci 0000:00:14.0: Relaying device request to user (#40)
    vfio-pci 0000:00:14.0: Device is currently in use, task "bash" (2030) blocked until device is released

Until I try to run that remove/rescan, the lspci still lists the device 
with this entry, which goes away after that even though the operation 
seemingly never completes :

    00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04)
    	Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:7758]
    	Kernel driver in use: xhci_hcd
    	Kernel modules: xhci_pci

It looks just the same when the controller is attached to the host, even 
though none of what's plugged into it is listed by lsusb after I 
shutdown the VM.

Can anyone tell me what's going on? I feel like I'm closing in on the 
solution, but I'm really not sure where to go from here.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160503/307d3b86/attachment.htm>


More information about the vfio-users mailing list