AppleSilicon/qemu/linux-user
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
..
aarch64 orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
alpha orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
arm orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
generic orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
hexagon orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
hppa orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
i386 orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
include orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
loongarch64 orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
m68k orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
microblaze orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
mips orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
mips64 orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
or1k orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
ppc orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
riscv orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
s390x orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
sh4 orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
sparc orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
x86_64 orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
xtensa orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
elfload.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
errnos.c.inc orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
exit.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
fd-trans.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
fd-trans.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
flat.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
flatload.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
gen-vdso-elfn.c.inc orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
gen-vdso.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
ioctls.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
linux_loop.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
linuxload.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
loader.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
main.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
mmap.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
plugin-api.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
qemu.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
semihost.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
signal-common.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
signal.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
strace.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
strace.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
strace.list orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
syscall.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
syscall_defs.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
syscall_types.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
thunk.c 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
uaccess.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
uname.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
uname.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
user-internals.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
user-mmap.h orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00
vm86.c orchard: macOS on QEMU, on a Linux host 2026-09-20 00:53:26 +03:00