I followed mathiashueber indows-virtual-machine-gpu-passthrough-ubuntu/
Here are the device IDs that belong to iommu group 15 and which contain my GTX 1060:
10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f
Loot at my dmesg:
lz@z:~$ dmesg | grep -i vfio
[ 2.058555] VFIO - User Level meta-driver version: 0.3
[ 2.065217] vfio-pci 0000:07:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
[ 2.084445] vfio_pci: add [10de:2184[ffffffff:ffffffff]] class 0x000000/00000000
[ 2.108045] vfio_pci: add [10de:1aeb[ffffffff:ffffffff]] class 0x000000/00000000
[ 2.108054] vfio_pci: add [10de:1aec[ffffffff:ffffffff]] class 0x000000/00000000
[ 2.108057] vfio_pci: add [10de:1aed[ffffffff:ffffffff]] class 0x000000/00000000
[ 2.108060] vfio_pci: add [1022:145f[ffffffff:ffffffff]] class 0x000000/00000000
However, I still get some devices not being used by vfio-pci:
07:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116 [GeForce GTX 1660] [10de:2184] (rev a1) (prog-if 00 [VGA controller])
Subsystem: NVIDIA Corporation TU116 [GeForce GTX 1660] [10de:1324]
Flags: fast devsel, IRQ 10
Memory at f6000000 (32-bit, non-prefetchable) [disabled] [size=16M]
Memory at d0000000 (64-bit, prefetchable) [disabled] [size=256M]
Memory at e0000000 (64-bit, prefetchable) [disabled] [size=32M]
I/O ports at f000 [disabled] [size=128]
Expansion ROM at f7000000 [disabled] [size=512K]
Capabilities: <access denied>
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau
07:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:1aeb] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:1324]
Flags: fast devsel, IRQ 11
Memory at f7080000 (32-bit, non-prefetchable) [disabled] [size=16K]
Capabilities: <access denied>
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
07:00.2 USB controller [0c03]: NVIDIA Corporation Device [10de:1aec] (rev a1) (prog-if 30 [XHCI])
Subsystem: NVIDIA Corporation Device [10de:1324]
Flags: fast devsel, IRQ 47
Memory at e2000000 (64-bit, prefetchable) [size=256K]
Memory at e2040000 (64-bit, prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
07:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device [10de:1aed] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:1324]
Flags: bus master, fast devsel, latency 0, IRQ 59
Memory at f7084000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: nvidia-gpu
Kernel modules: i2c_nvidia_gpu
08:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller [1022:145f] (prog-if 30 [XHCI])
Subsystem: Gigabyte Technology Co., Ltd Zeppelin USB 3.0 Host controller [1458:5007]
Flags: bus master, fast devsel, latency 0, IRQ 48
Memory at f7200000 (64-bit, non-prefetchable) [size=1M]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
the 08.00.3 is not in the same iommu group as the VGA (15) but it’s an USB controller I want to use.
what should I do?
lz@z:~$ cat /etc/initramfs-tools/modules
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax: module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
vfio
vfio_iommu_type1
vfio_virqfd
options vfio_pci ids=10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f
vfio_pci ids=10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f
vfio_pci
lz@z:~$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
vfio
vfio_iommu_type1
vfio_pci ids=10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f
lz@z:~$ cat /etc/modprobe.d/nvidia.conf
softdep nouveau pre: vfio-pci
softdep nvidia pre: vfio-pci
softdep nvidia* pre: vfio-pci
I think it has something to do with softdep. Do I need softdep to these other drivers so vfio-pci grabs them before?