vfio-utils
(Still WIP)
This is a collection of scripts and documentation I used to get VFIO + Looking Glass up and running.
The ultimate purpose of VFIO is to be able to enable PCI passthrough, which allows us to passthrough a graphics card to a virtual machine. This results in native or near-native graphics performance.
Documentation used
TL;DR
The most important points to getting VFIO working correctly are:
- Enabling IOMMU (and making sure our hardware supports it)
- Isolating the devices from the host machine
- As of kernel
5.4.26
, vfio module is included in the kernel. You can check via (grep -i vfio /boot/config
), so it's unnecessary to load it - Find your IOMMU device IDs via the included
iommu.sh
script and add those PCI IDs in the includedvfio.conf
file. Make sure to move that to the appropriate location
- As of kernel
- Configure the VM to attach the PCI devices
- Make sure to also include the appropriate drivers for virtio and vfio if you're using a Windows VM