User:0xdc/Drafts/Configure Intel GPU Aperture Size via hidden UEFI settings

This guide is for Intel GPU users who want to use GVT-g to virtualise their GPU in VMs, but need to increase the GPU's aperture size to support more virtual graphics cards and/or larger resolutions.

Check CPU/chipset support
First, check that your computer is compatible. It must support hardware virtualisation (in this guide, specifically KVM) and Vt-d/VFIO. Most importantly, your CPU must be supported in the driver.

Download your BIOS
From your computer manufacturer's website, download a copy of the BIOS update package.

Some examples:

For dell computers, a different method is needed to extract the UEFI images https://github.com/dreamwhite/bios-extraction-guide/tree/master/Dell

UEFITool
qmake and other Qt libraries may be required.

Extract your BIOS update file until you get a readable binary file that UEFITool can use. Once opened, open the Find window and search for the text "Aperture Size". Double click the first match from the log at the bottom of the window. Right-click the highlighted section and "Extract as-is".

ifrextract
With the extracted image section, pass the filename to ifrextract:

Determine hidden section locations
In the setup.txt file, search for the "Aperture Size" option.

In this example, the offset is 0x44, the VarStoreId is 0x2 and the aperture size values can be one of 0x0, 0x1, 0x3, 0x7, and 0xF.

To find out the name of the VarStore:

In this case, VarStoreId: 0x2 has the name SaSetup.

Set UEFI hidden variable with modGRUBshell
Download or compile the modified GRUB UEFI shell that has the ability to edit hidden settings, and add it to your UEFI bootloader (e.g. efibootmgr).

https://github.com/datasone/grub-mod-setup_var

Reboot into the shell.

In the shell, run the command, replacing your values:

Reboot, then re-verify the aperture size from the OS.