reims-ctl create --disk-mode copy ran `cp --reflink=auto`, which falls back to
a full copy without a word, and said "a reflink or clone where the file system
can" either way. Where the disk and the VM's directory are on two file systems,
or on one that makes no reflinks (ext4, tmpfs), a user sat through a copy of
the whole disk, tens of gigabytes, with nothing said about it.
A copy is now tried as a reflink (FICLONE on Linux, clonefile on a Mac), and
only then made in full by reims-ctl itself, blocks of zeros left holes as
`cp --sparse=always` left them. A full copy of more than 1 GB says first that
it is one, with its size and why: the two file systems, by type, or the one
that makes none, or the error its file system gave; then how far it is, each
percent at most once a second, as reims-util's downloads do, in the command's
output and in the interface's step. The copy is the image's bytes and a file
of its own, as before. The copies of a given OpenCore image and its OVMF go
the same way, and at a few megabytes say nothing.
The ledger's case, boot 6285 on um790 (174 s), was no full copy: between its
two directories, on one btrfs subvolume, the 57.9 GB disk reflinks in 0.12 s
(measured 11-08), and its job peaked at 10.8 of 22 GiB, too little for 54 GiB
through its page cache. That create made a new OpenCore image, whose OVMF
download ran at about 0.2 MB/s by its log, where the 1 s run on um870 copied
a given one.
A create that keeps the Mac of the image beside an existing disk would give a
copy of the disk of a VM reims-ctl has that VM's Mac: its serial number, MLB,
UUID and ROM, and its network card's address. The copy can run beside the VM,
and Apple's services know a Mac by those, so two VMs running as one Mac would
be one Mac to them. reims-ctl's network is QEMU's user mode alone, so the two
cards' one address clashes nowhere.
The create now gives such a copy a Mac of its own, as before, and says why;
its macOS opens Setup Assistant once, as on a new Mac. A disk given in place
keeps its Mac: the VM runs that VM's own macOS, and never beside it, since a
start on a disk another VM runs on is refused. A disk from a VM reims-ctl does
not have, whose image is beside it, keeps its Mac as before.
The lesson says what remains: a stop still powers off at its timeout while
Setup Assistant is up, since nothing the host sends without the guest's
password ends it.
A create given an existing disk of macOS and no OpenCore image made the VM an
image presenting a Mac of its own: a new serial number, MLB and UUID. The
disk's macOS then opened Setup Assistant at its first boot. While that is up,
macOS ignores Control-Option-Command-Power and the power button, so every
reims-ctl stop waited out its whole timeout and powered the VM off, which
risks the guest's disk.
A disk taken from another VM's directory sits beside the image it booted from,
as reims-ctl and reims-util leave them (opencore.qcow2, or opencore.img). The
create now reads the Mac that image presents and makes the VM's new image
present it too, with OVMF beside it. The VM's network card gets that Mac's ROM
unless a MAC is given, as a made image's ROM is its card's address. macOS then
sees no new Mac, opens no Setup Assistant and shuts down when asked. Where no
image sits beside the disk, the create makes a new Mac as before and says what
that does.
Measured with a macOS 26.7.2 disk on a Radeon 780M host. The create without
this change gave the VM UUID 95D24845, against the disk's own D507F3EA.
Setup Assistant (-MiniBuddyYes) was up, MiniBuddyLaunch was 1 for any host
and for the new host, and reims-ctl stop --timeout 180 powered the VM off at
181 s. With this change the VM presented D507F3EA and the disk's MAC, no Setup
Assistant came up, and the stop shut the guest down in 9 s. The disk's ByHost
preferences for D507F3EA hold MiniBuddyLaunch 0, and a new UUID has no ByHost
file, so loginwindow took the any-host 1 (docs/lessons.md).
docs/qemu.md now says how to build our configuration's bundle and check a
boot of it, what each check reads, what the first partial run on the M3 Max
showed (the early console, SSH, SIP and boot-args passing; the kext and Metal
checks failing as they must without kexts; KextsNotPlaced reported at once),
what a pass still needs, and what a TCG run on a Linux member needs: the node
holding the guests, its GPU, the library and our QEMU built there with the
device, the copies from the Mac, and RAM. README.md and architecture.md 11.5
list the new target and files.
The crate that holds the reims-graphics device's wire and transport now
carries the library's prefix, as reims-vgpu-video does: its directory is
crates/reims-vgpu-graphics, its package reims-vgpu-graphics, and its Rust
path and log target reims_vgpu_graphics. The guest's, the option ROM's and
Ambrosia's Makefiles include the wire header from the new directory, and the
prebuilt records name it there.
Nothing changes for the guest or the host. The device keeps its name
(reims-graphics, QEMU's reims-graphics-pci, PCI 1234:5247), and the wire
header keeps its file name and RGFX_ symbols. The C API header is unchanged,
and the prebuilt kexts and option ROM are byte-identical; only the records'
paths and source hashes move. A log filter names the crate's lines by its
new target (REIMS_VGPU_LOG=info,reims_vgpu_graphics=trace), a diagnostic.
The module is a new piece of the repository, so the layout, the
architecture and the checks a change to it needs name it: architecture
11.5 says what it does and how it is linked, and AGENTS.md gives a change
to it a build and an arm64 guest's boot on Ambrosia.
docs/qemu.md says how a qemu-system-aarch64 with the device is configured,
which make qemu does not build, how a guest boots with the module, and what
the boots measured on the M3 Max: the console on the device, SSH with SIP
enabled and no boot arguments, the BARs where the module put them, and the
HVF assertion that the device's scanout dirty log, before 7aee20f4, hits.
The Metal platform is gone (the commit before): AGENTS.md, README.md and the
docs now say the library carries out the guest's calls on the Vulkan
platform, on Linux and on a Mac over MoltenVK for development and tests;
that the display's shaders live in the Vulkan crate; that `cargo xtask
dist` writes target/dist-vulkan on every OS; and that the tests of the
Vulkan platform compare with Metal's recorded answers. architecture.md's
section 4.6 describes the answer layer and the macOS message layer in
place of the metal crate's. conventions.md keeps "core changes as little as
the Vulkan and Linux work allows" without its reason, the Metal product.
reims-vgpu drops Apple's paravirtualized GPU, so the README and docs/qemu.md
describe what is left: x86-64 macOS on Linux under KVM, on the reims-graphics
device our own kexts drive, with reims-ctl on Linux x86-64 hosts alone.
- README: the intro, getting started, the VM setup and day-to-day use for
that one path; the Metal-error-mode step, the arm64 section and the Mac
install are gone, and arm64 guests are not built now and come back with
Ambrosia, our own arm64 firmware. The environment table keeps the
variables our device's path reads; the layout and the build list are
rewritten for the tree as it is.
- docs/qemu.md: make qemu builds qemu-system-x86_64 with --enable-reims-vgpu;
the vendor/qemu table lists the reims-graphics device's commits, with
vmapple's kept unbuilt; the sections on apple-gfx, its windows, isolated
tasks, the dirty source, the IOSurface, VideoToolbox and M2 scaler
devices, Metal's error mode, App Nap, WebGPU, thumbnails, displays wider
than 2048 pixels and the vmapple runs are gone. The Linux host and x86-64
guest sections stay, under headings of their own, without what only
apple-gfx did.
Since x86-64 VMs moved to reims-vgpu's own GPU device by default, a VM whose
settings name no graphics, as every VM saved before the switch, ran that device
whatever its macOS. Its drivers, the guest kexts reims-ctl puts in the OpenCore
image, load only on Darwin 25.4 to 25.99.99, macOS 26.4 and later, so an older
guest booted with no GPU, and nothing said so.
reims-ctl now reads which macOS a VM holds: from the disk, through the APFS
container's Preboot volume, whose <volume group UUID>/System/Library/
CoreServices/SystemVersion.plist names the release and build (macos.rs, a
read-only reader of what macOS writes there: the latest checkpoint, the object
maps, the Preboot volume's tree); or from the offline installer reims-util
downloads, whose build it now keeps, or the online one's macOS number. The
build's number and letter give the Darwin version, compared with the set's
bounds.
- create decides the graphics from the download's or the given disk's macOS
and saves it by name, and makes the OpenCore image for it: an older macOS
gets apple-gfx and an image without the kexts, and create says why. A
--graphics reims-vgpu given for an older macOS is kept, and create says the
guest has no driver for it.
- A VM whose settings name no graphics, or whose macOS isn't known at create
(a new disk with an installer of the user's), gets them at the first start
that finds macOS on its disk, saved by name and said: apple-gfx on an older
macOS, reims-vgpu on 26.4 and later. The TUI's start says it in its status.
- A start of a VM set to reims-vgpu on an older macOS warns, naming
reims-ctl set NAME --graphics apple-gfx; a disk reims-ctl can't read (a qcow2
with a backing file) warns likewise where the VM runs the default.
- command, show and list show the graphics a start would save.
- The TUI's edit form keeps none where the choice is left at the default, and
its create form passes the default as none given, so both follow the macOS.
- qcow2 images with an external data file or extended L2 entries are refused
rather than misread.
The help texts and README say the default is reims-vgpu on macOS 26.4 and
later and apple-gfx on an older macOS.
reims-ctl told every x86-64 VM to set METAL_ERROR_MODE once macOS is installed:
in its install steps, after create, after an eject and in the TUI's create
message. That was measured on apple-gfx, whose guests' icon service ends as it
starts without it. On reims-vgpu's own device, the x86-64 default, a macOS
26.7.2 guest without the key comes up with its Dock and icon services running
and no crash report (a Radeon 780M host, 11-07), so users of the default were
sent through Recovery for nothing. runtime::needs_error_mode now gates every
one of those messages on apple-gfx, and README step 3 and docs/qemu.md say
which device needs it.
The owner asked for a nightly toolchain with rustc's parallel front end on.
rust-toolchain.toml pins nightly-2026-11-03 (rustc 1.101.0-nightly 1c3a65069),
the one metal2vulkan's builds moved to the same day, so the host runs one
rustc, clippy and rustfmt for both. .cargo/config.toml turns on Cargo's
profile rustflags and gives dev and release `-Zthreads=0`, one front-end
thread per core; test, debugging and checked inherit it, and it adds to
RUSTFLAGS rather than giving way to it (checked with `cargo rustc -v`).
What the nightly asks of the tree, no behaviour changed:
- rustfmt now formats inside the death tests' macro bodies;
- `fetch_update` is deprecated as `try_update`, the same call;
- clippy's redundant-closure, needless-range-loop and NonZero-divisor
lints;
- the fuzz harness declares `write` with C's types, which the new lint on
runtime symbols checks;
- the three Vulkan tests that unwrap a command buffer take the library's
recursion limit of 256: rustc now warns, as a coming hard error, that the
Send and Sync walk of their result overflows the default 128.
This reverts 4defad9bd and 3fc74f33a. reims-util 8a8a852's video drivers no
longer wait in their start for the IOSurface mapper, which macOS 26's installer
and Recovery leave unbound, so Recovery starts with the video devices present.
reims-ctl again gives an x86-64 VM both video devices whether an installer is
attached or not, and the README no longer has users switch video acceleration
off to boot Recovery.
Checked on msi-laptop with the new executables in reims-util's image, by the
reims-vgpu-video agent: the installer's Recovery 26.6.2 with the video devices
attached reached Disk Utility, an installed disk's Recovery 26.6.1 reached its
menu, and a full boot still used both devices.
Recovery hangs while it starts up on an x86-64 macOS 26 VM with the video
devices: the ported video drivers wait for the IOSurface mapper, which the GPU
port leaves unbound there. reims-ctl now leaves the devices out while an
installer is attached, but setting Metal's error mode boots Recovery from the
installed disk, after the installer is ejected. Checked on msi-laptop: the
installed disk's Recovery 26.6.1 hung at the Apple logo with the devices, as the
installer's 26.6.2 Recovery did.
reims-ctl and the installer checked /dev/udmabuf only for AMD GPUs, and told
every host to raise vm.max_map_count by a rule of 64 mappings per MiB. But
the library's own views of the guest's memory need udmabuf on every GPU:
without it a view of an x86-64 guest's pages takes a mapping per 4 KiB page,
and an idle 3840x2160 desktop's surfaces alone (193-199 MiB, about 50k
mappings) pass the stock 65,530's budget; Safari at 4K passes even
1,048,576. On Debian 12 and Ubuntu 22.04/24.04 a user outside kvm cannot open
it, and on systemd 257+ a desktop session's access does not reach ssh.
So reims-ctl warns on every Linux host where /dev/udmabuf does not open,
naming the group that owns the node (or what to do where root alone may open
it, or the node or its module is missing), and says the group is needed over
ssh; doctor checks it too. The installer offers to add the user to that group
with sudo usermod, as it offers packages. vm.max_map_count is now only a
speed-up on NVIDIA, where udmabuf opens: a mapping per 4 KiB page past the
library's 16,384 and 8,192, past which buffers are copied. Doctor and the
installer name the value as information, by one rule, and the start no
longer warns of it. The README says the same.
Landed on development at the owner's word with no checks: reims-ctl's tests,
rustfmt and clippy, and the install and VM boot on each Linux host that
AGENTS.md asks of install-ctl.sh, were not run.
vmapple's AES engine runs the guest's commands on QEMU's ciphers, and QEMU
gets those from a crypto library: gnutls, nettle or libgcrypt. Neither
install-ctl.sh nor `make qemu` asked for one, so whether QEMU had AES depended
on what else the host's Homebrew held. Built without one, QEMU falls back to a
stub that refuses every cipher. A macOS guest then hangs for good as it mounts
its root volume: its first AES DATA command fails and stays at the head of the
engine's FIFO, with every command after it. Serial output ends at "End of
iBootStage2", and the display never gets a mode. That was the hang on the
Scaleway M2 Pro Macs on macOS 27.2, whose Homebrew had none of the three; the
M3 Max's QEMU links gnutls.
- vendor/qemu moves to c7a4f070 on steelbrain/reims-vgpu. The AES engine
checks at realize that AES-128, -192 and -256 work in ECB and CBC mode. A
QEMU without them exits at start, saying what the build lacks, instead of
hanging the guest.
- install-ctl.sh installs Homebrew's gnutls with the other formulas on macOS.
Both it and `make qemu` configure QEMU with --enable-gnutls, so configure
stops where gnutls is missing. An install's next update reconfigures QEMU,
since its configure options changed.
- docs/qemu.md says how the hang was found and told apart from macOS 27.2,
and README.md lists gnutls among QEMU's dependencies.
This is development-performance's 9d4f0a635, f8ef804f4 and 79225f10f
squashed. The QEMU change is its f1c10385 alone, picked onto development's
QEMU, without the dirty-source commits under it there.
scripts/ mixed the one script a person installing reims-ctl runs,
install-ctl.sh, with eight that only developing the project runs: the worktree
and build environment, the GPU locks, the VM boot and tour drivers, the window
walk and the IOSurface qtest. Those move to scripts/internal, so scripts/ holds
what users run. run_vmapple.sh, walk_window_macos.sh and vm_drive.py find the
repository from their own path, one level deeper now; every reference in the
docs, the Makefile, the video crates' tools and the code's comments follows.
On a Mac the installer built QEMU on the Metal platform alone, and running a
VM on the Vulkan platform (on MoltenVK) took a QEMU configured by hand.
GPU_ARM=vulkan now builds the library with --platform vulkan and QEMU on it,
in a build directory of its own, and installs it as qemu/<build>-vulkan;
GPU_ARM=metal goes back. Unset, it keeps the installed QEMU's arm, read from
that suffix, so reims-ctl update does not switch it. The Vulkan arm also
checks for Homebrew's vulkan-loader and molten-vk, which metal2vulkan opens.
Linux builds as before: vulkan is its only arm.
Each worktree's check compiled everything again with full debuginfo and
incremental caches no rebuild used. The dev profile keeps line tables for
the workspace and none for its dependencies, the check builds without
incremental caches, and builds go through kache where it is installed, so
a worktree's first build reuses what another tree built, build scripts
included. Tests read the tree's paths at run time, so a build is the same
in every tree.
scripts/new-worktree.sh makes a worktree from clones of the main checkout's
suite files, and AGENTS.md says a profiling run removes its traces.
Source: 53a4a8edd b568f382e 0c7a0eabc 72c24f74b 10051ba78 8f415697a 73d557f71
bde4220b6 46c7c6b23
The suite's host has been the M3 Max on macOS 27.0.1 (26A434) since
2026-10-13, and every behaviour change since was recorded there alone. The
1361 expected files keyed AppleM3Max-40c-25G229 (macOS 26.7), last written
on 2026-10-11, describe a library that no longer exists, and no host runs
25G229 to record them again, so they go. A host on another build records
its files with make bless, as after any OS update.
README.md, docs/testing.md and tests/suite/README.md name 26A434's key, and
testing.md says which build each scenario's measurements were made on.
Nothing the suite runs or compares on this host changes.
Source: f958e21c6
The screenshots showed macOS 13 Ventura, which is no longer what most
people run. Both now show macOS 26 Tahoe's About This Mac: the arm64
guest in its window on the M3 Max, one guest pixel per screen pixel, and
the x86-64 guest in its window on the Linux laptop, with the VM's serial
number painted out.
A click into the image captured only the keyboard: the host's pointer could
still leave the window for the bars, the title bar or another app, where a
click meant for the guest's edge landed on the host instead. Capture now takes
the pointer too, and never one without the other: while captured, the host's
pointer is held over the image, and ⌃⌥⌘ (Ctrl+Alt+Super on Linux), Release
Input, losing focus or closing frees both.
On AppKit's window the hold is NSWindow's mouseConfinementRect, the property
SDL3 confines its macOS windows with, which AppKit leaves out of its headers;
a window that does not answer it leaves the pointer free and logs one line.
On SDL's windows it is SDL's mouse rect, rounded out to whole points so the
image's last row and column stay in reach, which SDL keeps with the
compositor's pointer constraints on Wayland, XFixes barriers on X11 and the
same property on macOS; where SDL has no mouse rect, its mouse grab holds the
pointer in the whole window. In native full screen an image that reaches the
screen's top or bottom edge takes the pointer there, where macOS slides its
own menu bar or Dock in.
features.md, README.md, docs/api.md, docs/architecture.md and the module docs
say so. The macOS walk releases capture wherever a step needs the pointer off
the image, captures before Finder takes focus in C4, and walks the hold at
each edge and corner (C2), at the window's edge (C2e), across Mission Control
(C2m), in full screen (C2f) and after a mode change (M4), which only a
person's own mouse shows: a warped pointer, or one moved by events posted at
the HID tap, is not held.
OpenCore's boot picker is now off for new VMs: reims-ctl moves to reims-util
796192b, which hides it by default, and the VM boots macOS's startup disk at
once. Recovery still needs the picker, so the edit screen (e) gains a Boot
selection toggle, showing what the VM's OpenCore image does, and
update-opencore gains --boot-selection[=true|false].
The image's config.plist is the one place the setting lives: a change
makes the VM a new OpenCore image presenting the same Mac, as
update-opencore does, so the VM must be stopped. update-opencore without
the flag carries the old image's setting over, so an existing VM keeps its
picker until it is switched off. The new image's picker is read back before
it replaces the old one: a reims-util that hides it only by default, an
older one among them, can't make an image whose picker differs from what
reims-ctl reports. The edit form makes the image before it changes the
installer, so a save retried after a failed renew doesn't convert a DMG
again.
The Metal error mode steps in README.md and in reims-ctl's warning now
start by turning the boot selection on.
A tester's new x86-64 macOS 26.6.2 install (RTX 5050 Laptop GPU host) came
up gray, with a menu bar and widgets but no Dock, and reims-ctl said nothing
on its first two boots. Its warning counts the library's "has an empty
entry" lines in QEMU's log, which only the library's warn level writes, and
with logs off, the default, reims-ctl unset REIMS_VGPU_LOG, so the library
wrote nothing.
- With logs off, a VM on reims-vgpu now runs the library with
REIMS_VGPU_LOG=warn,reims_vgpu_core::device::lifecycle=info: its warnings,
and the "device reset" lines the warning counts from, so it still clears
once the key is set from Recovery and the guest reboots in the same QEMU
run. QEMU's log already kept metal2vulkan's lines and the library's
relays with logs off. A VM on VMware SVGA still gets no library variables.
- The warning and README.md's step 3 name both looks a guest without the
key takes: its wallpaper with no menu bar or Dock, or a gray desktop with
a menu bar but no Dock.
- A bug report's system.txt has a "warnings" section after reims-ctl's
version: each warning reims-ctl gives the VM as the report is made, or
"none", so triage sees what the user was shown.
- README.md's Recovery commands are one line chained with &&, as the
warning's already are. The tester had typed them as the README said and
the key was not in effect: run line by line, a failed cd still lets
defaults write save the setting into Recovery's RAM disk, and reboot
hides the error. Chained, a failed step stops the line and the VM does
not restart. A fresh 26.6.2 install with the commands typed exactly came
up fully with 0 exec faults (msi-laptop's RTX 5080, c099dd5a4), as did a
26.6.1 guest on an RTX 3090.
Checked with cargo test, fmt and clippy in crates/reims-ctl; `reims-ctl
command` on a scratch q35 VM (logs off exports the filter above, logs on
its level); and a report of a scratch VM whose QEMU log names three emptied
entries. No install or VM boot for the command: it changes only
REIMS_VGPU_LOG's value with logs off, and every logs-on boot already runs
the library with REIMS_VGPU_LOG=info, which writes all these lines and more.
LinuxThreads::spawn gave every thread it started a utilization floor of
1024, the display window's render and UI threads included, since they start
through it too. Linux also copies a thread's floor to the threads it starts.
So a FIFO thread that restarted an idle queue's worker, or a metal2vulkan
handler thread that did, left that worker with the full floor for its life.
Only FIFO threads are meant to ask for it. A boot on the RTX 5080 showed
the floor on the window, UI and cursor threads.
The window's threads now come from LinuxThreads::without_hints. Every
thread the library starts on Linux, other than a FIFO thread, resets its
floor to the kernel's default (sched_util_min -1) as it starts.
SCHED_FLAG_RESET_ON_FORK cannot do this: sched_setattr ignores the flag when
the request keeps the thread's policy, as the floor's request does
(kernel/sched/syscalls.c), and it would also reset a negative nice. A
cgroup's cpu.uclamp.min still applies after the reset. A floor the host set
on QEMU's own threads is not kept on ours.
The module doc now says what kernel/sched/fair.c does with the floor. On a
capacity-aware hybrid CPU (the 275HX under intel_pstate's active mode
included), a floor of 1024 fits only the highest-capacity CPUs, so the
991-capacity performance cores are a lesser fit. A wake still falls back to
an idle CPU, and the balancer only ever moves the thread to a CPU with more
capacity. Active-mode P-state selection loses only the clock boost, not the
placement. On the RTX 5080's boot, FIFO 1 ran on the performance cores only.
The FIFO thread's test now expects no floor on a kernel without
CONFIG_UCLAMP_TASK, which refuses the hint. The README now names make among
the Linux build's requirements, since jemalloc builds with configure and
make.
Nothing the guest or host observes changes. Checked: the hints and threads
tests on gem10, uclamp on; a_thread_started_from_a_fifo_thread_drops_its_floor
fails without the reset. Clippy for x86-64 Linux, and rustfmt.
An x86-64 VM's details warned that a display wider than 2048 pixels, or
resolution = "host", crashes its WindowServer. With ReimsVgpu.kext in its
OpenCore image and the host's real-extent check, macOS 26 runs such a display,
so the warning would steer people off a resolution that works; an image
without the kext now gets its own line (opencore.rs), which says how to
replace it.
docs/qemu.md's section says what fixes it and what was measured with the kext,
and the README no longer says there is no kext.
A new x86-64 VM needed an OpenCore image and an installer made by hand with
OSX-KVM or ULTMOS. reims-ctl now runs reims-util for both: pick a macOS
version (n in the interface, create --macos on the command line) and it
downloads the installer from Apple, makes the VM's OpenCore image with OVMF
and a Mac identity of its own, and makes the disk.
- create --macos VERSION downloads Apple's recovery image (about 1 GB), or
with --offline an installer of one release (13 to 20 GB). Installers are
kept in the data directory's installers for the next VM, one reims-util at
a time writes there, and a stopped download continues. The download comes
before the VM's directory, so stopping it leaves no VM half made, and
reims-util ends with reims-ctl on Linux. What create is given (a disk, an
installer, an OpenCore image and the OVMF beside it, reims-util itself) is
checked before the download and the disk's copy, and the VM list is read
again before the VM joins it, so VMs made or deleted during a download
stay as they are.
- --opencore is optional: without it reims-util makes the image, with the
VM's MAC as its ROM, and an iMacPro1,1 for macOS 10.13 and 10.14. An image
of the user's brings OVMF_CODE.fd and OVMF_VARS.fd beside it, as
reims-util writes them.
- The interface's form asks where macOS comes from, the version first; with
no name, the VM takes the version's, skipping names a VM or a leftover
directory has. A VM with an installer says in its details, and create
prints, how to install macOS from it; one made from a disk is reminded to
set Metal's error mode.
- A new disk needs an installer or a download: a VM of an empty disk and no
installer is refused.
- Every installer attaches as a read-only disk (snapshot=on), a DMG
converted to a raw image in the VM's directory, so the CD drive is gone: a
change of installer applies at the next start. vm.toml's installer_kind
is no longer written, and is ignored where an older vm.toml has it. A
missing installer says how to eject it.
- reims-ctl __record-install, which scripts/install-ctl.sh runs last,
installs reims-util at the commit reims_util.rs pins, so the update that
brings this reims-ctl installs it too, though it runs the script it
started with. doctor checks for it in place of the system's OVMF, and the
install no longer adds the ovmf or edk2-ovmf package.
- vm.max_map_count: a new VM's default of up to 16 GiB needs about 1.13
million mappings, more than the 1048576 suggested (CachyOS's stock
value). The README, the install script, doctor and the start warning
suggest 2097152, which covers 30 GiB, and check against what the VM, the
largest VM or a new one's default needs.
- Updating from the interface while a create runs says the restart stops
it, as quitting does.
Dropped, as reims-util's images leave nothing for them to cover:
- create --from-script and the interface's launch-script import, which read
OSX-KVM's and ULTMOS's QEMU scripts. A VM made from one keeps working; its
vm.toml names its own copies.
- The search for OVMF beside a user's OpenCore image in those projects'
layouts, QEMU's edk2 build and the distributions' packages, and
--firmware-code and --firmware-vars.
- create --disk-mode overlay: copy, a reflink where the file system can, or
in-place covers an existing disk. A VM made with an overlay keeps working.
- --cpu-model and --cpu-flags on create and set, and the edit form's CPU
fields: new VMs take Skylake-Client-noTSX-IBRS. vm.toml keeps cpu_model
and cpu_flags, so an older VM keeps its model; docs/qemu.md says how to
change it there.
- --installer's --iso and --cdrom aliases.
README, the help and the docs no longer point at OSX-KVM or ULTMOS. README
step 3 describes reims-util's OpenCore picker (5 seconds, which an arrow key
stops, measured on homelab-ms01), and architecture.md 11.4 counts its image
among those that keep AvoidRuntimeDefrag on.
RADV imports host memory as an amdgpu userptr, which Mesa asks for with
AMDGPU_GEM_USERPTR_ANONONLY, so the kernel refuses every page with a file
behind it. The guest's RAM and every view the library makes are memfd pages,
so on an AMD GPU a macOS guest died at its first no-copy buffer.
The runtime (metal2vulkan 11715e2a3f) now asks the caller for dma-bufs of
the pages wherever the pointer import is refused, on any driver. The library
answers with /dev/udmabuf: it resolves the range through the backing table,
gives the shared block of zeros' pieces a file of the import's own, cuts the
runs into chunks within udmabuf's limits as the host has them (1024 pieces
and 64 MiB by default, which no one is asked to raise) at the runtime's bind
granule, and pads several chunks to the granule. The runtime binds them
behind one sparse buffer, and asks again for a texture's own pages. Its own
memfds are sealed against shrinking, which udmabuf requires. A refusal names
its cause in the death line.
reims-ctl and the installer warn when a VM that would run on an AMD GPU
cannot open /dev/udmabuf (the kvm group's on Ubuntu), and reims-ctl's logs
show the device and its limits.
On the Radeon 780M (RADV of Mesa 26.0.8, udmabuf at its defaults) the guest
now cold-boots to its desktop, and Safari loads a page and quits: 5,119
dma-buf requests, none refused. NVIDIA, which imports the pointer, and macOS
are unchanged.
A beta tester's new x86-64 macOS 26 install showed only its wallpaper: no
menu bar, no Dock. The README's step was a command for the guest's Terminal,
which a new install never reaches. Without METAL_ERROR_MODE, iconservicesagent
ends as it starts, and the Dock and the menu bar wait on it with no timeout;
a guest that ran before has icon caches to draw from, a new install has none.
Reproduced on an RTX 3090 host with a macOS 26.6.1 guest on an overlay: with
the icon caches deleted and no key, only the wallpaper at 5 min, the Dock's
main thread in a synchronous XPC call to iconservicesagent. The key written
from Recovery brought the desktop back, once two traps were out of the way:
a defaults path with a glob that matches no file writes a literal path in
Recovery's RAM disk, and defaults leaves the file at mode 0600, which the
user's processes cannot read. The README now gives the Recovery steps,
checked as written, and the Dock cache step for an icon left blank;
docs/qemu.md records the measurements.
OSX-KVM's fetch-macOS-v2.py downloads BaseSystem.dmg, which users then had to
convert with dmg2img, a tool reims-ctl does not install. The QEMU reims-ctl
installs already has a dmg driver, so create, insert and the TUI now take a
DMG (a UDIF image, known by its koly trailer) and convert it with qemu-img
into installer.img in the VM's directory. The copy of a recovery image is
byte-identical to dmg2img's and took 10 s for 2.5 GiB.
It is converted rather than attached as it is: QEMU's dmg driver decompresses
a whole chunk for each read outside the last one, 2.5 ms per scattered 4 KiB
read against 0.05 ms from the raw copy.
The installer setting names the copy relative to the VM's directory, and a
change of installer or an eject deletes it; an installer used in place is
never deleted. The installed QEMU reads zlib DMGs, as the recovery image is;
for an LZFSE, bzip2 or LZMA one, the error says how to make a zlib copy.
An update pulled whatever branch the checkout had, so moving to the
development branch, or back to master, meant going into git by hand.
reims-ctl update --channel stable|development now checks out master or
development before the install script runs. A checkout that lacks the
branch fetches it and tracks the remote's, adding the branch to a
single-branch clone's refspecs so the pull can follow it. The checked-out
branch is the channel, so later updates stay on it. The switch comes
before the script starts, so the script that runs is the new branch's own.
doctor says which channel the checkout follows. The interface's update
dialog says it too, and offers a switch to the other channel beside
Update.
This reverts commit f6fcaf5f4. It shipped a refusal of AMD GPUs and a README
line saying they cannot run guests yet while the owner had still to decide
how the project answers AMD hosts (a dma-buf import of guest RAM through
udmabuf, or the refusal). The probe, measured on the UM780 (RADV refuses a
shared memfd page, NVIDIA and llvmpipe import it), stays in f6fcaf5f4 for
whichever way is chosen.
The beta notice and getting started read like a spec, and the notice framed the
repository as reims-ctl. reims-vgpu is the virtual GPU; QEMU and reims-ctl ship
alongside it. Say so, and say what a user brings and what was tested, in words
a person would use.
The README now speaks to people running VMs through reims-ctl. The repository
layout, the tests and the Rust library's crates, commands, profiles and
features move to docs/development.md, which the README's Developing section,
AGENTS.md and the docs that cited those sections now point to. The QEMU and VM
section is gone (docs/qemu.md covers it), as are History, whose tags AGENTS.md
now names itself, and the interoperability note under Legal.
Readers who run VMs reach the install steps right after the screenshots. The
pathways table follows getting started, the paragraph on what reims-vgpu
replaces opens Developing, and the call for contributors is gone.
A user's macOS 15 guest died on every boot on an AMD host (RX 7600 and
760M, RADV, Mesa 26.2.4) at the library's first import of guest RAM:
newBufferWithBytesNoCopy: refused with Unsupported { HostMemory,
NotRepresentable }. Guest RAM on Linux is a shared mapping of a memfd, and
libdrm's amdgpu_create_bo_from_user_mem asks the kernel for anonymous
memory only (AMDGPU_GEM_USERPTR_ANONONLY), which amdgpu refuses for any
mapping with a file behind it (read from libdrm's and the kernel's code;
metal2vulkan's host_memory.rs measured the refusal on RADV). No AMD GPU on
Linux can run a guest.
reims-ctl's Vulkan probe now asks each driver to import a page of a shared
memfd mapping through VK_EXT_external_memory_hosts, as the library does. A
start refuses a GPU that refused it, naming why and whether another GPU of
the host can run the guest, instead of booting into the death; reims-ctl
gpus, doctor, the bug report and the TUI mark such GPUs. A probe that
could not ask leaves the GPU as it was.
The project now serves people who run VMs through reims-ctl, not hosts linking
the library, so the notice speaks to them and no longer cites the C API.
The C API has largely stabilized and changes only by addition; what remains
is platform- and driver-specific differences. The alpha callout described a
research-quality project, which no longer fits.
The README written for libreims_vgpu opened with the library's internals and
read as a reference for its developers. The one before it (69a57dd69) led
with what the project is for, an alpha notice, screenshots, the host/guest
pathways and a step-by-step start, and was easier to come to cold.
Bring that layout back with this tree's facts: QEMU's apple-gfx devices on
the library's C API, reims-ctl as the way to make and boot VMs on each
pathway, the window's capture and release chords as features.md lists them,
the environment variables docs/api.md section 2 lists, and the dual license.
The developer sections (Requirements, Building, Dist, Features, History) stay,
after the user-facing ones, under the names AGENTS.md and the docs cite. The
screenshots come back from the same commit.
This repository now holds libreims_vgpu, a Rust library that is the host
side of the paravirtualized GPU macOS guests drive, in place of Apple's
ParavirtualizedGraphics.framework: the library and its C API
(reims_vgpu.h), the PCI device's option ROM, QEMU's apple-gfx on that API
(vendor/qemu), the behaviour-lock suite that drives the C API as QEMU
does, and reims-ctl, the VM manager users run. README.md says what it is
and how it is laid out, and AGENTS.md how to change it.
Every file of the earlier tree is replaced. vendor/qemu moves to the
steelbrain/reims-vgpu branch of the same public repository.
Replace the separate KDE and macOS helpers with one capture-app based path. Capture at native resolution, validate the PNG, and cap output at 720p or optional 1440p while preserving strict window selection and black-frame refusal.
Update probes and documentation to use the unified helper.
Validated with bash syntax checks, Python parsing, diff checks, and a live KDE capture at 3840x2290 downsampled to 1207x720.
The release chord existed only as source comments and a `pub const` nothing
read. An operator whose desktop shortcuts had just stopped working had no way
to learn the way out short of reading this crate — and reading it is something
you need a working desktop to do. A grab with an undiscoverable escape hatch is
a grab you cannot get out of.
Component: crates/reims-vgpu/src/host_window, README.
No guest-visible behavior changes: the recogniser, the state machine and the
capture mechanisms are untouched. This is what the operator is told, and where.
Three places, one source of truth:
- stderr, once, at the moment capture first engages — the instant the operator's
own shortcuts stop working.
- the always-on census line, which now reads
`window_capture_engaged mechanism=<m> release=Ctrl+Alt+Esc`.
- README, under the x86 boot instructions, with the per-host coverage table and
the note that the guest's own Cmd+Option+Esc is forwarded rather than caught.
Both runtime messages read `keyboard::UNGRAB_CHORD`, the constant the recogniser
is written against, rather than spelling the chord again.
`the_advertised_chord_is_the_one_that_releases` splits `UNGRAB_CHORD` on `+`,
maps each named part to an evdev code, drives the recogniser with exactly those
keys, and asserts the grab releases. It fails if the advertised string and the
recogniser ever disagree — the failure mode being an operator holding a captured
keyboard while following printed instructions that do not release it. A test
rather than a `const` assertion because the relation runs through a `match` on a
windowing type that cannot be evaluated in a `const`.
Verification: `host_window::keyboard` 15 tests (14 + the new one). Full
reims-vgpu suite serially on backend-vulkan,host-window: 2247 lib + 93
integration, 0 failed. `cargo fmt --all -- --check` clean. Clippy `-D warnings`
clean on all three required arms plus aarch64-apple-darwin/backend-vulkan,
host-window.
Not verified: no VM boot was run for this commit. The stderr line and the census
field are emitted from the same first-engage branch that boot 1 exercised, but
neither string has been read off a live boot, and capture does not arm in an
unattended boot because nothing focuses the window.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USFNnwBSxQBohnC19FZjLT
Touches both boot scripts (`vm/boot-x86.sh`, `vm/boot-arm64.sh`) and the arm64
snapshot helper. No Rust, no device or backend code.
A rail is one guest OS line. Rails are siblings under `vm/disks/rails/` (x86) and
`vm/guest/rails/` (arm64), each owning its own immutable snapshot history, and
`rails/current` names the one a bare boot gets:
<rails>/<rail>/snapshots/<label>/...
<rails>/<rail>/snapshots/current -> <label>
<rails>/current -> <rail>
Two coordinates select what boots — `--rail NAME` and `--snapshot LABEL`, each
with its own `current` — and neither repoints anything. Snapshots could not stay
flat once a second guest line existed: two lines share no history, so one
namespace makes `current` mean "whichever guest was captured last", which is how
a measurement gets attributed to the wrong OS. Captures land in the selected rail
and move only that rail's `current`; `rails/current` is never touched, so
capturing on one line cannot silently change what the next bare boot runs.
An unknown rail or a half-populated snapshot is an error in every boot class.
Falling through to the bootstrap path would boot the provisioned masters instead
— a different guest than the one asked for — and under capture would then repoint
`current` at it.
Capture is now `--capture`. A bare `--snapshot` still means capture, because that
is how every existing invocation in the docs and helper scripts spells it; with a
label it selects instead. `--list-rails` and `--list-snapshots` answer before
anything is built.
A snapshot may carry its own `OVMF_CODE.fd` (x86) and a rail its own `vm.json`
(arm64). A macOS release is installed under whatever OVMF build its installer
ran on, and the NVRAM in `OVMF_VARS.fd` only means anything to the code half that
wrote it — a split OVMF pair is a matched set. Likewise the ECID identifies the
machine a guest was personalized against, so a second provisioned guest is a
second vm.json rather than a second disk under the first one's identity. Both
override only when present; a single-guest tree behaves exactly as before.
An arm64 tree still holding `vm/guest/snapshots/` now refuses to boot and prints
the three-line move that fixes it. That history is someone's only copy of a
provisioned guest, and a boot script is the wrong thing to have rearranged it
silently.
Cleanups, each within one file rather than a shared one:
- boot-x86.sh: the kernel-panic report was written out twice — once in the poll
loop, once after QEMU exits on the panic reboot that `-action reboot=shutdown`
turns into an apparently clean exit. Same regex, excerpt, keep-dir, exit code,
and `basename` recomputed four times. Now `serial_has_panic` +
`report_panic_and_revert`, called from both.
- boot-arm64.sh: `--device NAME` and `--device=NAME` each carried a copy of the
accepted set and the error string; they now share `set_gfx_device`, matching
what boot-x86.sh already did.
- boot-arm64.sh: `cp -c … || cp …` at four call sites becomes one `clone_file`,
again matching boot-x86.sh.
Verified on the x86 pathway, Linux host, rail `macos-13` (the guest the previous
flat `current` pointed at, imported as a rail so the default boot is unchanged):
- `--testing --device reims-vgpu-pci` boots and the guest answers SSH as macOS
13.7.8 — the pre-change behavior of a bare boot, preserved.
- `--testing --device vmware-svga --rail macos-13` with TESTING_TIMEOUT=60 exits
124 through capture-then-revert and leaves no clone in the run dir, so the
testing loop still works with the panic refactor inside it.
- `--rail macos-11 --testing` reverts that rail and reaches the guest desktop.
- Refusals exercised against a scratch tree: unknown rail, unknown snapshot,
half-populated snapshot, `--rail ../etc`, unset default rail, and the pre-rail
migration notice.
- `serial_has_panic` / `report_panic_and_revert` driven against a synthetic
serial log: clean log detects nothing, panicking log reproduces the excerpt,
keep-file and message the two copies produced.
- `clone_file` fallback exercised (GNU cp has no `-c`, so this host takes it).
- Both `--device` spellings on both scripts accept and reject as before.
- `bash -n` on both boot scripts and the snapshot helper.
NOT verified: rails macos-12, macos-14, macos-15 and macos-26 are imported and
resolve but were never booted. Nothing on the arm64 pathway ran — no Apple host —
so its rail resolution, the per-rail vm.json, `clone_file` on APFS and the
migration refusal were exercised only as far as a Linux shell reaches. `--capture`
was not run on either pathway; no clean-shutdown capture happened. shellcheck is
not installed on this host.
Separately measured and NOT addressed here: rail macos-11 under
`--device reims-vgpu-pci` boots, binds and presents zero-copy, but the composited
frame is empty (`present_black_retain`, alpha-only) and the screen is black. Big
Sur bring-up on the product device is its own problem, not an artifact of the
import — the same snapshot renders under vmware-svga.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>