feat: add microvm kernel flavor for Firecracker sandboxes (CORE-79) - #18
Merged
Conversation
…es (CORE-79) Dedicated guest kernel config for the sandbox microVMs that run nested inside the System VM. Replaces the stock Firecracker CI kernel (built to run their test matrix, not to boot fast): virtio-mmio device model only, no PCI/ACPI/EFI/netfilter/BPF/audit, HZ=100 + PREEMPT_NONE (nested ticks are expensive), static ip= only, ext4 only, everything built in. Load-bearing keeps: DEVTMPFS_MOUNT (the sandbox template rootfs ships an empty /dev), UNIX98_PTYS + devpts (vm-agent PTY sessions), vsock, IP_PNP, PL031 + RTC_HCTOSYS (cold-boot wall clock), ptp_kvm (CORE-75 post-restore resync), VMGenID (restored-clone RNG reseed), IKCONFIG for forensics. NETDEVICES/NET_CORE and VIRT_DRIVERS are stated explicitly: they are not default-on, and omitting them makes olddefconfig silently drop VIRTIO_NET and VMGENID respectively.
…RE-79)
build-kernel.sh grows a FLAVOR dimension (system|microvm, default system —
existing invocations unchanged): flavor resolves the config file, the
output name (microvm-kernel-{arch}) and the post-olddefconfig assertion
set. The microvm assertions pin the Firecracker sandbox contract
(virtio-mmio/blk/net/vsock, DEVTMPFS_MOUNT, IP_PNP, PTYs, ext4, PL031,
ptp_kvm, VMGenID) and that the cut subsystems (PCI, netfilter, modules,
ACPI, EFI) stayed cut. Both the native and Docker paths share one flavor
resolution; the assertion lists are interpolated into the Docker script.
CI matrix gains an arm64 microvm job; releases now attach
microvm-kernel-arm64 (+ .sha256) next to the system kernels. The
boot-assets repository-dispatch hook is untouched. microvm is arm64-only:
Firecracker x86_64 boots an ELF vmlinux and needs its own config.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Greptile SummaryAdds an arm64-only microVM kernel flavor optimized for nested Firecracker sandboxes while preserving the existing System VM build behavior.
Confidence Score: 5/5The PR appears safe to merge because no concrete changed-code failure was established. Flavor selection, native and Docker output paths, CI artifact names, checksums, and release packaging remain internally consistent, while unsupported x86_64 microVM builds are rejected explicitly.
|
| Filename | Overview |
|---|---|
| configs/arcbox-microvm-arm64.config | Adds the minimal arm64 Firecracker guest configuration with built-in boot, storage, networking, PTY, clock, and snapshot-related support. |
| scripts/build-kernel.sh | Adds validated flavor resolution while retaining the existing System VM config, assertions, and artifact naming by default. |
| .github/workflows/build.yml | Extends the build matrix and release assets with a distinct arm64 microVM artifact. |
| scripts/package-release.sh | Includes the microVM binary and checksum in local release packaging without changing existing artifact names. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Build invocation] --> B{FLAVOR}
B -->|system| C[System config for selected architecture]
B -->|microvm + arm64| D[MicroVM arm64 config]
B -->|microvm + x86_64| E[Reject unsupported combination]
C --> F[olddefconfig and system assertions]
D --> G[olddefconfig and microVM assertions]
F --> H[kernel-arm64 or kernel-x86_64]
G --> I[microvm-kernel-arm64]
H --> J[Release assets]
I --> J
Reviews (1): Last reviewed commit: "feat(build): build the microvm flavor al..." | Re-trigger Greptile
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.
What
Adds a second kernel flavor,
microvm: a dedicated minimal guest kernel for the Firecracker sandbox microVMs that run nested inside the System VM. Today the sandboxes boot the stock Firecracker CI kernel (vmlinux-6.1.155, pulled verbatim from their S3 CI bucket by boot-assets) — a kernel built to run their whole test matrix, which costs ~1.7 s from kernel entry to/sbin/vm-agentunder nested virt. Target class for this config: 200–300 ms.configs/arcbox-microvm-arm64.config— new fragment, sameolddefconfigstyle as the System VM config. Firecracker aarch64 device model only (virtio-mmio via DT, 16550 ttyS0, PL031, GICv3/PSCI). Cut vs. the FC CI kernel: PCI/ACPI/EFI, netfilter/conntrack, NFS/SUNRPC/XFS/SquashFS/overlayfs, audit, BPF, NUMA, swap/hibernation/PM, VT/INPUT/USB/HID, lockup detectors, DHCP/BOOTP autoconf. Load-bearing keeps:DEVTMPFS_MOUNT(sandbox template rootfs ships an empty /dev), Unix98 PTYs (vm-agent PTY exec), vsock, staticip=(IP_PNP), ext4, PL031+RTC_HCTOSYS(cold-boot wall clock),ptp_kvm(CORE-75 post-restore resync), VMGenID (restored-clone RNG reseed), IKCONFIG.scripts/build-kernel.sh—FLAVOR=system|microvmdimension (defaultsystem; existing invocations unchanged). Flavor resolves config file, output name, and a per-flavor post-olddefconfigassertion set; the microvm set also asserts the cut subsystems stayed cut. Native and Docker paths share one flavor resolution..github/workflows/build.yml— matrix gains an arm64 microvm job; tag releases attachmicrovm-kernel-arm64(+.sha256) next tokernel-arm64/kernel-x86_64. Thekernel-releaserepository-dispatch to boot-assets is untouched.The System VM flavor is not modified in any way — same config, same artifact names, same assertions.
microvm is arm64-only for now: Firecracker x86_64 boots an ELF
vmlinux(not a bzImage) and needs its own config (VIRTIO_MMIO_CMDLINE_DEVICES, kvmclock), so x86_64 sandboxes stay on the FC CI kernel via boot-assetsupstream.toml.Merge order (cross-repo release train)
v0.0.23) → CI publishesmicrovm-kernel-arm64+ sha256.vmlinuxupstream pin to that release URL) — confirm the tag in its URL, then merge →sync-binariesuploads to the CDN; the next boot-assets release embeds the sha256 intomanifest.json.assets.lockbump (+ daemon rebuild; the lock is compile-time-embedded) — out of scope here. The sandboxboot_argscleanup (quiet loglevel=1, droppci=off) rides that change.Rollback at any point = revert the boot-assets
upstream.tomlpin (CDN version keys are immutable).