Commit Graph
397 Commits
Author SHA1 Message Date
Anees Iqbal 1ef5403e51 🔥 Delete VulkanPlatform and the metal2vulkan-runtime crate
RtPlatform, over metal2vulkan-rt, has been the library's platform since the
`rt` feature went on by default; VulkanPlatform, over metal2vulkan-runtime,
built only without it. This deletes VulkanPlatform, every module only it
used, the metal2vulkan-runtime dependency, and the `rt` feature with its cfg
arms in reims-vgpu-vulkan, reims-vgpu and reims-vgpu-c. Every handle was
already made on RtPlatform, so neither the guest nor the host sees a change;
the C header, QEMU, the guest's sets, the ROM and reims-ctl are untouched.

The tests of the deleted code go with it. The on_vulkan tests that held the
old platform now hold rt. The 15 that rt fails are ignored, each with the gap
rt names: texture buffers, a texture over a buffer or an IOSurface plane, a
rasterization rate map, visibility result modes, a kernel's stage input,
tessellation, a buffer of 0 bytes, a texture at the guest's resource ID, and
the guest's class, which rt is not told.

.config/nextest.toml drops the overrides of the deleted tests, and
lane-gate.sh reads the pin from metal2vulkan-rt's line.
2026-11-20 06:50:02 -08:00
Anees Iqbal 50a4abbb20 🐛 Say a Mac before macOS 26 starts no VM, not one without a GPU
docs/known-issues.md and install-ctl.sh's warnings said that on a Mac with
no KosmicKrisp, macOS 15 or earlier or a mesa without the driver, VMs get no
GPU. They do not start: the library's device has no GPU device to open
(reims-vgpu's GraphicsDevice::with_platform refuses with HostResources), so
rvg_graphics_device_create refuses, and QEMU's reims-graphics-pci fails its
realize, which ends QEMU before the guest runs. reims-ctl gives every arm64
VM that device, and arm64 VMs are what a Mac runs.

The doc's heading and paragraph and the installer's two warnings now say the
VMs do not start.
2026-11-20 06:03:27 -08:00
Anees Iqbal 0747dfc4c7 🐛 Install Homebrew's mesa on a Mac, the rt platform's driver
On a Mac the rt platform runs on Mesa's KosmicKrisp, which the installed
QEMU loads from its lib directory, linked to Homebrew's mesa. The installer
listed molten-vk and no mesa, so after the cutover a Mac without mesa got a
QEMU with no device for the guest. It now lists mesa where the Mac runs
macOS 26 or later.

Homebrew's mesa formula builds KosmicKrisp only from macOS 26 (Tahoe) on;
before, its Vulkan drivers are swrast alone. On macOS 15 or earlier mesa is
left out, and the installer says, at its start and at its end, that VMs on
that Mac get no GPU, then installs reims-ctl and QEMU as before. Where mesa
is installed but holds no KosmicKrisp, as a bottle poured for an older
macOS, linking the driver says the same and asks for brew reinstall mesa.

molten-vk is dropped from the list: nothing of ours loads it after the
cutover. rt's floor refuses MoltenVK (rt_driver.rs), the rt platform's
window presents through rt's swapchain on the KosmicKrisp device, and
reims-ctl, QEMU and the build load no Vulkan driver themselves. Homebrew's
mesa depends on molten-vk for its zink driver, so it is installed with mesa
all the same. The README's install paragraph says KosmicKrisp in place of
MoltenVK.
2026-11-20 06:03:27 -08:00
Anees Iqbal 66bdf92dce 📝 Say the default platform passes KosmicKrisp over on a Mac [ci skip]
The device choice now passes over a device a display's window cannot present
on, so with KosmicKrisp's manifest where Homebrew's mesa puts it the default
platform opens MoltenVK. docs/qemu.md and install-ctl.sh's comment said it
timed KosmicKrisp as the faster and took it; they now say it passes it over,
with the M3 Max boot that shows it (m3-max-57194: 16 of 16 checks, the
full-screen Metal app at 60 fps with 600 frames and none dropped), and keep
the earlier numbers as what it did before. mesa stays out of what the script
installs, as the default platform does not use it.
2026-11-19 23:57:05 -08:00
Anees Iqbal dad756075c 📝 Say how the default platform picks KosmicKrisp on a Mac [ci skip]
install-ctl.sh's comment said the default platform takes the first GPU of
its kind the loader lists. It times each GPU the loader lists and takes the
fastest (device_choice.rs), and a boot measured what that does when Homebrew's
mesa puts KosmicKrisp's manifest where the loader reads it: on the M3 Max the
default platform took KosmicKrisp, on which a display's window cannot present,
and check-boot's full-screen Metal app ran at 30 fps with dropped frames and
failed, where on MoltenVK it runs at 60 fps with none dropped.

The comment now says so, and docs/qemu.md records the boot beside the rt
build's, which passed all 16 checks on the KosmicKrisp the install links.
2026-11-19 23:39:11 -08:00
Anees Iqbal 1c69f8ab2a 🆕 Link the rt platform's Vulkan beside QEMU on a Mac
The rt platform loads the Vulkan loader and Mesa's KosmicKrisp only from
beside QEMU's binary or from ../lib (rt_driver.rs), and nothing put them
there: lanes linked them beside QEMU by hand.

On a Mac, install-ctl.sh now links both into the lib directory of the QEMU
it installs, and make qemu (or make vulkan-links) into build/lib, which is
../lib from build/qemu and from the arm64 build directory docs/qemu.md
configures beside it. Each link points into its Homebrew formula's opt
directory, so brew upgrade reaches it: the loader to vulkan-loader's, the
driver to mesa's. Homebrew's mesa formula is Mesa's release built unpatched
(26.3.1, the release the M3 boots on rt used), and its macOS 26 and later
bottles build KosmicKrisp, so no Mesa build of our own is needed.

Neither installs mesa: with its manifest in Homebrew's share, the system
loader lists KosmicKrisp ahead of MoltenVK (measured on the M3 Max), and the
default platform would take it in MoltenVK's place before the cutover.
Where Homebrew has no KosmicKrisp, no link to it is made and rt makes its
own instance, as before. Linux and Windows installs are unchanged: the new
code runs only where uname says Darwin.
2026-11-19 23:39:11 -08:00
Anees Iqbal 07221b9ec5 🆕 Install the build's Fedora packages in install-ctl.sh
install-ctl.sh's Fedora list was empty, so on Fedora it only warned and
printed the Ubuntu package names, and the build stopped at the first
missing header.

The list now holds Fedora's name for each Debian and Arch entry: the
compilers and QEMU's build tools, QEMU's libraries (glib, pixman, libslirp,
libfdt, PipeWire, PulseAudio, ALSA, libusb, the SPICE server, gnutls), the
Vulkan loader, SDL3's X11, Wayland, libdecor, EGL, GBM, D-Bus and udev
headers, and GTK 3. Each is checked with rpm -q --whatprovides, as some are
another package's (zlib-devel is zlib-ng-compat-devel's on Fedora 40 and
later), and the missing ones are installed with sudo dnf. The README and the
script's help name Fedora beside the others.
2026-11-18 17:26:40 -08:00
Anees Iqbal 60a4433e15 🐛 Fail doctor's /dev/kvm line only where a VM here runs on KVM
On x86-64 Linux, arm64 VMs run on TCG and need no KVM, yet doctor failed
"/dev/kvm" on a host whose VMs are all arm64 ones, and install-ctl.sh warned
that VMs would not start.

