AppleSilicon/qemu/migration
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Youssef 26710d37c7 orchard: macOS on QEMU, on a Linux host
Boots an arm64 macOS guest on QEMU/TCG on Linux through the genuine Apple
chain -- AVPBooter -> iBootStage1 -> iBootStage2 -> stock XNU -- and renders
its desktop on the host's Vulkan.

QEMU (1044 lines over 18 files, 8 new):

  * the `apple-vm` machine: Apple-style timer-on-FIQ wiring, the paravirtual
    GPU device, a PAC master key installed across CPUs, and GICv2m's
    `macos-compat` bit, without which macOS will not use the MSI frame;
  * `bdif` NVRAM block writes. Upstream drops them, so a guest could never
    persist a boot variable and every install phase repeated forever;
  * `cfg`'s guest-visible random seed at its fixed offset;
  * Apple pointer authentication under TCG: the register definitions come
    from ChefKissInc/Inferno, the per-core key snapshot and the PSCI CPU_ON
    key inheritance (restricted to a kernel caller by testing that its pc is
    in the TTBR1 half) are ours. Without them secondaries run keyless and the
    first cross-core authentication recurses through its own panic path;
  * portability work upstream has not needed before: CONFIG_VMAPPLE was gated
    on HVF and shipped off, hw/vmapple/aes.c has a VLA that only compiled
    under clang, and the architectural op1-to-minimum-EL assertion rejects
    Apple's IMPDEF registers.

The GPU is steelbrain/reims-vgpu, carried as a submodule pinned to the commit
this was tested against; the two changes it needs are in patches/reims-vgpu/.
The AVPBooter patch is NyanSatan's, from Virtual-iBoot-Fun.

Nothing Apple ships is in this repository. The macOS image is fetched from a
public tart image, and Apple's VM firmware is extracted from that image, where
Virtualization.framework carries it -- so no Mac is involved in the setup.

Measured on the reference host: desktop in 75 s at 12 vCPUs and 10 GB.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Youssef <soosef.youssef@gmail.com>
2026-09-20 00:53:26 +03:00
..
block-active.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
block-dirty-bitmap.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
channel-block.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
channel-block.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
channel.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
channel.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
colo-failover.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
colo-stubs.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
colo.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
cpr-exec.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
cpr-transfer.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
cpr.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
cpu-throttle.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
dirtyrate.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
dirtyrate.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
exec.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
exec.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
fd.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
fd.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
file.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
file.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
global_state.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
meson.build orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
migration-hmp-cmds.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
migration-stats.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
migration-stats.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
migration.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
migration.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-colo.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-colo.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-device-state.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-nocomp.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-qatzip.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-qpl.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-uadk.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-zero-page.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-zlib.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd-zstd.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
multifd.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
options.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
options.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
page_cache.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
page_cache.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
postcopy-ram.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
postcopy-ram.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
qemu-file.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
qemu-file.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
ram.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
ram.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
rdma.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
rdma.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
savevm.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
savevm.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
socket.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
socket.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
tls.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
tls.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
trace-events orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
trace.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
vfio-stub.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
vfio.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
vmstate-types.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
vmstate.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
xbzrle.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
xbzrle.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
yank_functions.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
yank_functions.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00