Commit Graph
1362 Commits
Author SHA1 Message Date
Anees Iqbal fc5b3cfd07 📝 State the 0 Hz rule without where it was read [ci skip]
The rule for a mode's rate in an x86-64 guest stands on the boots it names
(m3-max-78416, m3-max-78544). Its two notes on where the rule was read are
dropped, so the docs describe the rule and its measurements only.
2026-12-02 07:41:30 -08:00
Anees Iqbal d26cf49d22 📝 Say why x86-64 guests list their modes at 0 Hz [ci skip]
An x86-64 26.7.2 guest lists every mode at 0 Hz (CGDisplayModeGetRefreshRate,
System Information) though the framebuffer answers the device's rate in each
mode's information and detailed timing. The 0 is x86-64 macOS's own:
CoreDisplay's mode building gives every mode the rate 0, and records IOFB0Hz
in the framebuffer's IOFBConfig, where all the display's valid modes are
progressive and between 57.5 and 62.5 Hz, as for an Intel Mac's 60 Hz-only
panel. A scratch framebuffer giving every mode 120 Hz listed all seven at
120 Hz with no IOFB0Hz; dropping the Apple timing ID changed nothing.

The framebuffer lists no mode at a rate the host screen does not run, so a
guest on a 60 Hz screen keeps reading 0 Hz, and one on a screen of another
rate reads it. Nothing changes for the guest; design.md says what the rule
is and lessons.md how to tell it from a wrong answer of ours.
2026-12-02 07:41:21 -08:00
Anees Iqbal aa9cf71a7f 📝 Record the wire record that grew without the version [ci skip]
A guest of a wire version reads and lays out each record at its own size, so a
record that grows at the same version is misread rather than refused, as the
11-28 report's old bundle was. The lesson says why only a version the kext reads
before it registers its accelerator ends in a picture, and how to spot the next
one in a host's log.
2026-12-02 07:29:40 -08:00
Anees Iqbal 1b8cf2f69e 🐛 Move the reims-graphics wire to version 3
A guest bundle built before 11-18 sends RgfxRenderPipelineCreate at 464
bytes with its private state after it. A host since then reads the record
at 496 bytes, so it took that state's sample mask, UINT64_MAX, as the
pipeline's tessellation partition mode and refused WindowServer's
pipelines: after an update whose guest still ran the old bundle,
WindowServer restarted at every boot. The wire stayed at version 2 through
that change, so the kext let the old bundle in.

Three records changed size at version 2, which the size table from the last
commit names: RgfxVideoCaps (776 to 1552 bytes), RgfxRenderPipelineCreate
(464 to 496) and RgfxPoolBlock (40 to 48). No register, region offset or
message number moved after 11-05, the day version 2 began, and every other
change since then was a feature the guest takes, a tail after a record, or a
reserved field put to use. The wire is now version 3, and the table pins
every record's size there.

What the guest sees: VERSION reads 3. Kexts and option ROMs built before
this commit leave the device, and name both versions: macOS then drives the
display through the firmware's framebuffer and WindowServer composites in
software, so an old guest comes up with a desktop instead of looping. Kexts
of version 3 register no accelerator for a bundle of version 2 on disk, and
RgfxGate replaces it on the same boot before they register. reims-ctl's
start already makes a VM's OpenCore image again with its own kexts where
the image holds other builds. The peer traces read VERSION 3, and
design.md lists the versions and the size rule. The option ROM and both
kext sets are rebuilt in the next commit.
2026-12-02 07:29:40 -08:00
Anees Iqbal 2221d7004d 📝 Fill the UHD 630's cells and record the restore's wait on the Iris [ci skip]
vainfo -a on the UHD 630 (m3-max-78560) lists vaon12's decoders: H.264, HEVC
Main and Main 10, and VP9 profile 0 and profile 2 at 10 bits, 4:2:0 up to
8192x4352, and no encoder, AV1 or range extensions. The Windows column's
open cells (Q3) now say that, and Q3 is gone.

