[TUTORIAL] ML360 and Radeon RX 570 - VGA Passthrough

phguy

Renowned Member
Oct 27, 2015
24
0
66
France
Server : HP ML350 G6 with 2x Xeon
GPU : Sapphire PULSE Radeon RX 570 ITX 8G G5

SOLVED !!!!!! after 3 years !!!! I've tried again with different combinaison, and I can now share my solution for a Radeon RX570 :

Identify the GPU you want to passthrought (to get its ID) :
lspci -n -s 0b:00
Code:
0b:00.0 0300: 1002:67df (rev ef)
0b:00.1 0403: 1002:aaf0
Here we will take the root of the code otherwise it represent only sound of the card or only display of the card.

The VM :
#In VM.conf file choosse bios Seabios (with webUi) and Q35
Code:
machine: q35

#Add the line for the hardware passthrough you want. In WebUI it is ROM BAR ticked, other options unticked, PCIE ticked, VGA principal unticked):
hostpci0: 0b:00.0,pcie=1

#Activation of iommu and direct isolation of the card :
Code:
#nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet pcie_acs_override=id:1002:67df,1002:aaf0 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1"

This: pcie_acs_override=id:1002:67df,1002:aaf0
help to isolate GPU part from the sound part, because it seems that the sound part isn't compatible with passthrough
visible with: cat /var/log/syslog | grep -e IOM -e DMAR

#then update grub :
update-grub

#Isolate the card :
echo "options vfio-pci ids=1002:67df,1002:aaf0" > /etc/modprobe.d/vfio.conf

#Blacklist driver :
echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf

#add drivers vfio :
Code:
nano /etc/modules
#add lines :
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

Reboot and then it is ok. Have a nice day !
 
I have a very similar GPU (same brand, name, and IDs but 4GB) and it works fine without q35 (and pcie=1) but with OVMF, including sound (without pcie_acs_override).
Please note that blacklisting the radeon driver should have no effect becasuse this card uses the amdgpu linux driver, never radeon.
Also, don't forget to run update-initramfs -u, after changing things in /etc/modprobe.d/.

Happy for you that you got it working!
 
Last edited:
  • Like
Reactions: phguy