I was bored and wanted to test if I could use VFIO on the framework. Turns out it works, and the UX is actually pretty nice.
The main hassle of vfio is iommu groups, but I guess thanks to my eGPU board (ADT-link r43sg) and the framework motherboard, the gpu is in a group with only the Thunderbolt bridge it uses and its audio device (so I bound all three). evdev device passthrough and emulated sound.
Steps I followed and niceties now available:
- fixed modules and bound the device to vfio following archwiki
- installed Windows 11 in kvm, shut it down before network connecting it (installed without network via OOBE bypass)
- added the PCI devices to the vm and removed all the other display/input devices I didn’t need
- booted back up with windows showing on my egpu’s connected monitor!
- if I bought a dummy plug, I could alternatively connect that monitor to my hdmi expansion card instead and use a client like Looking Glass to view it.
The best part, it’s hotplug as long as the kvm is currently shut down! If it’s not, the guest will crash to the point I had to reboot the host to reconnect to it. Since it’s just a pci device to Linux and not actually bound to any video drivers, it basically acts like a normal usb and isn’t subject to any of the same issues with screens suddenly appearing/disappearing.