The Makefile's comment said a clean build through QEMU's Makefile took about
7 minutes. Measured on um870 (16 threads): 310 s at QEMU's -j1 against 59 s
at ninja's default, the same 1951 steps and the same binary. docs/qemu.md
keeps the measurement; the comment cites it.
make qemu built qemu-system-x86_64 through QEMU's Makefile, which hands
ninja -j1 where make was given no -j: a clean build ran one compile at a
time, about 7 minutes on ms01 and um790 (warmbound). The qemu target now runs
ninja itself, which builds at its own default parallelism, or at a caller's
-jN, and has meson regenerate build.ninja where a meson file changed, as
install-ctl.sh's build already relies on.
QEMU's Makefile also ran configure again where vendor/qemu's configure, its
meson options script, its Python dependencies or its VERSION were newer than
config-host.mak: the target's own check of when to configure now takes that
case too, so a submodule move configures as before. The binary built is the
same target's.
The owner's order: the library runs on the Vulkan platform alone. On Linux
it already did; on a Mac it now builds over MoltenVK, for development and
tests, and ships nowhere. crates/reims-vgpu-metal goes whole, with its
workspace entry and every use:
- reims-vgpu: platform/metal.rs, graphics::metal (the macOS sink),
display_cost.rs and cfg(vulkan_platform) go; DefaultPlatform is
VulkanPlatform everywhere, and the Vulkan crate and the runtime are plain
dependencies. `vulkan` stays as an empty feature for the builds that name
it.
- reims-vgpu-window: the AppKit side's message layer, clock and threads
are the Vulkan crate's (reims_vgpu_vulkan::os::msg, OsClock, OsThreads).
- reims-vgpu-vulkan: the macOS OS layer moves in from the Metal crate, cut
to what is used (msg.rs, clock, threads, Mach VM, IOSurface,
autorelease); shaders.metal moves here, without the XR10 paging kernels
nothing calls since the paravirt protocol went. shaders.metallib and
no_draw.metallib are compiled again on the M3 Max with metallibs.toml.
- reims-vgpu-c: Plat is VulkanPlatform; `vulkan` stays as an empty feature.
The C API's header does not change.
- xtask dist builds the Vulkan platform on every OS into dist-vulkan, and
refuses `--platform metal`; check tests one feature set everywhere. The
Makefile's RUST_DIST follows.
The tests whose oracle was the Metal platform keep its answers: each Metal
leg was run on the M3 Max (macOS 27.0.1) before the crate went, and its
answers are the test's fixed expected values, in text files beside each
test (metal_answers/, large ones as a digest or in an xz companion), read
by core's testkit::metal_answers. They are Metal's, never to be rewritten
from this library's own output. Tests that only measured the Metal platform,
or duplicated a literal-checked Vulkan test, go.
On Linux cargo xtask dist builds the library on Vulkan, the one platform
Linux builds, into <target>/dist-vulkan. make qemu pointed QEMU's
PKG_CONFIG_PATH at <target>/dist, where nothing is written on Linux, so
configure found no reims-vgpu.pc and stopped at --enable-reims-vgpu. Linux
is now the only host that runs VMs. The dist tree is picked by the host's OS:
dist on a Mac, dist-vulkan on Linux.
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.
apple-gfx-pci loaded ReimsVgpu.rom, its UEFI driver, as its default romfile;
with apple-gfx gone the driver, its sources and its build go, and cargo xtask
dist installs no ROM and names none in reims-vgpu.pc (QEMU stops reading its
optionrom variable). The firmware builds only the reims-graphics device's ROM,
which reims-ctl carries: OptionRom.S keeps the layout ReimsGraphicsRom.S
includes, with no apple-gfx-pci identity to fall back on.
The prebuilt ROM's bytes are unchanged (sha256 749434f8, rebuilt on the Mac):
only its record moves, for the Makefile and the two assembler files it names.
QEMU keeps only reims-graphics-pci.c's calls once apple-gfx goes: the ten
rvg_graphics_device_* functions, rvg_status_message, the window's and the
cursor's types and the memory map the device's config names. Everything of
Apple's paravirt device goes from the header: the device, its displays and
frames, the IOSurface, video and scaler devices, trace ranges, the log hook,
the dirty source, suspend and resume, and their status codes, pins and the
xtask smoke that drove them.
The C API is no longer additive-only: the status codes are renumbered to the
five the graphics calls return, rvg_status_message keeping a message for each,
and the struct versions the paravirt hosts needed go, so a struct_size below
the library's is refused. The window config keeps its mode, the one field the
graphics device reads; the cursor and memory-map types move beside the
graphics device. rvg_graphics_device_mmio_write goes too, QEMU calling only
the taking write, which now carries the plain write's contract.
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.
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.
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.