doctor now fails the line only where a VM this host runs needs KVM: a
registered VM whose profile runs on KVM here, or, with no VMs yet, the one a
create makes, of the host's default profile (x86-64 on x86-64 Linux, arm64 on
arm64 Linux, where every VM runs on KVM). Otherwise the line is ok and says
which VMs would need it and how to give it. install-ctl.sh's warning on
x86-64 Linux says that x86-64 VMs need KVM and arm64 VMs start without it.
What the host sees changes only in doctor's output and exit status and in
the installer's warning.
2026-11-18 17:26:40 -08:00
Anees Iqbal e389416315 🐛 Keep reims-ctl's install record beside the install it records
scripts/install-ctl.sh moves its install with XDG_DATA_HOME, XDG_CACHE_HOME
and CARGO_INSTALL_ROOT, and runs reims-ctl __record-install last, which wrote
install.toml in the config directory, which none of those move. An install
into a scratch prefix (a64start's m3-max-48499 on um870) therefore replaced
the user's own record with one naming the scratch QEMU build.

The record now lives in the data directory, beside the QEMU builds it names,
where reims-ctl already finds the QEMU it runs: an install into another data
directory records itself there, and update, doctor, the TUI's update and the
bug report read the record of the install whose QEMU this reims-ctl runs.
install-ctl.sh has no --prefix of its own to key a config directory to, and
its STAGE is QEMU's DESTDIR inside one install, not an install of its own.

An earlier reims-ctl's record in the config directory is still read where the
data directory has none, and an install's record replaces it, removing it,
only where it named a QEMU build of the same data directory: a scratch install
leaves it as it was.
2026-11-18 17:26:40 -08:00
Anees Iqbal 04dcd7959f 🆕 Build qemu-system-aarch64 wherever reims-ctl runs arm64 VMs
install-ctl.sh builds QEMU's aarch64-softmmu beside x86_64-softmmu on x86-64
Linux, and alone on an arm64 Mac (with HVF, signed with its entitlement) and
on arm64 Linux (with KVM), with gnutls for vmapple's AES. It installs
reims-restore where arm64 VMs run, for finish-eacs, and reims-ctl's
__record-install downloads Ambrosia there.
2026-11-18 15:57:52 -08:00
Anees Iqbal 326f393a15 🐛 Print install-ctl.sh's paths on Windows in Windows' form
On Windows install-ctl.sh's closing summary named QEMU's build in MSYS2's form,
/c/Users/me/.local/share/reims-ctl/qemu/<build>, which only MSYS2's bash
takes, while the summary sends the user to PowerShell or Windows Terminal. The
other paths its messages print (the checkout it pulls, a missing QEMU, cargo,
the library's pkg-config file, the installed reims-ctl, CARGO_TARGET_DIR) were
in the same form, and those that send the user back to the script named it by
the path reims-ctl update ran it with, C:/reims-vgpu/scripts/install-ctl.sh.

On Windows every path the script prints is now in Windows' own form
(C:\Users\me\.local\share\reims-ctl\qemu\<build>), and the messages that send
the user back to it name scripts\install.ps1, as reims-ctl's do there. macOS
and Linux print as before.
2026-11-16 23:30:08 -08:00
Anees Iqbal 31dbdd4b8c 🆕 Install libva and Mesa's vaon12 on Windows hosts
The device's video on Windows runs on libva-win32 and Mesa's VA-API driver
on Direct3D 12, vaon12, which MSYS2's CLANG64 libva and mesa packages
build. The Windows install now installs both with the other CLANG64
packages, and copies libva.dll, libva_win32.dll and vaon12_drv_video.dll,
with the CLANG64 DLLs they load, beside QEMU: the library loads them by
name when the device's video starts, so ldd of QEMU lists none of them, and
libva looks for its driver beside itself.

The two packages add at most five to an install, 172 MiB installed (17 MiB
to download): mesa, libva, spirv-tools, spirv-llvm-translator and
vulkan-loader. vaon12 itself is 11 MiB and loads only Windows' own DLLs.
2026-11-16 22:11:27 -08:00
Anees Iqbal 2af666bd33 🐛 Build a Windows install outside paths with spaces
A Windows user's folder can hold a space (C:\Users\First Last), and QEMU's
configure refuses a source or build directory with one ("main directory
cannot contain spaces nor colons"). With the library fixed, a user's install
would stop there next: install-ctl.sh builds QEMU in ~/.cache/reims-ctl, in
that folder. With the checkout in the folder too, as install.ps1 clones by
default, sdl3-sys stops first: it finds no SDL3, as a space splits the -L
path of the pkg-config file it reads. Both measured on the mini with a profile
named "Test User". No alias keeps the space out: meson takes realpath of its
directories, which turns an 8.3 short name back into the long one, and a volume
can have no short names (the mini's P: has none).

install.ps1 now clones into C:\reims-vgpu where the user's folder has a space,
saying so, and stops on a -Checkout with one. install-ctl.sh on Windows builds
and stages QEMU in the target directory where the cache directory has a space,
and stops before any download or build on a checkout or CARGO_TARGET_DIR with
one, naming the folder to use.
2026-11-16 16:36:48 -08:00
Anees Iqbal bd239b6ddf 🐛 Build every C and C++ part of a Windows install with clang
A user's install of development on Windows stopped in sdl3-sys's CMake build:
their environment's CC named Visual Studio's cl.exe, cc-rs gave the build
MSVC's C flags (and clang's C++ flags, CXX being unset), and CMake, which
reads CC itself where the cmake crate names no compiler, took cl.exe. Its test
compile failed once MSYS2 had turned /nologo into C:/msys64/nologo. Visual
Studio's install alone does not do it: cc-rs takes cl.exe from it for MSVC
targets only, and our hosts set no CC, so no run of ours met it.

install-ctl.sh on Windows now sets CC, CXX and AR, their per-target forms that
cc-rs takes first, and CMake's generator, to CLANG64's clang, clang++, llvm-ar
and MSYS Makefiles, for cargo's build scripts, CMake, QEMU's configure and
meson alike. The generator is the one the cmake crate chose with none set, and
CLANG64's ar is llvm-ar, so a host without those variables builds as before.
2026-11-16 16:36:48 -08:00
Anees Iqbal 8807df2aa4 🐛 Write CRLF text files out again in Windows checkouts made before
A checkout Git for Windows made before .gitattributes holds every text file
with CRLF line ends (its installer sets core.autocrlf=true), and git does not
write a file again where a later checkout leaves it unchanged: .gitattributes
has it compare the file as LF, so it finds nothing to do. A clone at
core.autocrlf=true moved to the commit that added .gitattributes kept all 1730
text files CRLF, and the build would have failed on the .metal sources' hashes
as before.

install-ctl.sh on Windows now writes each text file whose working copy differs
from its commit only in its line ends out again from the commit, after the
update and before any build, and keeps a file with changes of its own.
2026-11-16 16:36:48 -08:00
Anees Iqbal 13e22421e6 🐛 Build on Windows with gnullvm whatever rustup's default host
install-ctl.sh installs rustup with the x86_64-pc-windows-gnullvm host, whose
builds link with CLANG64's clang and lld, but a rustup already there builds
with its own default host. Windows' usual one, x86_64-pc-windows-msvc, builds
xtask, the build scripts, reims-ctl and reims-util for MSVC, which link only
with Visual Studio's link.exe: a host without Visual Studio's build tools
fails the install, and one with them installs MSVC binaries no install here
was checked with.

On Windows the script now runs rust-toolchain.toml's channel for the
gnullvm host (RUSTUP_TOOLCHAIN), installing that toolchain beside the user's
where it is missing, whatever rustup's default host; the default stays as
the user set it.
2026-11-16 07:56:51 -08:00
Anees Iqbal aaa06e63d9 🐛 Retry moving QEMU's staged install into place on Windows
A cold install on the mini built QEMU and then stopped at the move of its
staged install into reims-ctl's data directory: "Permission denied", as
Windows refuses to move a folder while a file in it is open, and just after
the stage was written something held one (m3-max-36159). The same move in
the same workspace minutes later succeeded, right after running the staged
QEMU and copying a DLL in as the script does (m3-max-36188). The Windows
branch now tries the move for a minute; Linux moves once, as before.
2026-11-16 05:07:24 -08:00
Anees Iqbal 00a942c42a 🐛 Build QEMU without its guest agent on Windows
A cold install in a new MSYS2 stopped at QEMU's configure: meson's auto
guest agent is on for a Windows host, and its build needs windmc, which no
CLANG64 package install-ctl.sh installs provides (m3-max-36094, the mini).
reims-ctl runs no guest agent, so the Windows build turns it off.
2026-11-16 05:07:24 -08:00
Anees Iqbal 2a0f952b67 🐛 Install make for the library's build in MSYS2
The cmake crate, which builds SDL3 for the library, chooses CMake's
generator on a GNU Windows target by looking for make, then mingw32-make, and
stops without either ("no valid generator found for GNU toolchain"): an
install into a new MSYS2 stopped there. install-ctl.sh now installs MSYS2's
make with the rest.
2026-11-16 05:07:24 -08:00
Anees Iqbal cba693ea83 🐛 Bring MSYS2 up to date before install.ps1 installs packages
A new MSYS2 holds the package lists of the day its archive was made, and its
base archive ships them, so the check for a missing list found one and
skipped the update; packages its mirrors drop would then not install.
install.ps1 now runs pacman -Syuu twice before install-ctl.sh, as MSYS2
asks before any install. A stop throws rather than exits, which under
irm | iex would close the window, and a declined elevation leaves the
hypervisor platform off with a warning rather than stopping.
2026-11-16 05:07:24 -08:00
Anees Iqbal 9efb1eb88a 🆕 Add install.ps1, the one command a Windows user runs
It installs what scripts/install-ctl.sh needs that Windows lacks, MSYS2 and
Git for Windows with winget, turns on the Windows Hypervisor Platform where
it is off (that step alone as an administrator, saying a restart is needed),
clones the repository where it does not run from a checkout, and runs
install-ctl.sh in MSYS2's CLANG64 shell. Each step is skipped where its
work is done, so a second run changes nothing it need not. -DryRun says what
each step finds and would do.
2026-11-16 05:07:24 -08:00
Anees Iqbal d4e40073d9 🆕 Install reims-ctl on Windows, in MSYS2's CLANG64 shell
scripts/install-ctl.sh refused Windows, where reims-ctl runs x86-64 VMs on
WHPX. In MSYS2's CLANG64 shell it now installs CLANG64's clang, lld, QEMU's
build tools and libraries with pacman, rustup with the x86_64-pc-windows-gnullvm
host (whose builds link with that clang, so no Visual Studio is needed), and
QEMU configured for WHPX, its CLANG64 DLLs copied beside it, qemu/current a
junction, into the user's profile, where reims-ctl looks. The Linux lines
are as they were.

reims-ctl update ran `bash`, which on Windows can be WSL's: the install now
records MSYS2's bash (__record-install --shell), and update runs the script
there as a CLANG64 login shell. MSYS2's programs expand wildcards and
braces in the arguments a Windows program gives them, and reims-ctl's git
calls ("@{u}", "HEAD^{commit}") reached MSYS2's git mangled: they run with
MSYS=noglob. The host messages say x86-64 VMs run on Windows too.
2026-11-16 05:07:24 -08:00
Anees Iqbal b5ad91b938 🆕 Make arm64 VMs from an IPSW with reims-ctl, downloading the latest
On an arm64 Mac or arm64 Linux, `reims-ctl create NAME --ipsw latest|PATH`, or
the interface's form, restores macOS from an IPSW onto a new VM's disk with
reims-restore's pipeline, offline: no VM runs and none of Apple's code. The
create saves the VM in the layout Ambrosia's boot reads (disk.img, aux.img,
machine-identifier.bin, and vm.toml with the profile vmapple-arm64 and its aux
and ECID; the ECID as text, since one can pass TOML's integers). A macOS 14 VM
is named with its one step left: a boot that makes its Data volume, then
`reims-restore finish-eacs DIR`.

`latest` is the current macOS in Apple's IPSW catalog, which lists only the
current release, so another is given by its IPSW's path, as the owner chose. The
IPSW downloads into the installers directory and continues after a stop;
`reims-ctl downloads` lists and deletes what is kept, never one a VM uses or one
being downloaded. The space check covers the download and the restore together.
A failed or stopped restore leaves nothing, and its log moves to the cache,
where the error names it.

reims-ctl doesn't start arm64 VMs yet: start, describe, doctor and the USB and
GPU views say so. Windows and Linux x86-64 keep their profile; host.rs adds
vmapple-arm64 for arm64 Macs (HVF) and arm64 Linux (KVM).

On those hosts scripts/install-ctl.sh installs reims-ctl alone: the restore runs
no QEMU and reims-ctl starts no arm64 VM. A Mac needs Xcode's command line
tools; arm64 Linux a C toolchain, git and curl (apt, pacman or dnf).
docs/qemu.md says so.
2026-11-16 02:03:39 -08:00
Anees Iqbal 378e8d384c 🆕 Add a script that runs the library's tests on Windows
Lanes ran the Windows tests through scripts of their own, each relearning
the mini's traps: the gnullvm target links with MSYS2 CLANG64's clang, SDL3
builds with CMake and Ninja there, a Windows machine takes only jobs that ask
for windows, and the build must not hold the GPU. The script dispatches the
tests' build and then the tests in its workspace, holding the UHD 630, waits
for both and prints the summary, with the check's tested features of the
crates it runs.
2026-11-15 09:07:15 -08:00
Anees Iqbal 00c9346cc4 🐛 Build QEMU of another commit in an empty directory
An update to f378a38f8 stopped in QEMU's build on the owner's laptop:
"qemu-version.h: No such file or directory". QEMU of 2026-11-13 writes
that header at configure (configure_file) wherever `git describe --match
'v*'` fails, as it does in every shallow vendor/qemu; the QEMU before made
it with a build step. meson, configuring in place, runs `ninja -t
cleandead` after writing build.ninja, which deletes each file .ninja_log
records as built that build.ninja does not name: the header it had just
written. Every later configure in that directory deletes it again.

install-ctl.sh and `make qemu` now record the vendor/qemu commit a build
directory was configured from (qemu-source) and start the directory empty
when the commit differs; a directory without the record is started empty
once. The same commit keeps its directory, so edits not yet committed in
vendor/qemu rebuild as before.

Reproduced on ms01 (job m3-max-31803): the old QEMU's directory
configured in place for the new loses the header and the compile fails as
on the laptop, twice over; an empty directory keeps it and compiles, and
keeps it when configured again at the same commit.
2026-11-15 03:12:15 -08:00
Anees Iqbal f378a38f8d 🐛 Name the root port's link speed and width as QEMU now does
vendor/qemu's move to upstream QEMU of 2026-11-13 brings 432b3f70, which
renames pcie-root-port's experimental x-speed and x-width properties to
speed and width and keeps no alias. reims-ctl's command still named the
old ones, so every VM's QEMU refused the root port and exited at once
("Property 'pcie-root-port.x-width' not found"), as the 5080 boot of
b157365a1 showed. The installer builds QEMU with reims-ctl, so both move
together. The lane gate's launch script follows.
2026-11-15 02:43:54 -08:00
Anees Iqbal 4fea044105 🔥 Delete run_vmapple.sh and the tour that drove it
run_vmapple.sh booted a Virtualization.framework guest on vmapple with
apple-gfx and AVPBooter, all three gone: make qemu builds no aarch64 QEMU,
apple-gfx left the library and QEMU, and AVPBooter no longer boots on
vmapple's layout. vm_drive.py ran its tours through it, and vm_ocr.swift
served vm_drive.py alone. The window's walk, their last user, boots on
Ambrosia since ea18b7f17; arm64 guests boot as docs/qemu.md, "arm64
guests", says.
2026-11-13 11:10:25 -08:00
Anees Iqbal ea18b7f178 🐛 Walk the window on a reims-graphics boot on Ambrosia
The manual walk of the macOS window booted its guests through
run_vmapple.sh, on apple-gfx and AVPBooter, which are gone (AVPBooter no
longer boots on vmapple's layout), so it could not run. Its steps M1, M2, M3
and M5 described apple-gfx's offered modes, its resolution=host and
@ppi forms and its display-modes property, and cited policy:: tests deleted
with it; its rates came from REIMS_VGPU_STATS lines nothing logs now.

The walk now boots an arm64 guest with reims-graphics-pci on Ambrosia under
HVF, as firmware/ambrosia/check-boot.sh does (AMBROSIA, BUNDLE, QEMU; clones
of the guest's disks), with the library's window open. The guest's rate is
read from the display's flips (reims_vgpu::graphics::shown at debug). The
steps say what the device's display does today: the guest is offered one
mode, the window's pixels, so M1 and M2 read that mode and its rate, P5 and
P7 see the guest take each new window size, P6 the window keep its size
through the boot's mode changes, P8 the guest stay a pixel per screen pixel,
and M3 the window open for resolution=2560x1600. M4 and M5, a guest mode
the window follows and display-modes, have no counterpart on this device
and are gone. features.md's entries and guards are unchanged.
2026-11-13 09:49:33 -08:00
Anees Iqbal 553e25bfe0 🐛 Serve each of the gate's WebGL connections in a child
Safari 16.6 on macOS 13.7.8 opens connections to the page server that it
sends no request on, and keeps one open for about 30 s. webgl-serve.pl read
its connections one at a time, so it waited on such a connection while the
page's own requests, its result among them, queued behind it. In a 13.7.8
guest, a page server of this kind held a connection of WebKit's Networking
process with no request on it, while eight more connections had their
requests waiting unread (netstat, lsof: m3-max-15745). A curl of the server
from the guest's shell timed out, and every queued request was answered once
Safari quit.

The gate's webgl phase on 13.7.8 took 35 s with this server, against a 60 s
limit, and 6 s with the new one, both passing (m3-max-15757). The appwalk
harness's page server, which reads its connections the same way, waits 20 s
for the result and reported none. 11.7.11 and 12.7.6 (Safari 14.1.3 and
15.6.1) passed the same check.

Each connection now gets a child of its own. The first child that brings a
result writes it under another name, links it to RESULT and tells the parent,
which ends the children still open and exits 0. The timeout still exits 1.
2026-11-11 06:59:57 -08:00
Anees Iqbal b270aa3611 📝 Quote Graft 0.2.0's client states and its provider matching [ci skip]
Graft 0.2.0 reports a bound consumer as waiting for "a provider of personality
<names>" or with its "activation gate open on a provider of personality
<name>", where 0.1.0 named the device and its nub. It finds ReimsGraphics among
the placed kexts by its manifest, opens the gate on each nub a personality's
provider matching matches, and on arm64e starts the libraries the manifest
declares. The design doc, prebuilt.py's comment on the staged personalities
and the lane gate's comment on graft-bind now say so; the lane gate's check
already matches the new wording.
2026-11-11 04:55:49 -08:00
Anees Iqbal f754939907 🔇 Move the library's per-event info lines to debug
No line at info may fire per present, frame, ring message or other
per-event path. Measured on development: an arm64 macOS 27.0.1 boot
logged 1326 lines, 867 of them the display's change of IOSurface at
WindowServer's presents and 396 library lookups; an x86 macOS 26.7.2 boot
on the 780M logged 3248, 1296 and 349.

- The display's change between IOSurfaces, each library lookup, each
  shared event named or made from another process's, and each queue made
  unshared are debug lines, the first, second and last under targets of
  their own that the lane gate's and check-boot's runs name at debug:
  reims_vgpu::graphics::shown (msi-drag.py times composites by it),
  ::library (msi-boot.sh's launch gaps) and ::queues (its count). The
  display's change between the scanout and a surface stays at info.
- reims-vgpu-graphics' lines of a reset and a context's close, which
  reims-vgpu's own repeat with what they let go of, are debug; its line of
  completion records handed over, once a second, is info the first time.
- The surface order's and the IOSurface views' summaries come at most
  once a minute, not at every 4096th command buffer or 256th
  SURFACE_PAGES; check-boot.sh reads the caches' count up to a minute old.
- A long wait's end, a CPU wait's end or its cut at a reset, and a
  newLibraryWithData: of bytes Metal refuses too are debug; the CPU wait's
  lines lose the runs of spaces their strings held.
- A fold at the views' budget, and the video arms' first picture of each
  way, frame of each outcome and reason of each fallback, are info once
  per process (their kind), not once per session.
2026-11-11 03:44:57 -08:00
Anees Iqbal 3fa02f6347 🔇 Write each kind of warning once, and count the rest
A warn or error line says a fallback, a refusal or a failure, and the
library wrote one at every event that met its cause: a refused pipeline at
each create, a broken ring at each post, a swapchain's failure at each
frame, a CUDA call's at each frame's drop. Each degradation is to be said
once per boot and then counted.

The library's logger now writes the first line of each kind at its level
and each later one at debug, counting it. A kind is the call site and,
where the site reports more than one cause, the class of the cause it
names as a `kind` key-value (`kind:% = error`): its text up to its first
digit, quote or `;`, so a refusal's id, a raise's selector, a Vulkan
result or a CUDA error tells kinds apart and a size or an address does
not. A site with one cause names none. An info line that names a kind is
said once per kind too. The first 256 kinds are told apart, the rest
counted together. `write_repeats` writes the count at info: "lines
repeated since the last count: <n> more of <file>:<line>[ [<kind>]]
(<target>: <the first line>); ...". The `log` crate's `kv` feature
carries the key-value.

The display sink's own first-refusal flag goes: the logger keeps one per
kind of refusal. msi-boot.sh counts ICB_SLOTS refusals from the first
lines and the logger's counts, as the later ones are debug lines now.
2026-11-11 03:44:56 -08:00
Anees Iqbal 7e264b6dbd 🔥 Hold GPUs through potluck alone and remove gpu-locks.sh
Every build, test, boot and copy on the shared machines has run as a
potluck job since 11-05, and the job's lease is the lock: --gpu holds a
GPU, --exclusive gives a timing run the whole machine. gpu-locks.sh and
metal2vulkan's maclock took lock files potluck never sees, so a run under
them could still share a GPU with a potluck job.

AGENTS.md, the boot section of docs/qemu.md, the video checks, the cost
benches' docs and the oracle README now name potluck's lease. The
conformance scripts take no lock of their own, and lane-gate runs its
tests under its job's lease. A build holds no GPU: it builds in a job
without --gpu, and the tests run in the same workspace holding one.
2026-11-10 23:17:59 -08:00
Anees Iqbal 76a7ad4d7b ⬆️ Take Graft 0.1.0, its first public release
Graft 0.1.0 (commit bb884fe, release zip sha256 2bea380e) is Graft's first
public release: bundle id ai.aneesiqbal.graft, serving only
ai.aneesiqbal.ReimsGraphics and ai.aneesiqbal.RgfxGate, with a C++17 SDK tool,
graft-kext, that consumer.mk builds from source with Xcode's clang++ in place
of the Python SDK. Its zip, copied by its own tools/vendor.py with the record
of all 156 files, puts Graft's source tree, the two kexts and the SDK in
guest/graft; the kexts sit at guest/graft/Graft.kext and Graft-arm64e.kext,
with no built/ any more, so the set's staging, its Graft check and the lane
gate read them there. The only binaries are the two kexts. AGENTS.md now says
guest/graft is Graft's release as vendor.py copies it.

RgfxGate depends on ai.aneesiqbal.graft 0.1.0, Graft's compatible version.
Graft hands an arm64e route's original back as a void * holds a function
pointer, discriminator 0, so RgfxGate keeps each AMFI original in a void * and
converts it to its mpo type at the call, which re-signs it; a typed variable
written through a void ** would authenticate with the type's discriminator and
fault. The static_asserts on the wrappers' discriminators stay. Graft's kernel
side refuses by name where it could have panicked, among them an arm64e AMFI
slot not signed with its operation's discriminator and a donor table that
differs from the live vtable.

set-check checks the prelinked collection with graft-kext check-prelinked,
which takes prelink.py's arguments and exit codes. Graft reports a bound
consumer as "bound: imports and vtables committed;" and either waiting for the
device or "activation gate open on the device nub"; the lane gate's graft-bind
passes only on the open gate, since only then does IOKit start ReimsGraphics.
Graft's own id moves in stage-config.py and docs/qemu.md, check-boot marks a
panic report naming ai.aneesiqbal as ours, and msi-appload posts its
measurement notification under the new prefix.

The prebuilt sets are rebuilt from these sources in their own commit.
2026-11-10 00:35:01 -08:00
Anees Iqbal f2d97498df 🎨 Name our kexts and Metal bundle under ai.aneesiqbal
The owner moves our reverse-DNS names from com.steelbrain to ai.aneesiqbal,
keeping each name's last part: ReimsGraphics, RgfxGate and the Metal bundle
(reims-graphics) take the new prefix. Graft 0.1.0 pins these new consumer ids
and refuses the old ones, so this lands with its adoption. What the guest sees
changes with it: the kexts' bundle ids, the Graft gate property
(ai.aneesiqbal.ReimsGraphics.graft-bound) and the registry root's
GraftClient.ai.aneesiqbal.* keys. The boot checks match the new names.

The prebuilt sets are rebuilt in the adoption batch, on Graft 0.1.0.
2026-11-10 00:34:34 -08:00
Anees Iqbal 27b87befa3 🐛 Fail the scripts whose aborts an EXIT trap passed as 0
On macOS's bash, 3.2, a script that stops at an unset variable under set -u
exits 0 where an EXIT trap is set, and $? is 0 inside the trap too, so a check
that aborted read as a pass (measured: the same script exits 1 with no trap).
payload_test.sh showed it; seven more scripts pair set -u with an EXIT trap:
check-boot.sh, check-imports.sh, walk_window_macos.sh, opencore-add-kexts.sh,
ship-commit.sh, msi-boot.sh and msi-image.sh.

Each now keeps an ended flag, set at each deliberate success end, and its trap
does its cleanup as before, then turns an exit 0 short of that end into 1 and
keeps any other status. payload_test.sh takes the same form in place of the
trap its last fix removed, so it cleans its scratch on an abort again.
2026-11-08 21:03:01 -08:00
Anees Iqbal a656ba31d1 ⬆️ Take Graft 1.0.0 from its release tag
Graft 1.0.0 is its first release. It reorganizes the repository: the built
kext moves from dist/ to built/, and the header, start glue and build rules
move under sdk/. It also binds an absent weak import to the pointer
gOSKextUnresolved holds, and verifies an imports-only provider through an
anchor class, which kextvers needs for macOS 11 and 12.

Point the guest build, the OpenCore link check, the lane gate and the
design doc at the new paths, and rebuild guest/prebuilt from them.
2026-11-08 05:15:44 -08:00
Anees Iqbal 370933b618 🎨 Inject the Graft set from macOS 14, where its matrix rows pass
On 11 to 13 the set would load where nothing of ours loads today, and those
releases are not ready: 12 crash-loops WindowServer on the display pipe's
completion layout, 13.7.8 draws a black wallpaper, and on 11 the host refuses
Metal libraries. OpenCore now injects Graft, ReimsGraphics and RgfxGate from
Darwin 23 on, so 11 to 13 boot plain, as they do today.

MIN_KERNEL in guest/tools/prebuilt.py is the one place that decides it, and
each older release joins in its own commit once its row passes. Graft itself
still checks no version.
2026-11-08 03:00:32 -08:00
Anees Iqbal f96803deac 🎨 Gate and patch images with the Graft set
lane-gate built the old loader and its shims for each candidate ReimsGraphics
from a separate builder, and its guest check read the loader's log; neither
exists with the set on Graft. The gate now ships the set as guest/'s build
stages it (Graft, ReimsGraphics, RgfxGate), its image carries exactly those
three, and graft-bind reads GraftClient.com.steelbrain.ReimsGraphics from the
registry root. msi-image.sh refuses a base image that still lists another kext,
such as Lilu or the old loader, which `reims-ctl update-opencore` makes again.
The Mac's kext check runs guest/'s set-check in place of the shim link check.

opencore-add-kexts.sh gives added kexts no kernel range, as the set has none,
and takes an image with no Kernel > Add entries, which reims-util now makes
for a VM on another device.
2026-11-08 02:58:39 -08:00
Anees Iqbal e22b8d31e9 🆕 Vendor Graft's build and consumer tooling under guest/graft
The guest kexts move from Lilu and the loader onto Graft, our own kext that
binds ReimsGraphics against the System KC by name and routes RgfxGate's hooks.
As agreed with Graft's session, reims-vgpu carries a copy of Graft's committed
build, header, start glue and consumer build rules, made by Graft's
tools/vendor.py at Graft 9ac50f6, with source.toml recording that commit and
each file's SHA-256. The set's build and prebuilt check use it from the next
commit on.
2026-11-08 02:57:54 -08:00
Anees Iqbal 5a4418c894 📝 Say that core is the Vulkan crate's module [ci skip]
reims-vgpu-core is folded into reims-vgpu-vulkan, so the docs, the
manifests' comments and the crate descriptions that named the crate name
its module now: the crate lists and graph, seven crates, core's files under
crates/reims-vgpu-vulkan/src/core, the testkit feature, and what the x86-64
leg runs. The design note that put the decoder in core says where it is,
reims-vgpu's graphics::decode, and the path of a deleted file goes. The
kache measurement keeps the crate's name, as it was measured then.
2026-11-08 01:55:07 -08:00
Anees Iqbal fd591f5039 🎨 Fold reims-vgpu-core into reims-vgpu-vulkan as its core module
The Vulkan crate is the library's only platform since the Metal platform
went, and every crate that links core links the Vulkan crate too, so core
needs no crate of its own. Its files move unchanged under
reims_vgpu_vulkan::core (crate::core in the Vulkan crate), the module the
video crate's layout already uses; its #[macro_export] macros stay at the
crate's root, so reims_vgpu_core::metal_check! is reims_vgpu_vulkan's now.
core's lint set is the module's inner attributes, as it was the crate's.
Nothing the guest or the host observes changes, and reims_vgpu.h is the
same. Core's log lines name reims_vgpu_vulkan::core:: as their target in
place of reims_vgpu_core::, so reims-ctl's example filter says so.

The testkit feature is the Vulkan crate's, reims-vgpu-vulkan/testkit, and
the crate's integration tests turn it on through a dev-dependency on the
crate itself, as core's dependents turned core's on. core's tests keep
their paths below core:: in the Vulkan crate's unit tests, and cargo xtask
check's x86_64-apple-darwin leg runs those alone: -p reims-vgpu-vulkan
--lib -E 'test(/^core::/)'. The tests that run themselves again in a child
name themselves below core:: too (a child given a name that matches no
test runs nothing and passes), and the memory map's tests take the lines
of the targets below reims_vgpu_vulkan::core::memory.

The macOS test that declares _exit now declares it safe, as the testkit
does: rustc's clashing_extern_declarations compares the declarations
within one crate.
2026-11-08 01:55:07 -08:00
Anees Iqbal 6fb33ecd27 🎨 Rename the reims-graphics crate to reims-vgpu-graphics
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.
2026-11-08 01:37:50 -08:00
Anees Iqbal 05bf511500 🐛 Ask the lane gate's host video of vainfo and NVDEC
The lane gate's host-video table came from vulkaninfo's video profiles. The
host's video stopped using Vulkan Video when it was deleted: it is VA-API's
and NVDEC's. The table now lists each GPU vulkaninfo names, found by its PCI
address, with the decode profiles vainfo lists on its render node. On an
NVIDIA GPU the profiles are the ones nvidia-probe finds NVDEC decodes: H.264
Baseline, Main and High at 8-bit 4:2:0, and HEVC Main and Main 10.
msi-build.sh builds nvidia-probe, and the job and the publish step copy it
beside QEMU.
2026-11-07 21:32:05 -08:00
Anees Iqbal 916268b33f 🔥 Delete the IOSurface device's qtest script
qtest_iosurface_pci.py checked apple-gfx-iosurface-pci, the paravirt IOSurface
device, through QEMU's qtest accelerator. The device is gone from QEMU and the
library, so nothing the script starts exists.
2026-11-07 20:07:29 -08:00
Anees Iqbal cf40cc8c57 🔥 Install no clang or lld for reims-ctl's build
install-ctl.sh installed clang and lld for the option ROM cargo xtask dist
built for apple-gfx-pci. dist builds no ROM now: reims-graphics-pci's comes
prebuilt (firmware/prebuilt). What the install builds needs neither: the
library's Linux dist links its archive with binutils's ld, nm, objcopy and
ar; SDL3 builds with CMake and the system's C compiler; metal2vulkan and
QEMU need no clang. binutils stays.
2026-11-07 19:45:50 -08:00
Anees Iqbal fea9c0b2ae 🔥 Drop apple-gfx, vmapple and Mac hosts from reims-ctl
reims-vgpu no longer has apple-gfx, Apple's paravirtualized GPU, nor
vmapple's arm64 boots (owner, 2026-11-07). reims-ctl follows:

- Every VM runs reims-vgpu's own GPU device, reims-graphics-pci, or VMware
  SVGA. The choice by the guest's macOS version (apple-gfx below 26.4) is
  gone, with no version check in its place. Settings that name apple-gfx
  read as reims-vgpu, and migration 3 makes such a VM's OpenCore image again
  for the device, keeping the old one as <image>.pre-migration-3.
- apple-gfx's settings and options go: displays, HiDPI, refresh rate and
  video acceleration (read past in old settings, dropped on the next save),
  view --display, the video and IOSurface devices, the Metal error-mode
  note, the aux trim and the emptied-entry warnings. With logs off the
  library logs at warn.
- reims-ctl runs VMs on Linux x86-64 hosts alone. Mac hosts go with arm64
  boots, per the owner's 11-07 ruling, and come back with the arm64 loader.
  create, start, gpus and usb on a Mac say "reims-ctl runs VMs on Linux
  x86-64 hosts"; vz.rs and its objc2 Virtualization dependencies go; the
  crate still builds and tests on a Mac.
- scripts/install-ctl.sh refuses any host but Linux on x86-64, and builds
  the library on Vulkan alone: GPU_ARM, the -vulkan builds, Homebrew and
  codesigning go.
- reims-util moves to 5ca3b10, which carries Lilu alone, without
  ReimsVgpu.kext: the renew warning for an image lacking it goes too.
2026-11-07 18:21:43 -08:00
Anees Iqbal 34dfe1b28a 🔥 Move QEMU to its tree without apple-gfx
vendor/qemu's eb36a099 removes apple-gfx (PCI and vmapple's MMIO device),
the IOSurface device, the paravirtual VideoToolbox and M2 scaler devices and
the KVM dirty source only apple-gfx gave the library. reims-graphics-pci is
QEMU's only device on the library, and calls only its rvg_graphics_device_*
functions and rvg_status_message. vmapple is no longer built: its display
was apple-gfx-mmio.

QEMU's option that finds the library is now --enable-reims-vgpu, not
--enable-pvg, upstream's name for Apple's framework, so its callers change
with it: install-ctl.sh's and the lane gate's configure lines, and make
qemu. make qemu now builds qemu-system-x86_64, the guest reims-graphics-pci
serves, configures again over a build an earlier make qemu configured for
aarch64 or with --enable-pvg, and no longer checks for ReimsVgpu.rom, the
option ROM QEMU installed for apple-gfx-pci. make vm, which booted a vmapple
guest, goes.
2026-11-07 18:21:43 -08:00
Anees Iqbal dae3e6b13d 🔥 Delete the behaviour-lock suite and its make targets
The suite drove apple-gfx's C API as QEMU did and recorded what the paravirt
device did; the owner's ruling deletes apple-gfx and everything of it, the
suite with it, so make test, bless and coverage go too.

Its shader fixtures are the platforms', the graphics device's and the guest
bundle's tests too: they move to tests/shaders. guest/bundle's Makefile, an
input of the prebuilt kexts, still names tests/suite/fixtures/shaders, which
stays as a link to tests/shaders until the kexts are next built. A worktree
no longer clones the suite's 257 MiB, so new-worktree.sh adds it plainly.
2026-11-07 18:21:42 -08:00
Anees Iqbal 922acf7fd1 🔧 Add a guest step that keeps MiniBuddy's panes from a boot
Shared guest disks saved with Setup Assistant's MiniBuddy panes unseen
bring them up over the desktop at every boot of a copy, as loginwindow
launches MiniBuddy while the user's com.apple.loginwindow MiniBuddyLaunch
is true for the host. Boot harnesses run this script in the guest over
SSH before their workload. It ends a running MiniBuddy, deletes the key
for any host and from the host's ByHost file (deleted for any host alone,
the key still launched MiniBuddy after a reboot), waits for the files to
drop it, and says when the guest must reboot to log in without the pane.
2026-11-07 12:53:45 -08:00