Add M1 Hypervisor Support for QEMU Port?

Sriranga Veeraraghavan sriranga at
Thu Oct 21 03:06:52 UTC 2021


[I’m not sure if macports-users is the correct email list to ask this question, so if not, apologies in advance.]

It seems like there is an unofficial patch to QEMU v. 6.1.0 that enables MacOSX hypervisor support for ARM64 VMs under QEMU:

Homebrew appears to apply this to their version of QEMU 6.1.0:

See lines 49-54:

    if Hardware::CPU.arm?
        patch do
            url "“
            sha256 “5b9c9779374839ce6ade1b60d1377c3fc118bc43e8482d0d3efa64383e11b6d3"

Is there a way to add an optional variant to the QEMU Portfile that would apply this patch?

I looked through the Portfile for QEMU, but I’m not sufficiently familiar with the way that variants work to figure out how to implement a variant that applies a patch only when it is selected on and only when running on a supported architecture.

If someone can point me to an example of a Portfile where this might already be implemented, I’d be happy to try and add support for this to the QEMU Portfile.



More information about the macports-users mailing list