Message ID | 20240928085727.56883-1-phil@philjordan.eu (mailing list archive) |
---|---|
Headers | show |
Series | macOS PV Graphics and new vmapple machine type | expand |
Phil Dennis-Jordan <phil@philjordan.eu> writes: > (Apologies to anyone who has received more than one version of this > series of emails; my git-send-email was misconfigured and this is > a new attempt.) > > This patch set introduces a new ARM and macOS HVF specific machine type > called "vmapple", as well as a family of display devices based on the > ParavirtualizedGraphics.framework in macOS. One of the display adapter > variants, apple-gfx-vmapple, is required for the new machine type, while > apple-gfx-pci can be used to enable 3D graphics acceleration with x86-64 > macOS guest OSes. > <snip> > > There are currently a few limitations to this which aren't intrinsic, > just imperfect emulation of the VZF, but it's good enough to be just > about usable for some purposes: > > * macOS 12 guests only. Versions 13+ currently fail during early boot. > * macOS 11+ arm64 hosts only, with hvf accel. (Perhaps some differences > between Apple M series CPUs and TCG's aarch64 implementation? macOS > hosts only because ParavirtualizedGraphics.framework is a black box > implementing most of the logic behind the apple-gfx device.) We don't currently have TCG CPU models for the Apple Silicon processors. They are not too hard to add (basically setting the correct ID register bits, c.f. aarch64_neoverse_n1_initfn for an example). However that would only cover Aarch64 architectural features. We do no modelling of the extra instructions that Apple added (although in theory that should only be run in Apples own ML libraries).
On Thu, 3 Oct 2024 at 10:06, Alex Bennée <alex.bennee@linaro.org> wrote: > > > There are currently a few limitations to this which aren't intrinsic, > > just imperfect emulation of the VZF, but it's good enough to be just > > about usable for some purposes: > > > > * macOS 12 guests only. Versions 13+ currently fail during early boot. > > * macOS 11+ arm64 hosts only, with hvf accel. (Perhaps some differences > > between Apple M series CPUs and TCG's aarch64 implementation? macOS > > hosts only because ParavirtualizedGraphics.framework is a black box > > implementing most of the logic behind the apple-gfx device.) > > We don't currently have TCG CPU models for the Apple Silicon processors. > They are not too hard to add (basically setting the correct ID register > bits, c.f. aarch64_neoverse_n1_initfn for an example). However that > would only cover Aarch64 architectural features. We do no modelling of > the extra instructions that Apple added (although in theory that should > only be run in Apples own ML libraries). > This really isn't my area of expertise, and I don't see myself attempting to make it work with TCG. Given that the OS only boots with the PV graphics device, you can only really use this machine type on a macOS host, so there aren't many reasons to use TCG over HVF. I suppose it might make debugging the myriad other rough edges easier!