Bundle qboot for x86-64 - #13
Merged
Merged
Conversation
qboot is the firmware for QEMU's `microvm` machine type, which a guest can be booted on with no boot loader, no PCI bus and no ACPI. That is worth a few seconds of every job's startup, and it needs a firmware this tarball doesn't carry. `-kernel` reads like a way around the firmware and isn't one: QEMU stages the kernel and publishes where it starts, but something running in the guest still has to jump there, and on this machine type that is qboot. qboot is also what leaves an MP table behind, which is the only place a guest configured without ACPI can read the machine's CPUs and interrupt routing from -- NetBSD 11's MICROVM kernel, the first consumer, is configured exactly that way. Handed bios-256k.bin instead, it never starts and says nothing about why. It is prebuilt in QEMU's own pc-bios directory, so it is copied from the same tree the binary is built from and can't disagree with it.
jacob-carlborg
force-pushed
the
claude/netbsd-11-microvm-kernel-wsrfrg
branch
from
August 13, 2026 18:19
e47908e to
7c879f4
Compare
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.
Adds
qboot.romfrom QEMU'spc-biosto theqemu-system-x86_64tarball, so aguest can be booted on QEMU's
microvmmachine type: no boot loader, no PCI busand no ACPI, which is worth a few seconds of every job's startup.
-kernelreads like a way around the firmware and isn't one. QEMU stages thekernel and publishes where it starts, but something running in the guest still
has to jump there, and on
microvmthat is qboot. qboot is also what leaves anMP table behind, which is the only place a guest configured without ACPI can
read the machine's CPUs and interrupt routing from -- NetBSD 11's
MICROVMkernel, the first consumer, is configured exactly that way. Handed
bios-256k.bininstead, such a guest never starts and says nothing at allabout why.
It is prebuilt in QEMU's own
pc-biosdirectory, so it is copied from the sametree the binary is built from and cannot disagree with it. The qboot version
does matter: the smolBSD project carries its own copy specifically to work
around qboot smashing its stack in QEMU 9.0 and 9.1.
Measured
Booting NetBSD 11.0 x86-64 on
microvmwith this firmware, against the sameimage booted the way it is today (firmware, boot loader, PCI):
Disk over virtio-mmio, network over virtio-mmio,
vioif0configured androuting, and an SSH login: all confirmed on a freshly built image.
Not included: pvh.bin
QEMU also ships
pvh.bin, the option rom that performs the PVH handover on themachine types whose firmware can't do it themselves — it is what makes
-kernelwith a PVH ELF work onq35, for instance. It is deliberately leftout. It is not needed on
microvm, where qboot does the handover, and whileQEMU otherwise probes for it and logs
rom: file pvh.bin: error Failed to open fileon every boot when it is absent, that probe does not happen when optionroms are disabled — which is what the consumer passes
(
microvm,…,x-option-roms=off). Verified against this QEMU build both ways.Tests
test.rbasserts the exact set of files in each tarball, so the new name isadded there.
Consumer
cross-platform-actions/actiondecides whether it can take the fast path bylooking for
share/qemu/qboot.romnext to the kernel its image bundle carries;with either file missing it boots the way it does today. So this can land and be
released on its own, and nothing changes for anyone until the action's pinned
resourcesversion is bumped.