Commit Graph
9 Commits
Author SHA1 Message Date
Anees Iqbal d1958aecfa 🆕 Add the reims-graphics wire format and its C header
The guest's kext and option ROM are built in parallel and need the device's
wire format before the host side exists: its registers, the region's layout,
the rings' header and the control commands and events of the design's stage
2 wire protocol. They live in a new crate, reims-graphics, which will hold the
device's host side too, and cbindgen writes them into
include/reims_graphics_wire.h, which cargo xtask header --check keeps equal
to its output, as it does reims_vgpu.h.

Two fixes to the design's tables: a control ring's byte ring is 32 KiB, the
largest power of two after its 256-byte header in its 64 KiB (64 KiB less the
header is no power of two), and a pad's header is its type and size alone,
since the bytes left before a ring's end may be 8. A u64 that would follow a
u32 at an offset not a multiple of 8 has a reserved u32 before it, so C and
Rust lay the records out alike.
2026-11-05 21:58:28 -08:00
Anees Iqbal d2ac8ecb6a 📝 Say the Mac's kache store ceiling is 100 GiB [ci skip]
The owner raised local_max_size in the Mac's ~/.config/kache/config.toml from
60 GiB to 100 GiB on 2026-11-03.
2026-11-03 23:58:52 -08:00
Anees Iqbal ed685ef8fb 📝 Build each worktree in its own target/, for kache's seeds [ci skip]
kache 2 seeds a worktree's incremental state from another worktree's only
when both targets sit inside their worktrees: it maps the compiler's working
directory to one path, and a target elsewhere puts a path of its own in the
compiler's arguments. Measured on the M3 Max: with targets inside the
worktrees, a second worktree's first edit of core compiled in 4.3 s from the
first's state, against 7.0 s with no donor; with each target in its own
directory under ~/.cache, the seed identities differed and it took 5.7 s.
So a worktree, which lives under ~/.cache, now builds in its own target/
with no CARGO_TARGET_DIR. Also rewraps a line of the previous commit.
2026-11-03 23:47:28 -08:00
Anees Iqbal 66fab0adf9 🐎 Build incrementally, with kache 2's incremental state
The owner asked for Rust's incremental cache and kache 2.0.0's. dev-env.sh
no longer sets CARGO_INCREMENTAL=0 or KACHE_ADAPTIVE_INCREMENTAL=0, and unsets
both where a shell kept them, and `cargo xtask check` runs its cargo steps in
the environment it starts in, so a check run again after a fix rebuilds what
the fix changed. Each host's kache configuration turns on adaptive and seeded
incremental state: kache compiles a unit being edited incrementally, and a
new worktree's first incremental compile of it imports a compatible one's
state (rustc 1.98 or later). docs/development.md says how, and that kache 2
compiles through its daemon, which builds now start.
2026-11-03 23:44:11 -08:00
Anees Iqbal 28aecd0f04 🎨 Move the development scripts to scripts/internal
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.
2026-10-26 14:08:39 +02:00
Anees Iqbal 73a0b0988d 📝 Record the video devices' bugs, hardening and layout [ci skip]
docs/video/bugs.md records what is wrong with the video devices or put off,
and what each boot round found; hardening.md the bounds on guest input.
AGENTS.md, docs/development.md and docs/lessons.md gain the video crates'
rows, their checks and the traps their review found.

Source: c5b409362 f5d0311e3 532db9c03 cb582881c 5dd0d9373 60d08c4f4 efbcf2dbb
        c4c476643 82f25c397 fe105edcb 36a6a82c6 c5750b87f d7d5cfede 51bad7d67
        a07ffd70b 958524e64 cc8cbfd2d 8f9e68b8b 39881a0b3 aba73491a 233801b96
        886833dc2 710929c9d 509f64a8b fd20de9bf 2ae4acf64 7433026a9 0030b24a7
        64497f931 3bf366e81 eed5d9446 0fa52d070 c21cff4fb 1ff907b68 1ccde0ef6
        41235220c 33b40ae4a 0fbe863c3 0b7e8c004 ae49b63a3 4151f4de8 76951e3ea
        7cfd37c9b 853cfdc0e 6ed3d12a4 2dbca9dcd af2b396b2 16f8ee77b ba01dec38
        095f975b2 b6ac2bb54 943f091af ef26f02e1 d27a5f48a 7bbfdf888 203585632
        4aa89d356 31ffd8de7 08bb763c4 9400f48cb 9e050f933 5ff2dd73f 62e19c8ef
        c8c7b3400 ce406ddb2 fd92f66c4 52fba93c9 e179dc0bd b5f40ad74 73d7e9c85
        d01bbdc9e 0dcca7ff7 30ed556cb 601c23067 9857b1fc8 675e1cf8d b427bebfb
        9817ecd8f 55a1d96e7 96f459104 8c58f98c4 f9c7a5811 eef22173d 9628f09a8
        fa2a248c3 5dccbdd18 ef54c395f 745cef197 d02148033 da8b42c4c e7cb403a2
        46120bbf7 25e4ae539 221176d06 22625b578 75d879cf5 c23c83073 051c64ebb
        73e48ad5a bc6fcdaa7 b02b003f5 986872956 deb03015c 096878653 8b915bb9e
        89e863767
2026-10-26 12:24:31 +02:00
Anees Iqbal 6e20652eea 🐎 Build lean, and share builds between worktrees through kache
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
2026-10-26 12:24:31 +02:00
Anees Iqbal 39d6ca78ef 🆕 Make new x86-64 VMs from reims-util's macOS downloads
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.
2026-10-12 19:37:12 +03:00
Anees Iqbal 2624fe619b 📝 Move the README's developer reference to docs/development.md [ci skip]
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.
2026-10-11 22:10:39 +03:00