1#!/bin/bash
2# change the 999 if needed
3shopt -s nullglob
4for d in /sys/kernel/iommu_groups/{0..999}/devices/*; do
5n=${d#*/iommu_groups/*}; n=${n%%/*}
6printf 'IOMMU Group %s ' "$n"
7lspci -nns "${d##*/}"
8done;
1
2
3
4
5
6
7
8
9
10
11
12
|
sudo lspci -nnv | grep "c1:00.1" -i -A30
c1:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:228b] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:14ad]
Flags: bus master, fast devsel, latency 0, IRQ 357, NUMA node 0
Memory at c5080000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [160] Data Link Feature <?>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
|
/etc/default/grub Set line to GRUB_CMDLINE_LINUX_DEFAULT=amd_iommu=on iommu=pt kvm.ignore_msrs=1 vfio-pci.ids=10de:1aef,10de:2230,10de:2231,10de:24B0,10de:228b
adding the 10de:228b
/etc/modprobe.d/vfio.conf to options vfio-pci ids=10de:1aef,10de:2230,10de:2231,10de:24B0,10de:228b
update-grub2
reboot
Looks like the libvirt process cant pass the whole iommu group through to the guest VM becuase the nvidia audio device associated with the GPU on the A4000 has a different PCI ID to the A5000 and A6000, so it hasnt been added to the vfio driver. Thus when KVM tries to passthrough the GPU and the associated Audio device it fails becuase the Nvidia driver has the device locked.
Ive made a change to the vfio.conf and I'm rolling it out now to test if it works
After the fix applied
1
2
3
4
5
6
7
8
9
10
11
12
|
ubuntu@ai-pro-72:~$ sudo lspci -nnv | grep "c1:00.1" -A30
c1:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:1aef] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:147e]
Flags: fast devsel, IRQ 255, NUMA node 0
Memory at cb080000 (32-bit, non-prefetchable) [disabled] [size=16K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [160] Data Link Feature <?>
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
|