Passthrough usb 3.0 pci card

Im on Fedora 28 and im passing through a gpu, nvme, soundcard and a USB 3.0 pci card. The problem is that the USB card refuse to load vfio-pci drivers.

/etc/modprobe.d/vfio.conf
#IOMMU Group 14 09:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 [144d:a804]
#IOMMU Group 15 0a:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02)
#IOMMU Group 16 0b:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80] (rev a1)
#IOMMU Group 16 0b:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1)
#IOMMU Group 25 41:00.0 PCI bridge [0604]: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge [1b21:1080] (rev 04)
#IOMMU Group 25 42:04.0 Multimedia audio controller [0401]: C-Media Electronics Inc CMI8788 [Oxygen HD Audio] [13f6:8788]

options vfio-pci ids=10de:1b80,10de:10f0,144d:a804,13f6:8788,1912:0015

lspci -nnv
0a:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02) (prog-if 30 [XHCI])
Subsystem: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015]
Flags: bus master, fast devsel, latency 0, IRQ 35, NUMA node 0
Memory at ef900000 (64-bit, non-prefetchable) [size=8K]
Capabilities:
Kernel driver in use: xhci_hcd

And i have done dracut -f --kver $(uname -r) , and updated grub

Does any one have a idea what to do?

In most cases you won’t need to load the vfio driver for general devices like USB, SATA, audio devices, NICs etc. You should be able to just pass it to the VM and it will capture it when you start it and give it back to the host on shutdown.

Not OP, but having the same problem with USB add-in card not using vfio-pci driver.

The issue is when I try to start the VM, I get error:

Error starting domain: internal error: qemu unexpectedly closed the monitor: 2021-09-18T03:21:47.613347Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.npt [bit 0]
2021-09-18T03:21:47.613357Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.nrip-save [bit 3]
2021-09-18T03:21:47.613865Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.npt [bit 0]
2021-09-18T03:21:47.613874Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.nrip-save [bit 3]
2021-09-18T03:21:49.977777Z qemu-system-x86_64: -device vfio-pci,host=0000:07:00.0,id=hostdev5,bus=pci.10,addr=0x0: vfio 0000:07:00.0: group 14 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1329, in startup
    self._backend.create()
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 1353, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2021-09-18T03:21:47.613347Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.npt [bit 0]
2021-09-18T03:21:47.613357Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.nrip-save [bit 3]
2021-09-18T03:21:47.613865Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.npt [bit 0]
2021-09-18T03:21:47.613874Z qemu-system-x86_64: warning: This feature depends on other features that were not requested: CPUID.8000000AH:EDX.nrip-save [bit 3]
2021-09-18T03:21:49.977777Z qemu-system-x86_64: -device vfio-pci,host=0000:07:00.0,id=hostdev5,bus=pci.10,addr=0x0: vfio 0000:07:00.0: group 14 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

I do have vfio-pci driver override for this device:

cat /sys/bus/pci/devices/0000\:07\:00.0/driver_override 
vfio-pci

But my device is not using vfio-pci driver:

07:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242] (prog-if 30 [XHCI])
	Subsystem: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
	Flags: bus master, fast devsel, latency 0, IRQ 58, IOMMU group 14
	Memory at d9400000 (64-bit, non-prefetchable) [size=32K]
	Capabilities: [50] MSI: Enable+ Count=1/8 Maskable- 64bit+
	Capabilities: [78] Power Management version 3
	Capabilities: [80] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [200] Advanced Error Reporting
	Capabilities: [280] Secondary PCI Express
	Capabilities: [300] Latency Tolerance Reporting
	Kernel driver in use: xhci_hcd

That being said, from the error message, my problem has more to do with IOMMU group. Not sure what to do next…I can move the card to another slot, but no guarantee that will fix it. I also want to install a sound card in that only spare slot left, so honestly I’d like to know if there is a way to solve that

Nope, didn’t work. I moved the USB card into a spare slot, and confirmed that it’s in its own IOMMU group. After updating the vfio-override script and rebooting, it still uses xhci_hcd driver :confused: