Skip to content

Instantly share code, notes, and snippets.

@Informatic
Last active September 13, 2017 07:49
Show Gist options
  • Select an option

  • Save Informatic/04f5754b691269c8bf9b to your computer and use it in GitHub Desktop.

Select an option

Save Informatic/04f5754b691269c8bf9b to your computer and use it in GitHub Desktop.
Log of my struggle with vfio / iommu / VGA passthrough

It just works™, at least on Windows 10 & UEFI/OVMF. Remember to have QXL emulated graphics enabled. This will show as an additional screen in Windows, but you'll be able to just disable it. Only downside of that is you won't get OVMF and Windows splashscreen on physical screen.

Hardware

  • AMD Phenom II x4 955
  • ASRock 970 Extreme3
  • AMD Radeon R9 280x
  • 16GB RAM

Snippets

lspci -nn -v | egrep -i '^[0-9]|driver in use' # lists devices with their names, IDs and current drivers

Changes

  • /etc/modprobe.d/blacklist.conf
blacklist radeon
  • /etc/initramfs-tools/modules
vfio_pci ids=1002:6798,1002:aaa0 
vfio_iommu_type1
  • /etc/default/grub
GRUB_CMDLINE_LINUX="amd_iommu=on iommu=pt nofb nomodeset video=vesafb:off pci-stub.ids=1002:6798,1002:aaa0"
# I'm pretty sure something here isn't really needed, but... welp

Links

http://vfio.blogspot.com/2015/05/vfio-gpu-how-to-series-part-3-host.html http://thehomeserverblog.com/

Issues

  • Default video output stays enabled when no virtual machine is started.
  • [Working on suspend ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment