Skip to content

XNU as a loadable kernel module inside Linux (macOS personality for arm64 Linux)

C

xnulinux.service: re-enable GPU=auto by default

Heyang Zhou9fb9536e2a28
diff --git a/README.md b/README.md
index e7c9c92..b674256 100644
--- a/README.md
+++ b/README.md
@@ -62,8 +62,8 @@ Working, on an Apple Silicon Mac running an arm64 Linux VM (krunkit) with 1 to 6
Calculator, TextEdit, System Settings, Spotlight and a disk walk) finishes with no panic and no crash report.
- Runs as a systemd service: started at boot, stopped cleanly with the VM, restarted after a hosted-kernel panic, each
run's log kept in `/var/log/xnulinux/`.
-- The GPU bridge gives hosted apps the host GPU (`Virtio-GPU Venus (Apple M5 Max)`); it is off by default
- (`GPU=off`) while an occasional hang of the whole VM with it on is investigated.
+- The GPU bridge gives hosted apps the host GPU (`Virtio-GPU Venus (Apple M5 Max)`) and is enabled by default
+ (`GPU=auto`) when a Linux render node is present, falling back to CPU rendering (`GPU=off`) otherwise.
What is still a stopgap is listed in [`docs/production.md`](docs/production.md). Notably: the OS cryptex is merged into
the system volume, AMFI is patched and SIP relaxed, and memory access is slower than a native VM (4K pages vs 16K).
diff --git a/scripts/install-service.sh b/scripts/install-service.sh
index 7c0dc73..b6efa01 100755
--- a/scripts/install-service.sh
+++ b/scripts/install-service.sh
@@ -14,9 +14,7 @@ U=$(id -un)
CPUS=${CPUS:-2} # its CPUs (the Linux CPUs from 0 up; Linux keeps the rest and its device interrupts)
RAM_MB=${RAM_MB:-7900} # its memory, within fki's carve-out
#DISK=/var/tmp/mac.img
-# The GPU bridge (virtio-gpu Venus to the host GPU under krunkit) hangs the whole VM in about one boot of six
-# (all vCPUs stuck in krunkit, no guest output; 0 of 8 with it off): CPU rendering until that is fixed
-GPU=${GPU:-off} # auto: the host GPU when the VM has a render node
+GPU=${GPU:-auto} # auto: the host GPU when the VM has a render node; off: CPU rendering only
#XNU_ARGS="model=VirtualMac2,1"
#BOOTARGS="amfi_get_out_of_my_way=1 lp-sip0=2050"
CONF