Add optional Intel iGPU (GVT-g) passthrough via GVT_* env vars - #925
Open
Vault042 wants to merge 2 commits into
Open
Add optional Intel iGPU (GVT-g) passthrough via GVT_* env vars#925Vault042 wants to merge 2 commits into
Vault042 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds first-class, opt-in support for passing an Intel integrated GPU into the VM using GVT-g (mediated GPU virtualization), which is the only GPU option on laptops whose iGPU is also driving the host display (full-device passthrough is not possible there).
Changes
Dockerfile (the generated
Launch.sh):GVT_MDEV_UUID,GVT_PCI_ADDR(default06.0),GVT_DISPLAY(defaultoff),GVT_IGD_OPREGION,GVT_ROMFILE.GVT_MDEV_UUIDis set,Launch.shappends:-device vfio-pci,sysfsdev=/sys/bus/mdev/devices/<uuid>,addr=<addr>,display=<display>[,x-igd-opregion=on][,romfile=<rom>]README: new "Intel iGPU passthrough (GVT-g)" section with host setup, a full
docker runexample, the env var table, and caveats.Verified
Tested end-to-end on an UHD 620 laptop (
8086:5917): macOS enumerates the vGPU, boots, and the i915ovmf ROM gives a UEFI boot display with the QEMU 9 shipped in these images. Known limitation (documented in the README): no QE/CI acceleration on mediated GPUs — upstream issue acidanthera/bugtracker#1914.Note for newer host QEMU (>= 10/11):
GVT_IGD_OPREGION/GVT_ROMFILEshould be left empty there (OVMF can hang); the plain device still enumerates in macOS.Related: #133. Companion walkthrough repo: https://github.com/Vault042/Docker-OSX-GVT-g