Looking for a applicable tutorial for Ubuntu (18.04) and my AMD RX 470

This guide helped me a lot.


First thing is first...MAKE SURE YOUR HARDWARE SUPPORTS WHAT YOU'RE TRYING TO DO. CPU & Mobo must support vt-d, if Intel (idk what ADM calls it), GPU supports UEFI, etc. The guide is written to pass through a NVidia card, so be careful when blacklisting the driver for the card you plan to pass through. If you're passing through an AMD card, blacklist "amdgpu", or whatever driver the kernel has loaded for that card, instead of "nouveau".

You may also need to tell your host BIOS which PCI slot to post with? Maybe? IDK, I couldn't get my host to POST & boot with the Nvidia card for a while (I am passing through AMD). Could also be because I accidentally blacklisted nouveau, following the guide.

Also, copy the below and save as a .sh file. Run it to check the iommu groups easily. Make sure the card that you want to pass through is not in the same iommu group as the card/igpu as your host.

for d in /sys/kernel/iommu_groups/*/devices/*; do
    n=${d#*/iommu_groups/*}; n=${n%%/*}
    printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"

If the cards are in separate groups, you don't have to worry about kernel patching/recompiling. After you get the card passed through, you'll probably have to tweak things like network and sound in virt-manager. Also, I'm only able to get the default windows VGA driver to work with my RX 480 nitro+. Gaming works pretty well though. Was playing PUBG at 80fps last night. Your mileage may vary.


/r/VFIO Thread