I'm running Ubuntu 16.04. I have PCI passthrough of a radeon r7 360 to a windows 7 VM working. I've played a game on it, run heaven benchmark, restarted and started a number of times. That all seems fairly solid so far. At boot up lspci -v shows that the radeon card and its associated hdmi audio device both have the vfio-pci as their kernel driver in use. But I can't get a USB3 card in that state no matter what I do! It always lists xhci_hcd.
I added in /etc/modules
vfio
vfio_iommu_type1
vfio_pci
kvm
kvm_intel
In blacklist.conf I added radeon to the end.
In /etc/initramfs-tools/modules
I have
vfio_pci ids=10de:13c2,10de:0fbb (not actual ids I use but I've triple checked the usb card as the first one)
I remember to run sudo update-initramfs -u after changes to these files and reboot
As an alternative method, I also tried creating files
/etc/modprobe.d/xhci_hcd.conf
With contents
softdep xhci_hcd pre: vfio-pci
This worked at least with radeon removed from blacklist and a similar file for radeon but nothing changed with the USB card.
Some weird things I noticed were that the radeon sound driver bound to vfio-pci even though its driver isn't blacklisted. I believe I needed the blacklist or the softdep to get the video device itself working.
It seems like softdep should work and I don't seem to be doing anything wrong that I can see, but it just doesn't.
I haven't tried blacklisting the xhci_hcd driver since I'd like to keep a separate usb 3.0 card available to the host. I may try that as a test.
I'm also being stubborn here. The USB3.0 card can be added in virt manager and the binding is all taken care of. But I don't really want devices that are attached to my windows guest ever really being used by the host.
I still could probably bind to vfio manually after I guess (haven't tried) but I still think what I'm trying to do should work.
I added in /etc/modules
vfio
vfio_iommu_type1
vfio_pci
kvm
kvm_intel
In blacklist.conf I added radeon to the end.
In /etc/initramfs-tools/modules
I have
vfio_pci ids=10de:13c2,10de:0fbb (not actual ids I use but I've triple checked the usb card as the first one)
I remember to run sudo update-initramfs -u after changes to these files and reboot
As an alternative method, I also tried creating files
/etc/modprobe.d/xhci_hcd.conf
With contents
softdep xhci_hcd pre: vfio-pci
This worked at least with radeon removed from blacklist and a similar file for radeon but nothing changed with the USB card.
Some weird things I noticed were that the radeon sound driver bound to vfio-pci even though its driver isn't blacklisted. I believe I needed the blacklist or the softdep to get the video device itself working.
It seems like softdep should work and I don't seem to be doing anything wrong that I can see, but it just doesn't.
I haven't tried blacklisting the xhci_hcd driver since I'd like to keep a separate usb 3.0 card available to the host. I may try that as a test.
I'm also being stubborn here. The USB3.0 card can be added in virt manager and the binding is all taken care of. But I don't really want devices that are attached to my windows guest ever really being used by the host.
I still could probably bind to vfio manually after I guess (haven't tried) but I still think what I'm trying to do should work.