https://www.youtube.com/watch?v=IE0ew8WwxLM
$ nano /etc/default/grub
# from
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
# to
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"
Change the following lines:
Update GRUB
$ update-grub
$ nano /etc/modules
Add following lines:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
$ nano /etc/modprobe.d/iommu_unsafe_interrupts.conf
Add following line:
options vfio_iommu_type1 allow_unsafe_interrupts=1
Then edit the kvm.conf file:
$ nano /etc/modprobe.d/kvm.conf