The planner kept the restore of H1: the decode's wait VA-API asks for before
a read stays. Its remainder on the Iris Xe against issuing the runs with no
wait, 0.2 to 0.7 ms a decode with the guest's numbers equal (m3-max-78524), is
recorded in B95 as its cost.
2026-12-02 07:18:17 -08:00
Anees Iqbal 9bdd4c633b 📝 Name the x86-64 guest's -19092 as its own synchronous wait [ci skip]
With the paravirtual service published, x86-64 macOS 26.7.2's framework
returns at once from a reply wait whose timeout is above 2.147 s, and a
synchronous decode's waits are 10 s: each synchronous frame fails -19092 as it
is sent. The same decode with asynchronous decompression handed 60 of 60 AV1
and 60 of 60 VP9 pictures on the 780M (m3-max-78509). The docs said what fails
was not known; F3 and F4 now say what the service, which x86-64 guests stay
off, decodes. devices.md also said the host answers dfin kVTUnimplementedErr,
which it no longer does.
2026-12-02 07:18:17 -08:00
Anees Iqbal 4b019b5bfd 🐎 Issue a VA-API frame's processing runs right behind its decode
bbe52c1aae made the zero-copy write wait for the frame's decode before it
issued the video-processing runs that read it, because nothing in va.h or
va_vpp.h promises that a driver orders a run on another context after a
pending decode of its input. That text is silent; it asks for one wait
only, before the planes are read (vaExportSurfaceHandle), which the runs'
own wait is. The drivers do order it: radeonsi's winsys schedules each
submission after earlier flushed ones on other rings that use one of its
buffers (RADEON_USAGE_SYNCHRONIZED, read from Mesa's code), and the
hardware test of the old order passed on the Iris Xe (iHD) and the Radeon
780M. The wait cost about 1.9 ms a landing on the Iris (B 6.68/6.27 ms
against A 4.01/4.03 in m3-max-78259; a decode sync of 608 us mean, issue
225 us, runs 1812 us in m3-max-78313).

The runs now go right behind the decode again, the decode is waited for
between their issue and their wait (runs_behind_the_decode), for its error
and its word that it is done, and the runs are waited for once. The
call-order test now holds that order, and the hardware test is again
runs_issued_right_behind_a_decode_write_what_it_decoded.

For the guest: a reference picture's landing starts its copy as the GPU
finishes the decode instead of a CPU round trip after it; what lands is
unchanged, and a failed decode's error is still the frame's.
2026-12-02 07:18:17 -08:00
Anees Iqbal 70d02fed49 📝 Name each video format's proof run, and close JPEG and ProRes [ci skip]
Part 4's table now says how each offered cell was shown: the job of a run in
which a guest decoded or encoded the format on that card, a card test, the
driver's listing alone, or no run on file. The x86-64 rows take today's walks
(H.264 and HEVC Main playback, and the HEVC and H.264 encode rows of
319f54dabb); the arm64 rows take the runs devices.md already names.

VP9 profile 2 at 12 bits on the RTX 3090 is offered on its card test (job
m3-max-78301: every frame libvpx's), not yet a guest run, and known-issues says
which formats each GPU decodes. JPEG on Intel Mac guests is the guest's own,
as a real Intel Mac's is. ProRes has no route: no lab card's driver lists it.
The x86-64 encoders' AppleGVA paths are named under the table.
2026-12-02 07:18:17 -08:00
Anees Iqbal a774a7fcf2 📝 Settle the JPEG and HEVC range extensions encode cells [ci skip]
Part 4's Q1 and Q2, answered by a read of an Intel Mac's video plug-ins,
registry and shared cache (potluck job m3-max-78260) and of the arm64 HEVC
encoder's Info.plist as macOS 27.0.1 ships it.

JPEG is the guest's own on both arches. VideoToolbox's JPEG plug-ins load only
where Apple's JPEG engine's key is in the registry, and AppleGVA has no JPEG
path an app uses. No GUI or VT route ever asks a GPU.

HEVC 4:4:4, 12-bit and SCC encode are the guest's own as well: VideoToolbox
names no profile for them. On x86-64 no encoder takes 4:2:2 either. On arm64
the paravirtual encoder lists the range extensions profile, so Main 4:2:2 10
on the Iris Xe becomes N4, sized and waiting for the planner.
2026-12-02 07:18:17 -08:00
Anees Iqbal 221d6933e6 🆕 Decode VP9 profile 2 at 12 bits on NVDEC where its caps list it
The owner's order is to offer what the host lists. An RTX 3090's NVDEC
lists VP9 at 12 bits, 4:2:0 (m3-max-77186), but the NVDEC arm declined
every 12-bit profile 2 stream at its paravirtual session's start, so an
arm64 guest decoded none on an NVIDIA host, while iHD's already land in
`tv20`.

What changes for the guest: on an NVIDIA host, an arm64 guest's
paravirtual VP9 session of profile 2 at 12 bits, 4:2:0, is now taken
where NVDEC's caps of VP9 at 12 bits, asked at the session's start as
HEVC's range extensions are, list it at the stream's size. Its frames
decode into P016 (the samples at the top of their words) and land in
`tv20` as HEVC's 12-bit 4:2:0 pictures do. Elsewhere the session is
refused at its start as before, its reason named.

vp9_s_caps_are_nvdec_s_answers_and_decline_what_they_lack held the old
answer (12 bits declined) and now holds the new one: taken where the
caps list it; declined where they do not, write no P016, or lack the
size. It fails with the 12-bit branch cut off (m3-max-78250, msi). The
new ignored NVIDIA-host test a_12_bit_profile_2_stream_decodes_to_libvpx_frames
checks the codec module's 12-bit libvpx stream against vpxdec's MD5s, to
run on an RTX 3090. docs/video/formats.md's cell reads "listed, not run"
until it does.
2026-12-02 07:18:17 -08:00
Anees Iqbal 78b3bc8ac6 📝 Table every video format by guest and host route [ci skip]
Part 4 asks for one table of what the lab's cards decode and encode
against what the device gives each guest: for each format, guest route
and host arm, offered, a finding with its evidence, or not built with its
reason. docs/video/formats.md is that table, from the drivers' lists of
2026-11-27 (m3-max-77185 to 77188) and the arms' caps code.

It shows one format the code could offer and does not (G1: VP9 profile 2
at 12 bits on NVDEC, which the RTX 3090 lists), and three cells no lane
has studied (JPEG on x86-64 guests; HEVC range extensions and SCC encode;
the UHD 630's formats past H.264 and HEVC Main 10).
2026-12-02 07:18:17 -08:00
Anees Iqbal 313d049cdd 🆕 Count each decoded picture handed the guest by its class
A report at the default level could not say what the guest's readers were
handed. The session's end line, which counts its pictures, is at info, and
with logs off the library writes warn alone. Only a session's first picture
that did not decode was said at warn.

Each picture a decode hands the guest is now counted in one of three classes,
from the session's own state, with no pixel read and nothing added to a
picture's path:
- video-pictures-handed-landed: it landed in its output;
- video-pictures-handed-failed: it failed to land, or its decode was refused
  at its take (its command buffer faulted);
- video-pictures-handed-undecoded: no decode ran for it, as a decode answered
  no picture (a stream entered at a P picture among them).
The counts are per process, in the degradation counts that reims-ctl report
asks for at any level. They are also per session, on the session's end line,
which now says how many decodes were refused at their take.

Nothing changes for the guest.
each_picture_handed_the_guest_is_counted_in_its_class holds the classes, and
docs/conventions.md lists the codes.
2026-12-02 07:18:17 -08:00
Anees Iqbal 927f2c41ec 🆕 Record an exported surface as the replay format's surface records
A recording held an exported surface's planes as two textures of the device's
own (newTextureWithDescriptor: of a descriptor marked outside the guest's
indices), and nothing of the surface itself: not its make, its exports or the
pictures the host's video landed in it. A player could not make the surface,
hand it to a stand-in for the other API, or replay its hand-overs, and the
planes read as never written.

The rt platform now records metal2vulkan's exported-surface family (its replay
format's "Surfaces and the guest's RAM", as of metal2vulkan abf7b8f873):
- m2v.newExportedSurface on the device, with the handle, the multiples and the
  planes, its result the surface;
- m2v.surfacePlane on the surface for each plane's texture;
- m2v.exportSurface at each export;
- m2v.surfaceWritesDone at each picture landed, with no bytes, as the stream
  holds none of the picture's;
- the surface's release, as its memory's last reference goes.
A surface over Direct3D 11 textures keeps the old form. The recorder's FIXES
list names the change (exported-surfaces), and docs/api.md lists the records.

Nothing changes for a process that does not record. Replaying the records needs
metal2vulkan's player at abf7b8f873 or later, which the pin does not hold yet.
on_vulkan_rt_an_exported_surface_is_recorded_as_the_replay_format_s checks
the records and their order on the GPU. The test that held the old form,
on_vulkan_an_rt_surface_s_planes_are_named_where_they_are_used, now checks
each plane's m2v.surfacePlane on the surface the make named.
2026-12-02 07:18:17 -08:00
Anees Iqbal 584d57e6c4 🐛 Issue a VA-API frame's processing runs once its decode is done
A frame written by video processing had its runs issued right behind its
decode, before the decode was waited for, resting on the driver to order a
run on another context after a pending decode of the surface it reads.
Nothing in va.h or va_vpp.h promises that, and va.h's own example of a
surface handed on waits for the decode first. The write now waits for the
decode, then issues the runs and waits for them, as runs_after_the_decode
orders it.

Its fake call-order test, a_frames_runs_are_issued_once_its_decode_is_done,
fails on the old order and passes on the new one (job m3-max-77975). The
hardware test that held the old order, now
a_write_asked_as_its_decode_is_issued_writes_what_it_decoded, checks that a
write asked while its decode runs still writes what it decoded.

For the guest, a reference picture's landing starts its copy one CPU round
trip after its decode ends instead of as the GPU finishes it; what lands is
unchanged. A failed decode is still copied, and its error is the frame's.
2026-12-02 07:18:16 -08:00
Anees Iqbal 3221bd66ad 🐛 Hold a decode until its output's earlier users on its queue end
A video session's decode writes its output off the device's queues as the host
walks the decode's command buffer, so the queue's order of its buffers' GPU work
did not hold it: a buffer of the decode's own queue that read the output,
committed before the decode and not yet finished, read the next picture or a mix
of the two (the video lane's hand-over table, row 15, and its harness's first
seed). The host waited on the CPU only for the other queues' buffers the
guest's order named.

Now each committed command buffer that used a device cache and held no video op
leaves a mark in the cache: for its queue, the value its queue's end event
reaches as it ends, and its value again where it may write the cache. Before a
decode writes a cache, it waits on the CPU for every queue's mark, its own
queue's among them; an encode, which only reads its source, waits for the
writers' marks alone. The queues' end events are shared events now, so the CPU
can read and wait on them (a recording names newSharedEvent where it named
newEvent for them).

The record is bounded at one mark a queue a cache: a queue's later buffer
replaces its mark, as the queue's end event reaches the later value only after
the earlier, and marks reached go at the queue's next mark, at each wait, and
for a queue gone at the sweep of its end event. A device recovery clears them.
A test fills one queue past that bound with three reads and shows the decode
waiting through the first two reads' ends for the third's.

Counted on the caches' summary line: the waits that found an end not reached,
the longest, and the other queues' uses found in flight then. Tests: the seed's
red test, a decode waiting for another queue's read it does not name, the bound,
and an encode held by a writer of its source and not by a reader.

What the guest sees: a decoded picture is no longer written under its own
queue's earlier reads of it. The residual, an output in the pages and no device
cache, which keeps no marks, is in docs/known-issues.md. Whether this fixes the
green frames the guest's screen recording was reported to make is not known: no
red recording has turned clean with it.
2026-12-02 07:18:16 -08:00
Anees Iqbal 1d848303c1 📝 Describe guest page imports as the code does them [ci skip]
docs/qemu.md's Linux mapping section, design.md's view room note and the
cold-device test's doc still named the deleted platform's probes and gate
(ONE_DMA_BUF, ONE_DMA_BUF_VIEWS, probe_fold, the import gate and HostRam).
They now say what the code does: rt answers each import at the call, its
first refusal of a view's dma-buf maps views from their files from then on
(views_need_files), NVIDIA's driver is refused on its 0x11 types and ANV by
rt's first-type rule at d8735b75f0, RADV takes the dma-buf, and an import
past the headroom or refused both ways is made over a copy. budget.rs and
vm.rs's unfold named the same deleted gate where the import is now copied.
2026-12-02 07:08:39 -08:00
Anees Iqbal 16f03734c9 📝 Say what bounds a surface block, and where planes go in place
RgfxSurfaceBlockShape.hpp gets the header the kext's others have: what a
copy block and a block in place hold, and the bounds that follow, a plane of
up to 4 GiB in place and of 256 MiB in a copy block. Its comment and its
test's messages said what changed ("existing", "original", "still") rather
than what the code does. design.md states the limits where it describes the
blocks in place, and that where every surface is cached the host keeps one
only within its device's maxBufferLength, as two boots on the Radeon 780M
showed (2 GiB in place; 2.15 to 4 GiB, a nil texture). Both prebuilt sets'
records take the header's new hash; the rebuild left their binaries as they
were (potluck m3-max-78425).
2026-12-02 06:47:37 -08:00
Anees Iqbal 2525fc4ac2 🐛 Charge a kept decoder by its pool's format and its own measured bytes
An idle epoch's 64 MiB bound charged each kept context 16 bytes a coded pixel
for each pool surface, twice Y412's eight and over ten times NV12's 1.5, so
no 4K decoder was ever kept (one surface's charge, 127 MiB, is past the
bound) and a 1080p one only with two surfaces. A kept context is now charged
its pool's surfaces at their format's bits a pixel, and its own allocations
at the 34,905,201 bytes DXGI's local count grew by for each 4K H.264 context
kept on the UHD 630 (m3-max-61642, in vaapi.md), scaled by its coded pixels.
A one-picture 4K session (context and two NV12 surfaces, 59.8 MB) is kept;
the bounds stay 16 contexts and 64 MiB.

The display counts the contexts taken back, and the cache's end logs the
count. The cache's hardware tests decode our own stream (target_check's
H.264, its level now sized to its picture, 240x144 still at level 3) instead
of an MP4 an environment variable named, and a measurement times one-picture
sessions at 720p, 1080p and 2160p with and without a cache. The lifecycle's
items, the idle bounds and the lock order are documented, the call thread's
taking the lifecycle gate inside the display's gate among them.
2026-12-02 06:47:28 -08:00
evanlau1798 c0d05f86f3 fix: retain bounded VA-API decoders between Windows sessions
Keep compatible idle decoder contexts under a device-owned epoch with entry and pixel-charge bounds. Serialize creation reservations with teardown dispatch, roll back failed creation, and drain retained resources when the final owner ends. Cover reuse, failure ordering, late frames and terminal cleanup.

(cherry picked from commit 2cb0352a4a)
2026-12-02 06:40:48 -08:00
Anees Iqbal 51be62538b 🐛 Wait out a fold in flight before an import looks at its pages
A fold of the views reads the imports' holds once, as it takes the views'
lock, then maps the runs no hold covers through dma-bufs. An import's hold
went into its table under no lock a fold holds, so a hold made while a fold
ran was missed: the import looked at where its pages lie before the fold
mapped them, found them mapped from their files, and handed rt their pointer,
which the fold then remapped as a VM_PFNMAP mapping. A driver that takes a
pointer's pages again once their mapping changed, as Intel's do (the fold
probe in docs/lessons.md), finds no pages there at the import's next use.

A hold now waits for a fold in flight once it is recorded, so the import's
look sees what that fold mapped and takes the dma-buf path, and a later fold
reads the hold. Folds run only at the views' budget, near vm.max_map_count,
or where the kernel refuses a map at its limit of mappings.

The test holds a fold in flight across an import's hold; with the wait taken
out it fails ("the import's look after its hold missed what the fold
mapped"), on homelab-um870-1 with udmabuf.
2026-12-02 06:10:00 -08:00
Anees Iqbal 7fafb7f9fb 🆕 Stamp the build's commit into reims-ctl and the library
A report could not say which builds it came from: reims-ctl's version was
the package's, and the library named its commit only where `cargo xtask
dist` set RVG_BUILD_COMMIT, so a QEMU or reims-ctl from another build than
the install's went unseen.

Each is now stamped at build time by a build script of its own, with no
new dependency: `git rev-parse HEAD`, `-dirty` where a tracked file of the
tree differs from it (Cargo.lock aside, which a build rewrites), and
`unknown` outside a checkout, never failing the build. The library's is
reims-vgpu-c's, handed to the Vulkan crate at the C API's first call, so
every build of it carries it, not only dist's; xtask's RVG_BUILD_COMMIT and
the recorder's own read of it go.

`reims-ctl --version` shows its stamp. The ask for the counts writes the
library's build line, `reims-vgpu: build <commit> on metal2vulkan <pin>`,
and system.txt's head names reims-ctl's stamp, the running library's as
the QEMU log names it, the install record's commit and the metal2vulkan
commit, with one plain line where the commits differ. Display only.
2026-12-02 06:10:00 -08:00
Anees Iqbal f2be18b911 🆕 Write a pacing line at the host's ask for the counts
A report of a slow app has said what degraded, not what held the app back:
the guest's own CPU work, the host's GPU, or the library's threads. At the
ask for the counts (rvg_write_counts, QEMU's x-write-counts), where the ask
before it was 2 to 60 s earlier, the library now writes one line over the
span between the two: each display's presents a second with the interval's
p50 and p99, the GPU's time per frame (p50, p99) and busy share from the
command buffers' GPU start and end times, merged where they overlap, and
the CPU of QEMU's vCPU threads, of ours by role (decoder, completion,
window, video, the rest by name) and of the rest of the process.

The state is fixed: a ring of 4096 shows per display and a few atomics for
the GPU, nothing allocated per frame. Thread times are read only at the
ask: /proc/self/task on Linux (with a table of the names Linux cuts at 15
bytes), task_threads and thread_info on macOS, a ToolHelp snapshot and
GetThreadTimes on Windows. rt gives no GPU times for its own command
buffers (uploads, fills, staging copies), for one that ended in an error,
nor for the host's video codecs; the line counts the ones without times.

reims-ctl report asks twice, 10 s apart, before vulkaninfo loads the GPU,
and its help, conventions.md and api.md say how to read the three
verdicts beside the guest's `top -o cpu -l 2`. A diagnostic: nothing
decides on it, the guest sees nothing new, and the C API gains no call,
so QEMU's side is unchanged.
2026-12-02 06:10:00 -08:00
Anees Iqbal ac5b41b2ed 🐛 Fail a buffer as internal where the platform refuses a host copy
What the guest observes changes. e00ce9ff74 failed a guest's command buffer
with MTLCommandBufferErrorOutOfMemory where the platform refused a copy the
host made for it: a fill or a copy into a wide home at its begin, rule 1's copy
into a plane's other shapes, or a copy between a cache and its wide home at an
encoder's end. Nothing ran short of memory there, and an app may answer
OutOfMemory by letting go of caches of its own, so that answer was wrong. Such a
buffer now fails with MTLCommandBufferErrorInternal; OutOfMemory stays on the
existing route, a cache's buffer whose memory the platform refused.

The platform's refusal of a command does not say why it refused, and copy()
answers a copy that made no view or staging piece the same way, so every
refused copy answers the internal error, and none is mapped to OutOfMemory.
Where one command buffer meets both kinds, the memory's wins.

The host's writers' fence update at a guest encoder's end, which those copies
wait for, now folds its answer too: refused, the copies could not wait for the
encoder's writes, so the buffer fails with the internal error, counted under a
code of its own, surface-fence-refused, since it is no copy. The compute
encoder answered nothing of its commands, so ComputeEncoder gains
update_fence, which answers Encoded as a blit or render encoder's command does,
and CommandBuffer gains fail_internal, which rt keeps as it keeps a skipped
dispatch's failure: the first failure set is the one the buffer ends with.

Two new tests pin the fence fold, for a blit and a compute encoder; the fill
and rule 1 tests now expect the internal error and no OutOfMemory, and the
refused-memory test no internal error. Red before (m3-max-78155: the four
failed, the memory test passed). Green after: the reims-vgpu fake set
(m3-max-78157, 1172 passed, 115 skipped), its surface, shape and command buffer
rt tests with rt's compute and command buffer tests on the 5080 (m3-max-78159,
48 passed), and reims-vgpu-vulkan's own (m3-max-78160, 789 passed, 1 skipped).
2026-12-02 06:10:00 -08:00
Anees Iqbal aaedba617b 🐛 Answer a download failed where the platform refuses its copy
What the guest observes changes. Before, each copy the host makes for itself
between a surface's device cache, its shapes, its wide home and its pages took
the platform's answer to each command with go_on(), so a refused one changed
nothing of the caches' state. A shape whose write-back was refused was marked
written back, a refused fill marked its shape filled and the cache at the new
generation, and a SURFACE_DOWNLOAD whose copy into the pages was refused was
answered RGFX_STATUS_OK over the pages' older bytes, and never copied again.

Now each such copy folds its commands' answers, by the ruling that keeps
today's behaviour for the guest's own commands alone, and a refused one, or an
encoder the platform made not, leaves what it was to move as not copied:

- A shape whose write-back was refused stays dirty, and one whose fill was
  refused owes it still. A refused fill of the buffer leaves the cache at its
  older generation.
- A download whose copy into the pages was refused, or that waits for a copy
  that landed short (a refused later round of one that circulates its pieces),
  is answered failed (RGFX_STATUS_REFUSED) through the driver's existing path,
  where it was answered OK on stale bytes before. The cache stays written, so
  the next download copies it again. A refused copy's pieces put none of their
  bytes into the pages.
- A fill or a copy into a wide home refused at a command buffer's begin, and a
  write's copy into its plane's other shapes or a copy between a cache and its
  home refused at its encoder's end, fails that command buffer with
  MTLCommandBufferErrorOutOfMemory, as a cache's refused memory already does.
- An early copy refused is not made, its command buffer not committed, and the
  refill it carried no longer marks the buffer as holding the pages; that also
  holds where the platform refuses a copy by runs, which left it so before.

The host tries none of these again by itself: the next use, download or
release that needs the copy makes it. Each refusal is counted under
surface-copy-refused, the process's first logged at warn. The guest's own
blits and draws still go on past a refused command.

No rt-refused or rt-unbuilt code shows in the degradation counts of the 30
latest kept boot logs, so no boot has reached these paths so far.

Five new fake-platform tests, red before (m3-max-78078, all five failed), pass
with the fix: the reims-vgpu fake set (m3-max-78128, 1170 passed, 115 skipped)
and its surface, shape and command buffer rt tests on the 5080 (m3-max-78131,
31 passed).
2026-12-02 06:10:00 -08:00
Anees Iqbal bc613120fd 🐛 Hold the window's last frame where part of a frame is refused
The platform may refuse a pass or a command of a draw with no death (rt
counts it and the command buffer still completes). The window went on past
such a refusal and presented what was recorded: a frame with the scanout's
blit, the colour's pass, the cursor's or the overlay's pass missing or cut
short, shown to the person at the host as if whole.

Now a frame of the window in which any pass or command was refused, the
cursor's, the overlay's and the overlay-over-black clear among them, is not
presented: nothing of it is committed, its presents are let go as at any
draw that shows nothing, and the window keeps its last complete frame. The
frame is counted under display-frame-refused, which the report's counts
carry, and the first is logged at WARN saying the window holds its last
frame. The next frame is drawn and judged afresh: no latch, no retry. A
colour's table whose draw is refused still answers for itself (the frame
takes the colour's pass and is presented), and the host's read of the
display already failed on a refused draw.

What changed for the host: a frame refused in part is no longer shown.

a_frame_the_platform_refuses_part_of_is_not_presented refuses the scanout's
copy, the colour's draw, the cursor's draw and the cursor's pass in turn on
the fake: red at m3-max-77985 (a refused copy's frame was presented), green
at m3-max-77996 (1164 passed, 115 skipped: the Vulkan and cost tests and the
seed-1 decode test).
2026-12-02 06:10:00 -08:00
Anees Iqbal 6ec9f5f87b 🐛 Draw the colour through its pass where its table's draw is refused
What the host's window shows changes. A colour with no matrix is drawn through
a table, which the colour's pass first draws into its own texture; the table
counted as drawn once a command buffer that drew it completed. Where the
platform refused the table's draw at encode (on the Vulkan platform,
metal2vulkan-runtime counts the refusal and the command buffer still
completes), the table held nothing drawn and was still taken as drawn: that
frame and every later one of the colour went through an undrawn table, its
contents undefined, until the colour changed.

Now the table's draw answers whether the platform recorded its pass and every
command (Encoded). Where it did not, that frame takes the colour's pass, the
same per-pixel draw a colour with a matrix takes, so the guest's colour still
shows. The refusal is kept in the table's one place, for its colour, what it
reads and the drawable's format, logged once and counted under the new code
display-table-refused, which the degradation counts report. Each draw for
those takes the pass with no table drawn, and the table is drawn again only
for another colour, read or format, or after the device's recovery. No frame
goes through a table whose draw was refused.

Red first: a_table_whose_draw_is_refused_takes_the_pass_until_the_colour_changes
failed on the tree before (job m3-max-77937: the frame went through the
refused table) and passes with this (job m3-max-77947, every fake test of the
display, the reads, the decoder, video_host and core). The Vulkan tests of
the table, on_vulkan_the_table_draws_what_the_pass_draws among them, now also
check that the table was drawn, and pass on the Iris Xe and the Radeon 780M
(jobs m3-max-77948, m3-max-77952).
2026-12-02 06:09:59 -08:00
Anees Iqbal 085a511242 🆕 Count a session's pictures whose cache copy was not made
A picture whose copy into its output's device caches the platform did not
make (no blit encoder for it, or a staging copy it refused) fails to land,
counted among a session's failures since the two commits before. It is now
also counted apart, as its own class: the session's end line says how many of
its failed pictures were such, so a report tells that class from a driver's
failure without a pixel read. The landing sets the class as its copy fails
(Stage's unmade, taken at each landing's failure) and the session counts it.

The two tests of those failures check the count:
a_copy_into_caches_the_platform_makes_no_blit_encoder_for_fails_the_landing and
a_staging_copy_into_caches_the_platform_refuses_fails_the_landing (job
m3-max-77893 at this content).
2026-12-02 06:09:59 -08:00
Anees Iqbal c86344623c 🐛 Fail a picture's landing where the platform refuses its copy
What the guest observes changes. Before, a staging copy of a picture into its
output's device caches that the platform refused recorded nothing and the
picture still counted as landed: metal2vulkan-runtime counts such a refusal
under rt-refused-<kind> and goes on, and the host's landing could not tell, so a
reader was handed the caches' earlier bytes, a new output's zeros, as the
picture. Now the copy answers an error, as a copy with no blit encoder does
since the commit before: its command buffer goes uncommitted, the picture fails
to land (its command buffer completes failed) and counts as a failure; an
encode's copy of its source out of the caches fails the frame. Its warn line
names itself a staging copy, so a log tells it from a guest blit's.

To tell, the platform's blit encoder answers whether it recorded each command:
BlitEncoder::encode returns Encoded, a type of its own in
core::platform::encoded, named for no encoder so another encoder's commands can
answer it later. The rt platform answers refused where it stopped the command
(Metal's refusal, an unbuilt piece, rt's own), the fake where its script answers
nil for it. Every caller takes the answer: Encoded is #[must_use] and the
workspace now denies unused_must_use, so an ignored one does not compile. The
guest's own blits and every other host copy keep today's behaviour exactly,
saying so with go_on(): a refused command is counted where it stopped and the
work goes on.

Red first: a_staging_copy_into_caches_the_platform_refuses_fails_the_landing
failed on the tree before (job m3-max-77886: the picture counted as landed) and
passes with this, with every video_host and graphics::decode test but the
own-queue seed test, red until its fix (job m3-max-77893, the last at this
content but for rustfmt).
2026-12-02 06:09:59 -08:00
Anees Iqbal cb9898918b 🐛 Fail a picture's landing where its cache copy has no encoder
What the guest observes changes. Before, where the host's video landing found
no blit encoder for its copy of a picture's staged planes into the output's
device caches, the copy was skipped and the picture counted as landed: its
value was signalled and the command buffer waiting for it completed as for any
landed picture, so a reader was handed the caches' earlier bytes, a new
output's zeros, as the picture, with no error to the guest. 7ca9d53fa4 made
that skip; this puts back the failure it replaced.

Now the copy answers an error, as an encode's copy out of the caches already
does: the landing fails through the path of any picture that did not land.
The planes owed zeros are cleared, the command buffer that waits for the
picture completes failed (Metal's internal error, which the guest's video
driver answers as a decode error), and it counts as a failure to land. The
warn line now says the picture does not land; the library's logger keeps it to
the process's first, the rest at debug, counted, as the docs say.

On metal2vulkan-runtime the case is not reached today: it refuses a blit
encoder only on a committed command buffer or one with another encoder open,
and this one is made the line before. The test changes with the behaviour:
a_copy_into_caches_the_platform_makes_no_blit_encoder_for_fails_the_landing
replaces ..._is_skipped.
2026-12-02 06:09:59 -08:00
Anees Iqbal fef583a53d 📝 Say that KWin maps no X11 window while every screen is off [ci skip]
The X11 route's proof on ms01 (m3-max-78242) showed no frame on the 3090 or
the Iris. The session was unlocked, but both screens were off (DPMS), and
KWin then keeps every new X11 window unmapped (_NET_WM_STATE_HIDDEN, no
WM_STATE): the library's, xmessage's and a bare SDL 3 window's alike.
SDL's X11_ShowWindow waits for MapNotify with no time limit, so the UI
thread stopped there before a swapchain was made. With the screens on, the
window showed a frame through X11 on both cards, at development and at
3731afd9b1 (m3-max-78332, m3-max-78336; um790's XTX and 780M, m3-max-78312).

The lesson that blamed the lock alone now names the screens, and the
desktop test's doc says its harness unlocks the session and turns the
screens on first. Nothing changes for the host.
2026-12-02 06:07:46 -08:00
Anees Iqbal 37af90950e 🐛 Leave the window system to SDL where the GPU presents to Wayland
09f166332e named Wayland to SDL wherever the window's GPU presents to the
compositor. That also covered compositors without fifo-v1 (cosmic-comp among
them), where SDL takes XWayland on its own. On those compositors it moved a
route that shows a window today, and it was never run on one.

The user's report needs a named window system only where SDL's own pick
cannot show a window: the GPU presents to the X server and not to the
compositor. Now X11 is named only there. Where the GPU presents to the
compositor, nothing is named and SDL picks as it did before 09f166332e:
Wayland, or XWayland where the compositor has no fifo-v1.

What changes for the host: on a Wayland compositor without fifo-v1, windows
open through XWayland again, as before 09f166332e, and the log's choice reads
"SDL's own pick". Nothing changes where the GPU does not present to the
compositor, or where the compositor has fifo-v1.

The window-system test's Wayland pairs now expect SDL's own pick. The register
entry and the C API doc say the same.
2026-12-02 05:41:22 -08:00
Anees Iqbal 5de45f1353 🎨 Offer a display's smaller modes at a Mac's external-4K steps
A display's smaller modes now follow the steps 7/8, 47/60, 3/4, 2/3, 1/2 and
3/8 of its first mode's width, in place of 7/8, 3/4, 1/2, 15/32, 5/12 and 3/8.
The guest sees a different list in Displays: a 3840 x 2160 window offers
3360 x 1890, 3008 x 1692, 2880 x 1620, 2560 x 1440, 1920 x 1080 and
1440 x 810 below its own, which is the list a Mac gives an external 4K
screen. Before, it offered 1792 x 1008 and 1600 x 900, near twins of
1920 x 1080, and not 2560 x 1440.

7/8, 3/4, 1/2 and 3/8 were read on our Mac's built-in panel. 47/60 and 2/3
come from a user's report and from what is known of the external-screen
list; no Mac of ours was read for them, and the comment says so. The mode
tests, the window's fill examples, the device's DISPLAYS answers and the
wire-2 peer trace are recomputed for the new steps: a 1280 x 800 screen now
lists four modes, 992 x 620 among them.
2026-12-02 04:39:59 -08:00
Anees Iqbal 9f19151665 📝 Describe a display's smaller modes in the docs [ci skip]
The design's display rule, the architecture's window and the README said a
display offers its guest one mode. They now say what it offers after the
window's pixels, where the steps come from, and that the window keeps its
size at a smaller mode and shows it scaled to fill it.
2026-12-02 04:39:58 -08:00
Anees Iqbal fb3108a832 🆕 Scale a frame of another size than its place to fill it
A display now offers smaller modes, and its window keeps its size at them,
so the window's draw must fill the window with a frame smaller than it. The
draw copied the scanout, and a BGRA8 surface, a guest pixel to a pixel at
the image's top left, clipped: a smaller mode showed in a corner.

One rule now draws what the display shows: a copy where the frame (the
scanout, or a presented surface in the drawable's format) is the size of
its place, the layout's region, and otherwise a draw of the display's
present shaders that samples it over the whole place, filtering linearly.
The scanout is sampled through a texture over its pixels in its pages'
import, in place, made at its first such draw and kept with the import
(made again after a recovery); a refused one keeps the window's frame and
counts as the display's refused view (display-view-refused), as a refused
view of a surface does. The colour's draw follows the same rule. The
host's read of the display (QEMU's console and screendump) draws with it,
so it shows a smaller mode scaled to the display's first mode.

What the host observes: at a smaller mode the window, and the read, show
the guest's frame filling the image's place; while a resized window waits
for the guest's next mode, the old one is scaled to the new place rather
than clipped. At the display's first mode every draw is the one it was,
and makes nothing more: a test holds it for the scanout, a BGRA8 surface
and WindowServer's 10-bit one, and others hold the sampled draws and the
refused texture; a GPU test holds that a 2 x 2 scanout and surface fill an
8 x 8 drawable on the Vulkan platform. The read's tests held the old draw,
a small scanout at the read's top left and the rest black: they now read a
scanout of the mode's size pixel for pixel, a smaller scanout scaled over
the whole read with its corners at the read's corners, and a smaller
surface drawn through the display's view of it, not copied.
2026-12-02 04:39:58 -08:00
Anees Iqbal a28f1a221c ⬆️ Move QEMU to the fork's tip with PR 22's Windows disk fixes
The fork's integration for the 12-02 PR order: PRs 21, 23, 19 and 22, the
credit merges of 20 and 14, and the fix-forward of the WHPX TSC probe and
MMIO lines. PR 22 is taken whole, as benched: on reims-ctl's Windows disk
path it stops a failed read from coming back as zeros with success and
a truncate from racing the pool's requests, both reproduced on the base.
A full host disk now pauses the VM, as it already does on Linux.

qemu.md's rows name the fork's commits by hash now that they are final.
2026-12-02 03:08:28 -08:00
Anees Iqbal 6fa16606fe 📝 Record the HiDPI crossing on x86-64 11.7.11 and 15.8.2 [ci skip]
The cursor's reading of a HiDPI display's rectangle in points held on
x86-64 11.7.11 and 15.8.2 as on 26.7.2: six reads of six on the display
under the host's pointer on each (m3-max-77845, m3-max-77851).
2026-12-02 02:46:27 -08:00
Anees Iqbal a7d2230a33 📝 Record an x86-64 guest's video with no paravirtual service [ci skip]
The control boot of the host that lists an x86-64 guest no paravirtual
decoder: x86-64 macOS 26.7.2 on a Radeon 780M lists AppleGVA's H.264 and
HEVC decoders and encoders again, decodes and encodes both on the host and
decodes HEIC's tiles there, and has no AV1 or VP9 decoder (m3-max-77840).
2026-12-02 02:46:27 -08:00
Anees Iqbal 62a38a75b5 📝 Say the cursor reads a HiDPI display's rectangle in points [ci skip]
The design said each framebuffer's getBoundingRect is its display's
CGDisplayBounds, which holds at 1x alone. The kexts read the second of the
two rectangles it points to, the one IOHIDSystem keeps as the display's
desktop rectangle, and that one is in points on a HiDPI display too:
x86-64 26.7.2 with one HiDPI display and one at 1x moved the cursor to
the points under the host's pointer, six reads of six (m3-max-77828).
2026-12-02 02:46:27 -08:00
Anees Iqbal 42ba8b4ed8 📝 Say why an x86-64 guest gets no paravirtual video
The docs said x86-64 macOS 26 takes AV1 and VP9 from the host through
VideoToolbox's paravirtual path. The host now lists an x86-64 guest no
paravirtual decoder or encoder, and the docs say what the boots with the
service published measured: H.264 and HEVC sessions taken off AppleGVA,
AppleGVA's H.264 decoder and encoder gone with AV1 and VP9 alone listed,
and every paravirtual session failing -19092.

The run under WHPX that the service was offered on is cited as the
contribution's, not measured here. Safari's sandbox rule for the service
is described rather than quoted, and the docs say that reims-ctl's VMs
hide the VM from kern.hv_vmm_present, so Safari there would be denied the
service until reims-util#4. The user-facing known issue says what an Intel
Mac guest gets for VP9 and AV1.
2026-12-02 02:46:27 -08:00
Anees Iqbal 2d2a277048 📝 Say which guests' VideoToolbox runs the paravirtual sessions
The paravirt module's row in the video docs and the VideoToolbox backend's
module doc named an arm64 guest alone. An x86-64 guest's VideoToolbox runs
them too, for AV1 and VP9 decodes alone, as the host lists it.
2026-12-02 02:46:27 -08:00
Anees Iqbal 539e3630f2 📝 Record two traps of a window that never shows [ci skip]
A GPU's Vulkan driver can present to a session's X server and not to its
Wayland compositor, and a Wayland window never presented to never appears:
a user's NVIDIA laptop GPU under KWin showed only a task bar entry while the
start said its window was open. The lab's RTX 3090 presents to both, so the
lab could not make that state.

A window proof through X11 on a locked Plasma session cannot pass: KWin
holds every X11 window there unmapped, and SDL's X11 window waits for its
MapNotify inside SDL_ShowWindow, so the window's thread stops until the
desktop is unlocked. The next lane reading such a run should look at the
lock before the code.
2026-12-02 02:33:01 -08:00
Anees Iqbal 09f166332e 🐛 Open the window through a window system its GPU presents to
A laptop's NVIDIA GPU beside the Intel GPU KWin composites on presented to
X11 and not to Wayland (a user's report: its Wayland surface was not
presented to, its XCB and Xlib surfaces were). SDL opened the window through
Wayland, the swapchain was refused, and the window never appeared: Wayland
maps a window only once a frame is presented to it, so its task bar entry
alone showed.

Before SDL's video starts, the GPU of the first window's sink is now asked,
with no window, whether it presents to the session's Wayland compositor,
and where it does not, to its X server: Vulkan's per-platform
presentation-support questions, over connections the window crate makes and
closes. The windows open through Wayland where it presents to the
compositor, else through X11 (XWayland under a Wayland compositor) where it
presents to the X server, and where it presents to neither, no window opens
and the guest runs headless. A named Wayland also holds where the
compositor has no fifo-v1 and SDL would take XWayland on its own.

Each window also tells QEMU's stderr once whether it shows: "reims-vgpu:
window shown: display N" at its first frame presented, or "reims-vgpu: no
window: <why>" where it stays empty, or where no window opens because the
GPU presents to neither window system. reims-ctl reads them to say whether
a VM's window is open.

The sink is attached before the host's screens are asked for, so the first
window's attach starts the UI thread with its GPU.
2026-12-02 02:33:01 -08:00
Anees Iqbal 9a14d0e8c6 📝 State the pool's host-memory form as GPU memory's one exception [ci skip]
"GPU memory is the runtime's" had no word of PR 178's form, where the
pool's blocks are memfds of the library's own that rt imports as dma-bufs,
under Linux's KVM on arm64 without KVM_CAP_ARM_CACHEABLE_PFNMAP_SUPPORTED.
conventions.md and architecture.md now state it as the rule's one
exception, rt's existing import with no new form, and its known gap: built
and unit-tested here, run only by its contributor, no lab host of its kind,
speed not measured by us. qemu.md's arm64 part says the same, and its
table names the fork's change by what it does rather than by a commit only
in the contributor's fork.
2026-12-02 02:32:58 -08:00
Anees Iqbal df67517752 🐛 Refuse a pool of host memory at the start where the GPU refuses it
PR 178's pool blocks of host memory were found refused only at the guest's
first take, logged once by a flag of its own and counted nowhere, and the
device's start said nothing of which form its pool's blocks took.

For the host: where pool_host_memory is 1 and the device has a pool, its
start imports one 64 KiB block of host memory and gives it back. Where the
GPU refuses it (NVIDIA's driver, by rt's rule for dma-bufs, or a Linux host
without udmabuf), rvg_graphics_device_create answers RVG_ERR_HOST_RESOURCES
with one warning, and never maps the GPU's own memory, which that
hypervisor refuses. The pool's start line now ends with its blocks' form
("its blocks are the GPU's own memory", or host memory the GPU imports, or
the process's own memory), so a log shows which form ran. A take refused
later is counted (pool-host-memory-refused), the first of each cause logged
by the logger's kind. The field's doc in the header states it as the host's
fact, found by asking the hypervisor alone; its name stays, as QEMU's fork
sets it by that name. A take past one dma-buf's bytes (udmabuf's
size_limit_mb, 64 MiB stock) needs rt's dma-buf granule, now said, and
tested with a take of 64 MiB and 64 KiB: several dma-bufs at the stock
limit, one where the host raised it.

Nothing changes where pool_host_memory is 0, every host but QEMU under
Linux's KVM on arm64: the_pool_s_blocks_are_the_gpu_s_memory_unless_the_
host_s_hypervisor_maps_none holds the default. The rt tests print and
return where the GPU imports no host memory, where the unwrap panicked.
docs/api.md's INVALID_ARGUMENT row names the 1 on macOS and Windows, which
make no such blocks, and its HOST_RESOURCES row the GPU's refusal.
platform/rt.rs keeps its OS cfgs to two whole items.
2026-12-02 02:32:48 -08:00
Anees Iqbal 6ed6547738 🐛 Read Linux hosts' memory below 4 GiB, down to 64 KiB
PR 191 gave Windows its own zero region end, and left Linux with macOS's:
4 GiB, arm64 macOS's __PAGEZERO. On a Linux host a mapping may lie
anywhere above vm.mmap_min_addr, 64 KiB on stock x86-64 distributions, so
an upload or a buffer's bytes at a host address below 4 GiB died there as
a near-NULL read, as Windows' did.

For the host: on Linux, a texture upload or a buffer made with bytes reads
host memory from 64 KiB up, where it died below 4 GiB. macOS keeps 4 GiB,
Windows 64 KiB. The constant's docs now say each host's fact, and Linux
gets copies_bytes_from_below_four_gib too: a page the test maps below
4 GiB, at 64 KiB where the host lets it, is read.
2026-12-02 02:32:48 -08:00
Anees Iqbal 526bdf6633 ✅ Run reims-ctl's checks with one make target
Does what PR 130 asked for: one command for the checks of reims-ctl, whose
workspace cargo xtask check does not reach. PR 130 routed it through the
library's xtask, which builds in the library's workspace and so fetches
metal2vulkan, that reims-ctl's workspace is kept apart from, and it ran
neither reims-restore's workspace nor the Windows clippy, the one check on
the Mac or Linux that sees a break of their Windows build (docs/lessons.md).

`make check-ctl` runs, by each workspace's own manifest, in crates/reims-ctl
and in crates/reims-restore (a workspace of its own, with reims-apfs):
rustfmt, clippy, clippy for x86_64-pc-windows-gnullvm with MinGW's gcc and ar
for ring's C, and the tests, clippy with -D warnings and each with
--workspace; the cheapest first, stopping at the first failure. Where
x86_64-w64-mingw32-gcc or -ar is not on the PATH it says so and fails before
any step, never skipping the Windows clippy; on Windows itself the host's
clippy is that check, and it says so. The Makefile's header,
docs/development.md and AGENTS.md's reims-ctl row (now naming reims-restore
too) name the target, and the lesson on reims-ctl's Windows build says what
it catches.
2026-12-02 02:16:38 -08:00
Anees Iqbal 643f330e37 📝 Say what usb-redir is in the Windows QEMU build for [ci skip]
PR 200 builds QEMU on Windows with its usb-redir device, from MSYS2's
usbredir, and docs/qemu.md said only what the device is. It now says why it
is there: so that a program on the host speaking the usbredir protocol can
give a VM a USB device of the host's on Windows, where reims-ctl passes none
through (its USB passthrough is for VMs on Linux hosts); that reims-ctl
attaches nothing through it yet, no VM it starts having the device; and that
the install stops where the QEMU it staged lists no usb-redir. install-ctl.sh's
comments on the Windows configure line and on its MSYS2 packages say the
same. Nothing changes for the user.
2026-12-02 02:16:38 -08:00
Anees Iqbal c2268ad9a0 📝 Say that arm64 VMs run emulated on Windows, and who ran one
PR 203 lets an x86-64 Windows PC run arm64 VMs, under TCG as on x86-64
Linux, and left README.md, docs/qemu.md, host.rs and install-ctl.sh saying
Windows runs none. They now say it runs them emulated, much slower than an
arm64 host, and that the one run so far is the PR's contributor's report:
macOS 27.2.1 (26B131) restored, finished and booted to its desktop on Windows
11, on an Intel Core i7-12700H with an RTX 3060 Laptop GPU. The lab has run
none there. README's Windows install time is marked as measured before the
install also built QEMU for arm64 VMs and reims-restore; docs/qemu.md's
Windows install lists both QEMU binaries and reims-restore; the vmapple RAM
backend on Windows gets q35's comments; and install-ctl.sh's refusal on
other hosts names Windows among the arm64 VMs' hosts.

install-ctl.sh now lists each host's QEMU targets in QEMU_TARGETS, one entry
per target, and derives the binaries and --target-list from it, so that the
arm64 VMs' aarch64-softmmu build, like the reims-restore step, can be built
apart from the x86-64 one: the configure line and binaries each host gets are
unchanged (compared on all four platforms).
2026-12-02 02:16:38 -08:00
Anees Iqbal 55fd4b876f 🐛 Start EACS's leftover-request count over with the restored disk
PR 197 counts, in eacs-again, the first boots that made the Data volume but
left EACS's request on Preboot. start_again, which puts the restore's disk
back after a first boot whose EACS failed, kept that count, so the boots that
left the request on a disk since replaced still counted against the new one:
finish-eacs could ask for a new restore after fewer than 3 such boots of the
restored disk. start_again now removes eacs-again with the disk it replaces,
and finishing_eacs_after_a_failed_first_boot_starts_the_vm_again holds it.

The texts that promised Setup Assistant at the next start after finish-eacs
now say it can ask for one more first boot first: reims-ctl create's step
left, its help, reims-restore's own help and closing line, README.md and
docs/qemu.md. For the user, create's line now begins "the VM's first boot is
left" in place of "one step is left".
2026-12-02 02:16:38 -08:00
Anees Iqbal d8eb793cef 🎨 Give a qcow2 disk a fixed L2 cache limit of 32 MiB
PR 193 sized an x86-64 VM's qcow2 L2 cache from the image's header, which
invocation() read from disk: an untested path (its tests named disks that do
not exist), with clippy hits and an assumption of 8-byte L2 entries. QEMU
already takes the smaller of l2-cache-size and what the image's size needs
(block/qcow2.c, read_cache_sizes), so a fixed l2-cache-size=32M gives the same
cache with no read: 16 MiB for a new 128 GiB disk of 64 KiB clusters, where
QEMU's own limit on Windows is 8 MiB (64 GiB of the disk). On Linux 32 MiB is
QEMU's limit already.

For the host: every qcow2 system disk now carries l2-cache-size=32M, whatever
its size, and a raw one none; a_qcow2_disk_has_an_l2_cache_of_up_to_32_mib
holds it on each controller, on Linux and Windows. The comment on the virtio
disk and docs/qemu.md now say what PR 193 gave it: NVMe's discard=unmap and an
iothread of its own, where the docs said it had neither; the one virtio boot
measured ran before both.
2026-12-02 02:16:38 -08:00