Elementary OS 5.0 / Ubuntu 18.XX - VFIO PCIe passthrough guide / tutorial

Enable IOMMU in GRUB

Most Linux distros do not enable IOMMU by default.
You will need to update your grub bootloader config to support IOMMU.

sudo nano /etc/default/grub

and add following to the GRUB_CMDLINE_LINUX_DEFAULT line:

A) for Intel CPU:

iommu=pt iommu=1 intel_iommu=on

B) for AMD CPU:

iommu=pt iommu=1 amd_iommu=on

so it looks like this: (in my case, i put amd_iommu, cuz i am on AMD platform)

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash iommu=pt iommu=1 amd_iommu=on"

result:

save file (ctrl + x, y, ENTER) and run:

update-grub

REBOOT


If your GPUs are in the same IOMMU group after you have completed this section of a guide, continue here: https://forum.level1techs.com/t/elementary-os-5-0-beta-vfio-pcie-passthrough-guide-tutorial/131420/17 , then proceed with next section (“Check if IOMMU is working”)