Skip to content

dziny/OSX_GVT-D

 
 

Repository files navigation

OSX GVT-D

Guide to pass iGPU to MacOS KVM guest.

Prerequisites

  • Working MacOS EFI.

Procedure

1. Fetch necessary files from i915ovmfPkg repo.

2. Configure OpenCore.

  • Replace working OpenCore EFI to OpenCore-Catalina directory.

  • Build it:

    ./opencore-rebuild.sh
  • Place BaseSystem.img and mac_hdd_ng.img to root of this repo.

3. Prepare iGPU for passthrough

  • Grab PCI ID:

    lspci -D -nn
  • Find your iGPU PCI ID and place it inside boot.sh.

  • Boot it:

    # This script will unbind iGPU from the host and make it ready for passthrough.
    # After that it will run `opencore-boot-pt.sh` which is runs `qemu` command to boot OSX.
    # On shutdown it will rebind the iGPU to the host.
    
    # TIP: Running this on ssh session will helps us a lot to debug the issue.
    sudo ./boot.sh

Notes

  • During iGPU passthrough qemu will write this,
    qemu-system-x86_64: -device vfio-pci,host=0000:00:02.0,id=hostdev0,bus=pcie.0,addr=0x2,romfile=i915ovmf.rom: IGD device 0000:00:02.0 cannot support legacy mode due to existing devices at address 1f.0
    
    but ignore that warning.
  • We just need to make sure that iGPU placed by Qemu should match the location defined in config.plist, If this thing is correct you will be good to go!!

What is working

  • QE/CI.!!

Known issues & Fixes

  1. Chrome / Electron based applications causes freeze (GPU hang/reset) or crashes the guest.

Credits

About

Guide to pass iGPU to MacOS KVM guest.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 49.8%
  • C++ 46.8%
  • Shell 2.7%
  • Other 0.7%