Request: new MacOS paravirtual graphics support from Qemu 10?
Qemu 10 is released and according to Phoronix ships with it: “QEMU 10.0 graphics code added new "apple-gfx-pci" and "apple-gfx-mmio" devices to use the macOS host's para-virtualized graphics framework to provide accelerated graphics to macOS guests. The apple-gfx-pci is intended for x86_64 guests while apple-gfx-mmio is for AArch64 macOS.”
May UTM backport it to current Qemu used or update directly to Qemu 10? Thanks..
macOS virtual machines in UTM currently use the Apple Virtualization framework which has had accelerated graphics on arm64/Apple Silicon hosts for a while, and the implementation is more complete and more performant that the nascent QEMU implementation.
https://developer.apple.com/documentation/paravirtualizedgraphics
Is there a specific usecase that you have for using QEMU instead of HVF/AVF for macOS guests on macOS hosts?
not really.. just searching Qemu 10 release notes for MacOS changes that could get used by UTM.. but not any usecase.. just keep open. in case implemented in the future?
macOS virtual machines in UTM currently use the Apple Virtualization framework which has had accelerated graphics on arm64/Apple Silicon hosts for a while, and the implementation is more complete and more performant that the nascent QEMU implementation.
https://developer.apple.com/documentation/paravirtualizedgraphics
Is there a specific usecase that you have for using QEMU instead of HVF/AVF for macOS guests on macOS hosts?
Is the Apple Virtualization framework used also for emulated VMs, like a x86-64 one on Apple Silicon? Accelerated graphics would be useful also in that case.
Is the Apple Virtualization framework used also for emulated VMs, like a x86-64 one on Apple Silicon? Accelerated graphics would be useful also in that case.
No. QEMU is used as the backend for cross-platform VMs.
Would this feature work for what you're asking about?
Short answer: very maybe, probably not.
Longer answer: Keep in mind that this is specifically for macOS guests and hosts only. I'm not clear if the paravirt drivers work from a macOS x64 guest to a macOS arm host, but since this is all backed by the platform Virtualization framework and that framework doesn't support cross-platform VMs, it seems unlikely.
QEMU may develop this in the future but as it stands I don't believe this feature works that way, and without someone writing a QEMU Apple paravirt graphics driver for both Linux and Windows, it will never work there.
Is the Apple Virtualization framework used also for emulated VMs, like a x86-64 one on Apple Silicon? Accelerated graphics would be useful also in that case.
No. QEMU is used as the backend for cross-platform VMs.
Would this feature work for what you're asking about?
Short answer: very maybe, probably not.
Longer answer: Keep in mind that this is specifically for macOS guests and hosts only. I'm not clear if the paravirt drivers work from a macOS x64 guest to a macOS arm host, but since this is all backed by the platform Virtualization framework and that framework doesn't support cross-platform VMs, it seems unlikely.
QEMU may develop this in the future but as it stands I don't believe this feature works that way, and without someone writing a QEMU Apple paravirt graphics driver for both Linux and Windows, it will never work there.
Ok, thank you for the explanation. Also the new QEMU feature would not work with linux, since they are specific to macOS guests.
Following up on this, QEMU does support additional features such as debugging, etc, that could potentially make it a useful addition to UTM.
https://x.com/lauriewired/status/1916544677689335818
Yes this will be picked up when we update QEMU
unfortunately patch "qemu: enable vmapple for macOS" has been reverted.. https://github.com/utmapp/UTM/commit/a3e3efb93e7856c95a9e2fc483e60179023adaa8
EDIT: @osy maybe reopen the issue in the meanwhile?
apple-gfx-pci is still available and is the only useful thing from that patch (vmapple works better in Apple virtualization anyways)