Repository navigation
qemu, boot: a test for each carried QEMU and qboot patch - #481
Merged
Merged
Conversation
aledbf
force-pushed
the
guard/qemu-patches
branch
from
November 22, 2026 06:24
47ccdef to
1f879cb
Compare
A patch dropped at a QEMU or qboot bump, or rebased so that it applies and does nothing, still built and booted, and nothing said so. verify args now asks the TCG QEMU what 0001-0004 do, with no guest (TestEachQEMUPatchDoesItsJob): the flat views built from QEMU's start to its first answer (163 with 0001, 429 without), a disk beyond max_target refused, a save's stop submitting no io_uring flush under x-defer-disk-flush and one without it, and query-blockstats without parent and backing under x-flat. It runs on every push against the published QEMU (ci.yml) and on every QEMU parts.yml builds. boot:patches asks a guest of spin's shape what only it sees: its SCSI host refuses a scan past max_target (0002), qboot enabled the MTRRs (mtrr.patch), and a guest restored 650 ms ahead of its new vCPU's TSC goes no more than 200 ms without a line (0005, #472): 625 ms on v20261122.01, 12 ms on v20261122.02 (labs 44993011539, 44993011448). compat runs it beside boot:record. Each guard failed on a QEMU without its patch (parts runs 44994258922, 44994262948, compat 44994262935). Taken back alone, 0001 read restored +11.7 [+0.9, +19.3] (lab 44993254745); pam.patch and no-pci-walk.patch read cold +3.9 [-3.4, +8.0] and +5.2 [-1.7, +9.2] at 40 boots (lab 44993790452), kept by rule 5. qemu/README.md, qemu/qboot/README.md, docs/boot-time.md and the qemu and qboot bump notes say what holds each. Closes #472. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aledbf
force-pushed
the
guard/qemu-patches
branch
from
November 22, 2026 06:47
23b5332 to
c7610f8
Compare
aledbf
marked this pull request as ready for review
November 22, 2026 06:48
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The machine meets its restore goal and is much faster cold, so the work now is keeping it that way. Every patch the tree carries should be held by a test that fails when the patch is lost or stops doing its job. Before this change, a QEMU or qboot patch dropped at a bump, or rebased so that it applies and does nothing, still built and booted, and nothing said so.
patch --fuzz=0refuses only a patch that no longer applies. #472 asked for this for 0005.What
verify argsasks the TCG QEMU what 0001-0004 do, with no guest (TestEachQEMUPatchDoesItsJob,machine/qemu_patches_test.go). It runs on every push against the published QEMU (ci.yml) and on every QEMU parts.yml builds.max_targetis refused.x-defer-disk-flushand none with it. The first case proves the trace sees the flush.query-blockstatshas noparentorbackingunderx-flat, and has them without it.boot:patchesasks a guest of spin's shape what only a guest sees (boot/patches_test.go). compat.yml runs it besideboot:record, and lab.yml offerscheck:patches.mtrr.patch./proc/mtrrhas the PCI hole uncachable.qemu/README.mdgets "The patches", a table of what each patch does, what it earns and what holds it.qemu/qboot/README.mdgets "What holds each patch".docs/boot-time.mdsplits QEMU 0001 frompam.patchand gains a paragraph on what holds each patch.docs/log.mdgets the entry. The qemu and qboot notes inversions.yamlname the checks a bump runs.Proof
verify args)verify args)boot:patches)boot:patches)Measured alone
These are bench runs in spin's shape with
prestart, against main's QEMU from parts run 44989641652.pam.patchback: cold +3.9 [−3.4, +8.0]. Takingno-pci-walk.patchback: cold +5.2 [−1.7, +9.2]. Both at 40 a side (lab 44993790452). Both are inside the noise, but the upper bounds are over +5 ms, so rule 5 of docs/measuring.md keeps them.Gates:
go tool task lint test mutatepass locally (coverage 80.5%, 0 survived).Closes #472. The kernel's half is #478.
🤖 Generated with Claude Code