While I love that this is open source and will certainly look into the details. It might be interesting to know that there's already a commercial product out as well using the native Hypervisor Framework.
Maybe more as one, but I am only aware about Veertu from Ravello systems.
Thanks for the tip; I'm downloading CentOS into Veertu now. I've been looking for a way to set up some VMs for development without letting VirtualBox onto my system...
I wonder is this opens the door to PCI passthrough in order for the guest system to directly access the GPU.
That is the turning point in all this. No more bootcamp to windows to play games and no more hassle configuring CUDA in OSX, you can just use it from a Linux VM and have all your development system there.
No, Hypervisor.framework will not help with this use case. It is a replacement for the kernel extensions that are currently provided by VMWare/Parallels/VirtualBox to expose the Intel VT-x feature of the CPU.
You would need a way to stop the official kernel extensions from initializing the PCIe device. Then Apple would need to offer a way to map address range and deliver interrupts from the hardware to a process.
I hope in the near future Apple will release an API for GPU virtualization. In fact Intel Iris Pro devices already support GVT-d. The problem is that Iris Pro is only used in the expensive Macbook models, the cheaper one come with regular Iris that don't have hardware support for it
Although if GVT-d gives the GPU fully over to the VM, which GPU will OS X itself be using? In the high-end 15" MBP, I suppose OS X could switch to the discrete GPU and let the VM use Iris Pro, but it's not a great solution and would only work on (the fairly small number of) dual-GPU Macs.
Actually gpu virtualization works quite similar to cpu. You don't pass a cpu core exclusively to a VM rather the cpu itself maintains independent contexts: for the host and each VM. When a CPU runs a VM it just switches the context. So is the GPU. You don't need two GPUs to make it work.
[0] https://github.com/mist64/xhyve