I had a blast today. After days of sweat and hard work, I finally got Ubuntu and Windows 11 to work on Intel integrated graphics. Since the 11th generation of Intel CPUs, GVT-g was replaced by this new (actually very old) technology called SR-IOV. Unfortunately, NVIDIA and AMD won't let consumers use it on their precious graphics cards to run Windows games on virtual machines. But just for fun, I wanted to see if I could get stable 3D acceleration and video playback to work. And boy, sure it was fast!
Before you get your hands on the Virtual Machine Manager, you should install the unofficial drivers for Linux, since Intel won't give us a good SR-IOV driver. Follow this guide if you're running Arch Linux. After that, install the Linux guest drivers for Ubuntu or download the usual Intel graphics driver for Windows 11.
When you're done installing, edit the file /etc/tmpfiles.d/i915-set-sriov-numvfs.conf and add:
w /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs - - - - 2
Reboot your computer.
On both virtual machines, click "Add Hardware" and select PCI Host Device. You should see "Intel Corporation Alder Lake-HX GT1" or something similar. Select the second device for the first virtual machine and the third device for the second.
To check if the drivers fully loaded: