23. What a microVM deletes
Why this layer exists
Chapter 22 ended with a VMM that serves one device to one guest: a C program, one virtio-mmio block window, a RAM disk, one thread, no interrupts. That is a lab, and a host that earns its keep does not look like it. A host that runs thousands of guests needs each one to be cheap to start, small while it sits there, and contained when it turns hostile. The Firecracker paper puts the scale in one sentence: “Modern commodity servers contain up to 1TB of RAM, while Lambda functions use as little as 128MB, requiring up to 8000 functions on a server to fill the RAM” (§2, p. 421). At that count a fixed cost per guest is multiplied by thousands: the paper measures about 131 MB of VMM overhead for QEMU (§5.2, p. 429), and 8000 times 131 MB is about a terabyte, the machine’s whole RAM again. A guest that can escape into a VMM of more than 1.4 million lines of code (QEMU, §1, p. 420) is a fleet-wide incident.
The answer this part builds is the microVM: keep the hardware boundary that chapters 18 to 20 built, and delete the machine around it. The guest is still a kernel running under KVM, with its own page tables and its own privilege levels. What disappears is everything a PC has that a kernel merely tolerates: the firmware, the legacy chips, the buses that discover devices, the emulated controllers. A VMM with fewer devices has fewer decodes to get wrong (chapter 21) and fewer parsers of guest-controlled memory (chapter 22). wick, the Rust VMM this part builds, is cut the way Firecracker is cut. hearth goes further and deletes the host kernel as well, which is why this chapter ends by asking what is left of its figure.
The chapter reads that cut: what the paper says was deleted and why, what the source tree at its pinned tag says is there now, and which of those wick keeps. No code is written. The vocabulary defined here (microVM, one process per guest, API thread, VMM thread and vCPU thread, minimal device model) is what chapters 24 to 28 use without defining again, and the Walkthrough’s list is the contract for what wick will and will not implement.
Mechanism
Sources, with the date each was fetched (UTC): the NSDI 2020 paper, Agache et al., read from https://www.usenix.org/system/files/nsdi20-paper-agache.pdf (2026-10-02T01:15Z); Firecracker at tag v1.15.1, https://raw.githubusercontent.com/firecracker-microvm/firecracker/v1.15.1/…, and the directory listings of src/vmm/src/ at that tag from the GitHub contents API (same fetch); Cloud Hypervisor at its latest release tag, v53.0 (published 2026-07-12), https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/v53.0/…. Paper page numbers are the proceedings’ printed ones, 419 to 434, not the PDF’s page index. A quote is verbatim; where the extracted text carries a ligature (fi) it is written as the two letters. The paper is from 2020 and Firecracker has changed since, and where the two disagree this chapter says which one it is reading.
Four terms
A microVM is a KVM guest whose monitor provides only what a Linux guest needs to boot and do block, network and console I/O. The paper’s own phrasing: Firecracker “uses the Linux Kernel’s KVM virtualization infrastructure to provide minimal virtual machines (MicroVMs)” (§3, p. 422). The word names a trade, not a size: the hardware boundary stays (a guest is a full kernel, with its own address spaces, “allowing all kernel features to be used”, §2.1, p. 421), and the platform emulation goes.
One process per guest is the unit of everything else. docs/design.md (line 71): “Each Firecracker process encapsulates one and only one microVM.” The paper adds what that buys: “One Firecracker process runs per MicroVM, providing a simple model for security isolation” (§3, p. 422), and what it declines to build: the process model “means that it doesn’t offer VM orchestration, packaging, management or other features — it replaces QEMU, rather than Docker or Kubernetes, in the container stack” (§1, p. 420). Scheduling, memory pressure and accounting between guests are the host kernel’s job: “we pass block IO through to the Linux kernel, depend on Linux’s process scheduler and memory manager for handling contention between VMs in CPU and memory, and we use TUN/TAP virtual network interfaces” (§3, p. 422). A TAP is a virtual Ethernet interface a process reads and writes frames on through a file descriptor; it is how a VMM’s guest NIC meets the host’s network, and chapter 25 builds one.
The process runs three kinds of thread, and the figure above is their picture. docs/design.md (lines 71 to 79):
// firecracker v1.15.1, docs/design.md:71-79
Each Firecracker process encapsulates one and only one microVM. The process runs
the following threads: API, VMM and vCPU(s). The API thread is responsible for
Firecracker's API server and associated control plane. It's never in the fast
path of the virtual machine. The VMM thread exposes the machine model, minimal
legacy device model, microVM metadata service (MMDS) and VirtIO device emulated
Net, Block and Vsock devices, complete with I/O rate limiting. In addition to
them, there are one or more vCPU threads (one per guest CPU core). They are
created via KVM and run the `KVM_RUN` main loop. They execute synchronous I/O
and memory-mapped I/O operations on devices models.
The API thread serves a control socket and owns nothing the guest can see. The VMM thread owns the devices and the machine’s configuration. A vCPU thread is chapter 20’s loop: it calls KVM_RUN, and when the guest leaves for a reason the kernel cannot handle it gets a VM exit (chapter 20) and either answers it itself (a port or an MMIO access that a device model decides) or tells another thread. Which of the two a VMM chooses for a device is where VMMs differ. In Firecracker the vCPU threads run the synchronous accesses, as the quote says. wick draws the same line: the vCPU thread answers port and register accesses on the bus, and a virtio doorbell reaches the VMM thread through an eventfd (a kernel counter a thread can block on and another can signal; the reverse path, an interrupt into the guest, is an irqfd, an eventfd that KVM turns into an injected interrupt, which chapter 24 builds), which is why the arrows in the figure are labelled the way they are. Cloud Hypervisor divides the work differently: it “spawns dedicated threads for virtual CPUs, virtio devices and HTTP server, along with the main thread representing the VMM” (docs/seccomp.md, lines 15 to 17). Three threads is Firecracker’s shape and wick’s, not a law.
A minimal device model is a policy: a device is in only if the workload needs it, and everything else is not emulated at all. The paper’s list is short: Firecracker “provides a limited number of emulated devices: network and block devices, serial ports, and partial i8042 (PS/2 keyboard controller) support”, where “QEMU is significantly more flexible and more complex, with support for more than 40 emulated devices, including USB, video and audio devices” (§3.1, p. 423). The policy has teeth because of what a model costs, and the paper prices it: “the i8042 driver is less than 50 lines of Rust, and the serial driver around 250” and, of the block device, “The entire virtio block implementation in Firecracker (including MMIO and data structures) is around 1400 lines of Rust” (same page). The same list is longer at the pinned tag (vsock, balloon, rng, mem and pmem are directories under src/vmm/src/devices/virtio/), because a policy decided per workload moves when the workload does. The Walkthrough reads the list at v1.15.1, not the paper’s.
What the paper set out to do
The paper names six properties of the solution it wanted (§2, pp. 420 and 421): Isolation, Overhead and Density, Performance, Compatibility, Fast Switching, Soft Allocation. Density, the one this part cares about, is stated first as a requirement: “It must be possible to run thousands of functions on a single machine, with minimal waste.” The headline results, from the introduction: “With the provided minimal Linux guest kernel configuration, it offers memory overhead of less than 5MB per container, boots to application code in less than 125ms, and allows creation of up to 150 MicroVMs per second per host” (§1, p. 420). The repository restates the first two as a promise on an AWS metal instance: for a guest with “1 CPUs and 128 MiB of RAM”, the VMM threads’ memory overhead is “<= 5 MiB” and the time from InstanceStart to the guest’s /sbin/init is “<= 125 ms” (SPECIFICATION.md, lines 25 to 39), and docs/design.md (lines 26 to 29) states a third rate in different units: “a steady mutation rate of 5 microVMs per host core per second (e.g., one can create 180 microVMs per second on a host with 36 physical cores)”. The two creation rates come from different documents, hosts and configurations, and this chapter uses neither as a target. What the paper measured, on an EC2 m5d.metal (two Xeon Platinum 8175M, §5, p. 427): about 3 MB of VMM memory overhead for Firecracker, about 13 MB for Cloud Hypervisor and about 131 MB for QEMU (§5.2, p. 429), each independent of the configured VM size except QEMU at 128 MB, where it is slightly higher.
None of those is a wick target. Chapter 28 measures wick and, for comparison, Firecracker from nixpkgs on one named host with a committed script, and the numbers it prints are that host’s.
What is deleted, and what each deletion costs a guest
Each deletion removes code from the VMM, which is the point, and moves a duty somewhere else, which is the price.
No BIOS. “It does not offer a BIOS, cannot boot arbitrary kernels, does not emulate legacy devices nor PCI, and does not support VM migration” (§1, p. 420). Firmware is the code that runs first at reset and hands a kernel a machine to run on; on an x86 PC it is the BIOS (or its successor, UEFI), and on the RISC-V virt board ember ran with -bios none, so QEMU entered the kernel image at 0x80000000 with no firmware in between. A VMM that has no firmware owes the guest a boot protocol: it must load the kernel into guest memory itself, put the command line and a description of the machine where the kernel expects them, and start the vCPU in the state the kernel’s entry point expects. The paper’s boot experiment did exactly that: “All VMMs directly load a Linux 4.14.94 kernel via the command line (i.e. the kernel is directly loaded by the VMM and not some bootloader)” (§5.1, p. 427). That duty is chapter 24.
No real-mode boot. An x86 CPU resets into 16-bit real mode and a PC’s boot path walks it up through 32-bit protected mode into 64-bit long mode (the x86 name for the mode that runs a 64-bit kernel with paging on); a RISC-V hart has no 16-bit mode to leave. A VMM that loads the kernel itself does not need the walk: it writes the vCPU’s registers already in long mode. Firecracker’s src/vmm/src/arch/x86_64/regs.rs sets them directly, for the Linux protocol under a comment that says what it is, “64-bit protected mode” (lines 247 to 250), and sets the paging bit (X86_CR0_PG, line 279) after building page tables. docs/pvh.md names the other way in, “PVH direct boot”: a direct-boot entry specified by the Xen project, for kernels that carry the right ELF note and so skip the legacy boot sequence. wick takes the 64-bit boot protocol of the Linux tree’s Documentation/arch/x86/boot.rst, in chapter 24, and writes no 16-bit code at all.
No PCI, and what announces a device. PCI, chapter 21’s second bus, lets the guest discover devices by walking configuration space. A VMM without it has to tell the guest where each device is. Firecracker’s default is the virtio-mmio transport of chapter 21: each device is a window of registers at an address chosen by the VMM and passed to the guest on the kernel command line. The source says so in a comment, “as per doc, [virtio_mmio.]device=<size>@<baseaddr>:<irq> needs to be appended to kernel command line for virtio mmio devices to get recognized” (src/vmm/src/device_manager/mmio.rs, lines 215 and 216), and when PCI is not enabled builder.rs (lines 205 to 209) adds pci=off to the same command line. wick does the same, with the window virtio_mmio.device=4K@0xd0000000:5 (size, base address, interrupt number), in chapter 25. The paper’s Firecracker has no PCI at all; at v1.15.1 it has an optional PCI transport, and the paper’s “no PCI” is the 2020 state. CHANGELOG.md (release 1.13.0, lines 185 to 189) says when it came and what it is: “Added PCI support in Firecracker. PCI support is optional. Users can enable it passing the --enable-pci flag when launching the Firecracker process. When Firecracker process is launched with PCI support, it will create all VirtIO devices using a PCI VirtIO transport. If not enabled, Firecracker will use the MMIO transport instead.” docs/getting-started.md (lines 206 to 210) now suggests the PCI transport “as it yields higher throughput and lower latency”. The default, and wick’s only choice, is the MMIO transport.
No ACPI, and what the interrupts do instead. ACPI is the PC’s table language: firmware leaves tables in memory that describe the CPUs, the interrupt controllers and the devices, and the OS parses them where a RISC-V kernel reads a device tree. wick supplies no ACPI table and no older MP table (the previous generation’s CPU and interrupt description). A guest with neither finds no IOAPIC, the interrupt router that sends device interrupts to CPUs, and so its interrupts arrive through the legacy PIC, the interrupt-controller pair (the Intel 8259) that KVM models in the kernel; its lines (GSIs, KVM’s global interrupt numbers, 0 to 15 in its default routing) play the part the PLIC played for ember’s UART (source 10). The cost is that the devices share a small fixed set of lines and that a table-less guest kernel must be told to expect that; chapter 25 gives the virtio devices GSIs from 5 up. The pinned tag is again later than the paper: src/vmm/src/acpi/ exists at v1.15.1, and CHANGELOG.md (release 1.8.0, lines 468 to 472) records the addition: “we pass ACPI tables with information about the available vCPUs, interrupt controllers, VirtIO and legacy x86 devices to the guest”, with the older table marked for removal: “Booting with microVM kernels that rely on MPTable on x86_64 is deprecated” (lines 517 and 518). That reading, interrupts through the 8259, holds for wick, not for Firecracker today.
No legacy devices except the serial port. The PC’s legacy set (the i8042 keyboard controller, the real-time clock, the interval timer, the PIC) exists so that a 1980s operating system can boot. wick keeps one: a serial console, an 8250 UART on port 0x3f8 (port I/O, chapter 21), because a guest with no console is a guest nobody can debug. The PIC it gets from KVM’s in-kernel irqchip (KVM_CREATE_IRQCHIP), and the PIT, the PC’s interval timer (where RISC-V has mtime and mtimecmp, chapter 6), from KVM’s in-kernel PIT2, not from device code of its own. There is no i8042: the guest kernel probes it, and wick answers the probe with 0xff. The cost shows in the API: Firecracker’s SendCtrlAltDel action is “used to initiate a graceful shutdown, if the guest has driver support for i8042 and AT Keyboard” (CHANGELOG.md, lines 1474 to 1476), so wick refuses it with 400. Guests end with reboot -f, which wick sees as a shutdown exit. The paper also names a cost the guest pays, because it is a PC kernel that went looking: “the kernel which ships with Ubuntu 18.04 takes an additional 900ms to start! Part of this goes to timeouts when probing for legacy devices not emulated by Firecracker, and part to loading unneeded drivers” (§5.1, p. 428). The fix is on the guest side: “we exclude almost all drivers, except the virtio and serial drivers that Firecracker supports”. Chapter 24 builds that kernel.
No emulated controllers, NICs, graphics or USB. The VMM does not model an IDE or AHCI disk, an e1000 NIC, a VGA display or a USB host controller. “Lower-level features, such as additional devices (USB, PCI, sound, video, etc), BIOS, and CPU instruction emulation are simply not implemented because they are not needed by typical serverless container and function workloads” (§1, p. 420). The Firecracker team inherited a codebase that had them and cut: “We removed device drivers including USB and GPU, and support for the 9p filesystem protocol” (§3, p. 423). The cost is that the guest must speak virtio. A guest without virtio drivers has no disk and no network: “Firecracker could not boot Microsoft Windows without significant changes to Firecracker” (§1, p. 420). Chapter 24 builds a guest kernel that does.
The trust boundary
The design document states the threat model in one sentence: “all vCPU threads are considered to be running malicious code as soon as they have been started; these malicious threads need to be contained” (docs/design.md, lines 83 to 85). The paper’s figure 1 draws the reason this is a VMM problem and not a kernel problem: the caption says the container model “(a) depends directly on the kernel’s sandboxing capabilities, while KVM-style virtualization (b) relies on security of the VMM” (§2.1, p. 421). A guest cannot reach the host kernel’s syscall table, which is the container’s exposure; it can reach every device model the VMM implements, each of which parses structures the guest controls, as chapter 22’s untrusted driver showed. The VMM is therefore the attack surface, and Firecracker’s design nests its walls: “The first layer of isolation is provided by the Linux KVM and the Firecracker virtualization boundary. To assure defense in depth, Firecracker should only run constrained at the process level. This is achieved by the following: seccomp filters for disallowing unwanted system calls, cgroups and namespaces for resource isolation, and dropping privileges by jailing the process” (lines 152 to 158).
Seccomp-BPF, cgroups and namespaces are chapter 15’s, used here as defined there. The user namespace is chapter 15’s too. What is new here is the mount namespace, a process’s own view of the file system tree, which pivot_root then rebinds so that the process’s root is a directory of the jailer’s choosing. The jailer is the second wall: a wrapper that sets those up, drops privilege and execs the VMM. “The jailer implements a wrapper around Firecracker which places it into a restrictive sandbox before it boots the guest, including running it in a chroot, isolating it in pid and network namespaces, dropping privileges, and setting a restrictive seccomp-bpf profile” (§3.4.1, p. 424), with the profile sized in the same paragraph: it “whitelists 24 syscalls, each with additional argument filtering, and 30 ioctls (of which 22 are required by KVM ioctl-based API)”. Chapter 26 builds the jailer and the filter for wick; the thing to hold here is where the walls are. The hardware boundary stops the guest from the host. Each VMM thread’s seccomp filter stops a compromised VMM from the host kernel’s other syscalls. The jailer stops it from the host’s files and from its network.
Cloud Hypervisor, the sibling that kept the rest
Cloud Hypervisor starts from the same place (the paper lists it as a VMM that “takes a similar approach, (and indeed shares much code with Firecracker)”, §2.1.3, p. 422) and makes the opposite call on scope. Its README: “The goal of the Cloud Hypervisor project differs from the aforementioned projects in that it aims to be a general purpose VMM for Cloud Workloads and not limited to container/serverless or client workloads” (§4, “Differences with Firecracker and crosvm”). Its listed objectives include “Minimal emulation”, “Small attack surface” and, in the same list, “CPU, memory, PCI hotplug” and “Machine to machine migration” (§1, “High Level”). The keeps follow from the second pair.
The one that organises the rest is PCI. docs/device_model.md (lines 91 and 92): “For all virtio devices listed below, only virtio-pci transport layer is supported.” Hot-plugging a device into a running guest means the guest must be told that a device has arrived, and chapter 21 quoted the virtio-mmio rule that rules that out: “Unlike PCI, MMIO provides no generic device discovery mechanism” (virtio 1.2 §4.2.1). The hotplug page then names what carries the notification, “For hotplug on Cloud Hypervisor ACPI GED support is needed” (docs/hotplug.md, line 7), and device_model.md lists ACPI “enabled by default”. PCI and ACPI come as a pair, and migration, passthrough (VFIO, “implies vfio-pci”, line 232) and hotplug come with them. That is the reading of two documents together; the README does not state the causation. The cost on the figure the paper measured is not attributed to any feature: Cloud Hypervisor’s “overhead is around 13MB per VM” against Firecracker’s “around 3MB” (§5.2, p. 429), and the paper says nothing about why.
wick is the Firecracker-shaped cut, and it keeps less than Firecracker does. It is not Firecracker’s code: it is built on the same rust-vmm crates, and chapter 28 names the devices it refuses.
The axes
Chapter 14’s three axes, for a microVM. Shared: the host kernel, between every guest on the machine, and inside one process the guest’s memory (the VMM maps it, chapter 20) and the device models’ state. A guest shares less with its neighbours than a container does, because the untrusted code never calls the host kernel directly (the paper’s figure 1), but its VMM does, and all guests share KVM and the code under it. Trusted: KVM and the host kernel below the VMM, the VMM itself, and the jailer and filter that confine the VMM; wick’s TCB is that plus Linux and the jailer, where hearth’s is the hypervisor image plus the CPU (SYLLABUS.md, chapter 41). The copy: virtio buffers stay in guest memory and the device reads them where they lie, but a network frame is copied by the VMM between the guest’s buffer and the TAP: “all outbound network traffic data is copied by the Firecracker I/O thread from the emulated network interface to the backing host TAP device, and I/O rate limiting is applied at this point” (docs/design.md, lines 88 to 90), a barrier the design marks on purpose.
Walkthrough
There is no code. The walkthrough is the lab’s answer key: twenty-two things a general-purpose VMM provides, QEMU being the paper’s example of one, and for each what Firecracker does, what Cloud Hypervisor does, and what wick does with the chapter that decides it. The rows are lists, not a table, because a three-column table with these cells does not fit the page. Firecracker is read at v1.15.1; “the paper” means the NSDI 2020 text; “vmm/” means src/vmm/src/ at the tag, and its listing is the evidence for “has a directory”. Cloud Hypervisor is read at v53.0.
BIOS/UEFI firmware
- Firecracker: deleted. “It does not offer a BIOS” (paper §1, p. 420); the kernel is loaded directly (§5.1, p. 427).
- Cloud Hypervisor: kept, as one of two ways in. “The first is direct kernel boot … The second is firmware boot, where a firmware image is passed to
--firmware” (README, “Booting Linux”); the README names two firmwares, Rust Hypervisor Firmware and an edk2 UEFI build. wick: deleted. No firmware runs; chapter 24 loads the kernel.
Real-mode boot
- Firecracker: deleted. The VMM writes long-mode register state directly:
vmm/arch/x86_64/regs.rs, lines 247 to 250 (// 64-bit protected mode) and line 279 (X86_CR0_PG);docs/pvh.mdfor the PVH entry. - Cloud Hypervisor: direct boot takes a kernel “built with PVH support or be a bzImage” (PVH is the Xen direct-boot entry above; a bzImage is the compressed Linux image the x86 build produces), and a firmware boot “brings up the guest’s normal boot loader” (README, “Booting Linux”).
wick: deleted. Chapter 24 enters the 64-bit entry of the Linux boot protocol (the 64-bit entry is at the loaded kernel’s start plus0x200) with the CPU already in long mode.
PCI bus
- Firecracker: deleted in the paper (§1, p. 420). Present at
v1.15.1and off by default:vmm/pci/(bus.rs,configuration.rs,mod.rs,msix.rs),--enable-pci(CHANGELOG.md, lines 185 to 189);docs/getting-started.md, lines 206 to 208, says the MMIO transport is used when the flag is not passed, andvmm/device_manager/mmio.rs, lines 215 and 216, is the command-line declaration. - Cloud Hypervisor: kept, and the only transport: “only
virtio-pcitransport layer is supported” (docs/device_model.md, line 91). wick: deleted. Devices are virtio-mmio windows named on the kernel command line, chapter 25.
ACPI tables
- Firecracker: absent before 1.8.0 (the paper does not mention ACPI). Present at
v1.15.1:vmm/acpi/(mod.rs,x86_64.rs), added in 1.8.0 (“This allows booting kernels without MPTable support”,CHANGELOG.md, lines 468 to 472), with the MP table deprecated (lines 517 to 521). - Cloud Hypervisor: kept, and on by default: the “ACPI device” is “enabled by default since the ACPI feature is enabled by default” (
docs/device_model.md, “ACPI device”); hotplug needs it (docs/hotplug.md, line 7). wick: deleted, with no MP table either. Interrupts for virtio devices arrive through the in-kernel PIC, on GSIs from 5 up, chapters 24 and 25.
Legacy devices (i8042, RTC, PIT, PIC, serial)
- Firecracker: serial and a partial i8042 kept (paper §3.1, p. 423;
docs/design.md, lines 101 to 105;vmm/devices/legacy/holdsi8042.rs,serial.rsandrtc_pl031.rs, the last named for an Arm part). The PICs, the IOAPIC and the PIT are KVM’s: “guests also see the Programmable Interrupt Controllers (PICs), the I/O Advanced Programmable Interrupt Controller (IOAPIC), and the Programmable Interval Timer (PIT) that KVM supports” (docs/design.md, lines 107 to 110). Its clock sources arekvm-clockandtsc(lines 123 and 124). - Cloud Hypervisor: a wider set. Serial (built in, off by default), RTC/CMOS (on, “cannot be disabled from the command line”), a user-space IOAPIC, and an i8042 that is “always built-in, but … disabled by default” because “ACPI is enabled by default” and handles reboot (
docs/device_model.md, “Legacy devices”). wick: serial only, an 8250 on port0x3f8with its interrupt on GSI 4; PIC and PIT from KVM’s in-kernel models; no i8042 and no RTC (their ports fall under the rule that every other port reads0xffand ignores writes), soSendCtrlAltDelis400. Chapter 24.
Emulated disk controllers
- Firecracker: deleted. The paper’s device list is network, block, serial and i8042 (§3.1, p. 423); “additional devices” are “not implemented” (§1, p. 420); the subdirectories of
vmm/devices/areacpi,legacy,pci,pseudoandvirtio, and none holds a disk controller. - Cloud Hypervisor: none in its device model: the summary table in
docs/device_model.md(lines 7 to 24) lists virtio-blk, vhost-user-blk and virtio-pmem for storage, and no IDE, AHCI or NVMe. wick: never present. Storage is virtio-blk, chapter 25.
Emulated NICs
- Firecracker: deleted; the paper’s only network device is virtio (§3.1, p. 423).
- Cloud Hypervisor: none in the table; network is virtio-net and vhost-user-net (
docs/device_model.md, lines 7 to 24). wick: never present. Networking is virtio-net on a TAP, chapter 25.
virtio-blk
- Firecracker: kept: “around 1400 lines of Rust” in the paper (§3.1, p. 423);
vmm/devices/virtio/block/, backed by “files on the host” (docs/design.md, “Storage”). The paper notes that its block device “does not implement flush-to-disk” (§5.3, p. 429); the tag has moved on: the schema’sDrivehascache_typewithWritebackbeside the defaultUnsafe(firecracker.yaml, lines 1199 to 1204), andCHANGELOG.mdline 1061 (release 0.25.0) reads “Added option to configure block device flush”.wicknegotiatesVIRTIO_BLK_F_FLUSH, which is Firecracker’sWritebackquestion answered the safe way. - Cloud Hypervisor: kept (
docs/device_model.md, “virtio-block”), as a virtio-pci device. wick: kept, file-backed, flush negotiated, chapter 25.
virtio-net
- Firecracker: kept, TAP-backed (“Firecracker emulated network devices are backed by TAP devices on the host”,
docs/design.md, lines 59 and 60);vmm/devices/virtio/net/. - Cloud Hypervisor: kept, “connected to a TAP interface automatically created by the
cloud-hypervisoron the host” (docs/device_model.md, “virtio-net”). wick: kept, TAP-backed with no offloads negotiated; the lab makes its TAP inside an unprivileged user and network namespace, chapter 25.
virtio-vsock
- Firecracker: kept: “full virtio-vsock support to software running inside the guest VM, while bypassing vhost kernel code on the host” (
docs/vsock.md, lines 38 to 40);vmm/devices/virtio/vsock/. The host end is a Unix socket. - Cloud Hypervisor: kept, and copied from Firecracker: “our implementation is a copy of theirs” (
docs/device_model.md, line 162;docs/vsock.mdsays the same). wick: kept, with Firecracker’s protocol, chapter 25. A CID, the context identifier, is the 32-bit address a vsock endpoint has; Firecracker’s schema givesguest_cidaminimumof 3.
Balloon
- Firecracker: kept, post-paper:
vmm/devices/virtio/balloon/,/balloonin the schema, and “A memory balloon device is a virtio device that can be used to reclaim and give back guest memory through API commands issued by the host” (docs/ballooning.md, lines 5 to 7). - Cloud Hypervisor: kept: “a balloon device based on the VIRTIO specification” (
docs/balloon.md, line 3). wick: refused, chapter 28.
Hotplug
- Firecracker: memory only, post-paper: virtio-mem (
/hotplug/memoryin the schema,docs/memory-hotplug.md). No device hotplug:PUT /drives/{drive_id}is “Pre-boot only” (schema, line 283), and so are the network and vsock devices. - Cloud Hypervisor: kept: “hot plugging of CPUs devices (x86 only), PCI devices and memory resizing” (
docs/hotplug.md, line 3). wick: refused, chapter 28. Every device is declared beforeInstanceStart, and a pre-bootPUTafter it is400.
Live migration
- Firecracker: deleted. The paper: “does not support VM migration” (§1, p. 420). The snapshot document mentions migration once, as a case the clock device’s
disruption_markerfield covers (docs/snapshotting/snapshot-support.md, line 610). - Cloud Hypervisor: kept: “Machine to machine migration” is an objective (README, “High Level”), and
docs/live_migration.mdcovers local and “Remote Migration (TCP Migration): migrating a VM between two TCP/IP hosts”. wick: refused, chapter 28; snapshots are chapter 27.
Snapshots
- Firecracker: kept, post-paper: “MicroVM snapshotting is a mechanism through which a running microVM and its resources can be serialized and saved to an external medium” (
docs/snapshotting/snapshot-support.md, lines 34 to 36),/snapshot/createand/snapshot/loadin the schema. Full and diff snapshots exist; “Diff snapshots are still in developer preview” (line 116). - Cloud Hypervisor: kept (
docs/snapshot_restore.md, lines 3 to 8), with the README’s caveat “Snapshot/restore is not supported across different versions”. wick: kept, full snapshots only, state in a JSON file and memory in a raw file; diff snapshots refused. Chapter 27.
Graphics
- Firecracker: deleted: “video” is in the paper’s list of devices not implemented (§1, p. 420), and the GPU driver went with crosvm’s code (§3, p. 423).
- Cloud Hypervisor: none in the device model (
docs/device_model.md). wick: never present. Chapter 28 names GPU passthrough as a different VMM’s job.
USB
- Firecracker: deleted: “USB” is in the same list (§1, p. 420), and “We removed device drivers including USB and GPU” (§3, p. 423).
- Cloud Hypervisor: none in the device model.
wick: never present.
A monitor or QMP
QEMU’s monitor is a control channel for a running guest. The paper does not discuss it, so this row is about what each VMM offers in its place.
- Firecracker: none; a REST API replaces it, and the paper says why: “the typical Unix approach of command-line arguments do not allow messages to be passed to the process after it is created” (§3.2, p. 423).
- Cloud Hypervisor: one control surface, in several transports: “a REST API, a Command Line Interface (CLI) or a D-Bus based API, which is not compiled into Cloud Hypervisor by default” (
docs/api.md). wick: none; the API below, andwick ctl, chapter 24.
A REST API
- Firecracker: kept; the paper’s “REST API over a Unix socket” (§3.2, p. 423), specified in
src/firecracker/swagger/firecracker.yaml(“The transport medium is a Unix Domain Socket”, lines 4 to 7). Its HTTP server is a git dependency,micro_http(src/firecracker/Cargo.toml, line 27). - Cloud Hypervisor: kept, over “a local UNIX socket” (
docs/api.md,--api-socket path=…). wick: a strict subset of Firecracker’s schema, same paths and field names, served by about 200 lines of hand-written HTTP in chapter 24.
A jailer
- Firecracker: kept: “The jailer is a program designed to isolate the Firecracker process” (
docs/jailer.md, line 5); its steps include “usepivot_root()to switch the old system root mount point with a new one” and amknodof/dev/kvminside the jail (lines 136 to 141). - Cloud Hypervisor: no jailer in
docs/atv53.0; its sandboxing documents aredocs/seccomp.mdanddocs/landlock.md(“Landlock is a lightweight mechanism to allow unprivileged applications to sandbox themselves”). wick: kept:wick-jailer, chapter 26.hearthhas none.
Seccomp
- Firecracker: kept: “Seccomp filters are used by default to limit the host system calls Firecracker can use”, loaded on each thread “right before executing guest code” for the vCPUs and “right before launching the HTTP server” for the API thread (
docs/seccomp.md, lines 3 to 12); the paper counts 24 syscalls (§3.4.1, p. 424). - Cloud Hypervisor: kept, with “different filters … applied to each” thread (
docs/seccomp.md). wick: kept: an allowlist installed on every thread whenInstanceStartruns, after the vCPU thread is made and parked and before the guest runs, derived fromstrace -ftraces of the labs of chapters 24, 25 and 27. Chapter 26.
Rate limiters
- Firecracker: kept: “rate limiters to each volume and network interface”, “a token bucket algorithm based on two buckets” (
docs/design.md, lines 129 to 133); paper §3.3, pp. 423 and 424. - Cloud Hypervisor: kept, and borrowed: “based on the
rate-limitermodule from Firecracker” (docs/io_throttling.md, lines 3 to 5). wick: refused, chapter 28.
A metadata service
- Firecracker: kept: MMDS, “microVM metadata service”, in the VMM thread (
docs/design.md, lines 74 to 76), with its own small network stack (vmm/mmds/,vmm/dumbo/;docs/mmds/mmds-design.md, lines 1 to 6). - Cloud Hypervisor: not documented at
v53.0: no entry indocs/device_model.mdand no page in itsdocs/listing. wick: refused, chapter 28.
What wick is at the end of chapter 28
wick is one package with two binaries, wick and wick-jailer, in one tree. It is Rust, built on the rust-vmm crates (kvm-ioctls, vm-memory, linux-loader, virtio-queue and their neighbours), and it boots an x86_64 Linux guest under KVM. The tree, with the chapter that adds each part:
wick/
├── Cargo.toml Cargo.lock Makefile
├── seccomp/x86_64.json # ch 26: the allowlist, compiled at startup
├── src/
│ ├── main.rs # ch 24: arguments, threads, API server, VMM loop
│ ├── ctl.rs # ch 24: `wick ctl METHOD PATH [@file.json]`
│ ├── lib.rs error.rs config.rs # ch 24: Error enum, VM configuration
│ ├── vm.rs vcpu.rs bus.rs serial.rs # ch 24: KVM VM, vCPU thread, buses, 8250
│ ├── vmm.rs # ch 24: the VMM thread and its request channel
│ ├── x86/ # ch 24: the boot structures (defined there)
│ ├── api/ # ch 24, grows: http.rs (hand-written), server, routes
│ ├── mmio.rs # ch 25: virtio-mmio transport
│ ├── devices/ # ch 25: block.rs, net.rs, vsock/ (packets, bridge)
│ ├── seccomp.rs # ch 26: installs the allowlist, --probe-seccomp
│ ├── snapshot/ # ch 27: state and memory files, create and load
│ └── bin/jailer.rs # ch 26: `wick-jailer`
└── tests/ # boot, api, ch22_contract, hostile, snapshot_roundtrip
The threads are the figure’s. An API thread serves the Unix socket: one request per connection, GET, PUT and PATCH only, a cap on the head and on the body, and no guest memory in reach. A VMM thread runs an event loop over the devices’ eventfds and the channel the API thread sends requests on; it owns the configuration and the device state. One vCPU thread runs KVM_RUN. The API thread sends a request and waits for the reply, and the reply is the only thing it learns about the machine. vcpu_count is 1: a request for any other count is refused with 400, because the boot code maps one vCPU, sets no MP table and the snapshot code saves one; chapter 28 explains what a second vCPU would take.
The API is Firecracker’s, a subset. Before boot: PUT /machine-config (vcpu_count, which must be 1, and mem_size_mib), PUT /boot-source (kernel_image_path, boot_args, initrd_path), PUT /drives/{drive_id} (drive_id, path_on_host, is_root_device, is_read_only), PUT /network-interfaces/{iface_id} (iface_id, host_dev_name, guest_mac) and PUT /vsock (guest_cid, uds_path). PUT /snapshot/load (snapshot_path, mem_file_path, resume_vm) is also a pre-boot call, accepted only by a fresh process, as in Firecracker’s schema (“Pre-boot only”, line 764). PUT /actions with action_type InstanceStart starts the guest. After boot: PATCH /vm with state Paused or Resumed, and PUT /snapshot/create (snapshot_type Full, snapshot_path, mem_file_path) on a paused VM. At any time: GET / for instance information. A success is 204, except GET /, which is 200 with a body; bad input is 400 with a body {"fault_message": …}, the shape Firecracker’s Error definition has; an unknown path is 404. Nothing else is implemented. SendCtrlAltDel is in Firecracker’s action enumeration and refused by wick.
Two of Firecracker’s endpoints, quoted, show what the subset takes and what it drops. First PUT /machine-config:
// firecracker v1.15.1, src/firecracker/swagger/firecracker.yaml:415-427
put:
summary: Updates the Machine Configuration of the VM. Pre-boot only.
description:
Updates the Virtual Machine Configuration with the specified input.
Firecracker starts with default values for vCPU count (=1) and memory size (=128 MiB).
The vCPU count is restricted to the [1, 32] range.
With SMT enabled, the vCPU count is required to be either 1 or an even number in the range.
otherwise there are no restrictions regarding the vCPU count.
If 2M hugetlbfs pages are specified, then `mem_size_mib` must be a multiple of 2.
If any of the parameters has an incorrect value, the whole update fails.
All parameters that are optional and are not specified are set to their default values
(smt = false, track_dirty_pages = false, cpu_template = None, huge_pages = None).
operationId: putMachineConfiguration
Firecracker accepts 1 to 32 vCPUs; wick takes the field name and the 128 MiB default and narrows the range to 1. smt, track_dirty_pages, cpu_template and huge_pages are not in wick’s schema, and a body that names them is 400. Second PUT /actions and the enumeration it takes:
// firecracker v1.15.1, src/firecracker/swagger/firecracker.yaml:1306-1319
InstanceActionInfo:
type: object
description:
Variant wrapper containing the real action.
required:
- action_type
properties:
action_type:
description: Enumeration indicating what type of action is contained in the payload
type: string
enum:
- FlushMetrics
- InstanceStart
- SendCtrlAltDel
wick implements InstanceStart; SendCtrlAltDel answers 400 for the reason in the Mechanism section, and FlushMetrics is not implemented. The same choice runs through every endpoint: the paths and the fields that remain are Firecracker’s, which is what lets ward (Part IX) speak to either.
Exercises
Every answer below is a cited sentence or a counted line of the files at their pins; none is a measurement.
(a) Which three threads does docs/design.md name, and what does each one own? When is each thread’s seccomp filter installed?
Answer
API, VMM and vCPU(s) (docs/design.md, lines 71 and 72). The API thread owns “Firecracker’s API server and associated control plane” and “It’s never in the fast path of the virtual machine”. The VMM thread “exposes the machine model, minimal legacy device model, microVM metadata service (MMDS) and VirtIO device emulated Net, Block and Vsock devices, complete with I/O rate limiting”. The vCPU threads are “one per guest CPU core”, “created via KVM” and “run the KVM_RUN main loop”, and “execute synchronous I/O and memory-mapped I/O operations on devices models” (lines 72 to 79). Filters go on per thread (docs/seccomp.md, lines 7 to 12): the VMM thread “right before executing guest code on the VCPU threads”, the API thread “right before launching the HTTP server”, and each vCPU thread “right before executing guest code”. Each filter goes on before the work it confines begins. wick differs in one respect: it installs its filter on every thread together at InstanceStart, when its API thread is already serving (chapter 26).
(b) From the schema, which endpoints are “Pre-boot only”? What does PATCH /drives/{drive_id} change, and why would PUT /drives/{drive_id} after boot be a different feature?
Answer
The summaries that say “Pre-boot only” (firecracker.yaml, lines 231, 257, 283, 344, 416, 447, 554, 580, 680, 764 and 847) are PUT /boot-source, PUT /cpu-config, PUT /drives/{drive_id}, PUT /pmem/{id}, PUT and PATCH /machine-config, PUT /mmds/config, PUT /entropy, PUT /network-interfaces/{iface_id}, PUT /snapshot/load and PUT /vsock. The post-boot ones are PATCH /drives/{drive_id} (line 313, “Post-boot only”), the network interface’s rate limiters (line 708) and PUT /snapshot/create (line 738). PATCH takes a PartialDrive: drive_id, path_on_host and rate_limiter. The two optional fields are host-side properties of a device the guest already has. A PUT of a new drive_id after boot would create a device that did not exist when the guest looked, and the guest would have to learn it had arrived. That is hotplug, and virtio-mmio cannot carry it: “Unlike PCI, MMIO provides no generic device discovery mechanism” (virtio 1.2 §4.2.1). Firecracker’s own hotplug is memory only, through a separate path (/hotplug/memory, line 621; docs/memory-hotplug.md). wick turns the case into an error: a pre-boot PUT after InstanceStart is 400.
(c) The paper says something about what limits the number of guests on a host. Find it, give the page, and say whether the repository’s docs/design.md agrees.
Answer
Memory, and the per-guest overhead on top of it. Section 2 on page 421: “Modern commodity servers contain up to 1TB of RAM, while Lambda functions use as little as 128MB, requiring up to 8000 functions on a server to fill the RAM (or more due to soft allocation)”. With binary prefixes the arithmetic is guests; the paper’s “up to 8000” is the same figure rounded. Page 426 (§4.1.2) says the count on a real Lambda worker is “hundreds or thousands”, “with the number depending on the configured size of each MicroVM, and how much memory, CPU and other resources each VM consumes”. Page 429 gives the overhead that sets the slope: about 3 MB per guest for Firecracker, 13 MB for Cloud Hypervisor, 131 MB for QEMU. docs/design.md (lines 30 and 31) is consistent and less specific: the number of microVMs “is limited only by the availability of hardware resources”. The paper’s limit is memory on a 1 TB host, not a Firecracker constant, and chapter 28’s measurement is the reader’s own version of the question.
(d) Cloud Hypervisor keeps PCI. Name one thing that buys and one thing it costs, from its docs.
Answer
It buys hotplug of devices: “Currently Cloud Hypervisor supports hot plugging of CPUs devices (x86 only), PCI devices and memory resizing” (docs/hotplug.md, line 3); it also buys VFIO passthrough, which “implies vfio-pci” (docs/device_model.md, line 232). It costs a dependency on ACPI and a transport that is not optional. Hotplug needs the guest to be told a device arrived: “For hotplug on Cloud Hypervisor ACPI GED support is needed. This can either be achieved by turning on CONFIG_ACPI_REDUCED_HARDWARE_ONLY or by using this kernel patch” (docs/hotplug.md, lines 7 and 8), so a guest kernel without that configuration cannot be hotplugged. And “For all virtio devices listed below, only virtio-pci transport layer is supported” (docs/device_model.md, line 91): a guest kernel without PCI support has no virtio devices at all, where Firecracker’s default MMIO transport needs none. At the Firecracker tag the cost is also countable in files. It is spread over four places: vmm/pci/ (bus.rs, configuration.rs, mod.rs, msix.rs), vmm/devices/pci/ (mod.rs, pci_segment.rs), vmm/device_manager/pci_mngr.rs and vmm/devices/virtio/transport/pci/ (common_config.rs, device.rs, mod.rs), beside the MMIO path’s two mmio.rs files (vmm/device_manager/mmio.rs and vmm/devices/virtio/transport/mmio.rs); and the paper’s Firecracker had no PCI at all (§1, p. 420).
(e) What would hearth delete from this chapter’s figure, and what is left?
Answer
The outline, the socket, the API lane, /dev/kvm and the process boundary the figure is drawn around. hearth has no jailer, because “the TCB is the image” (SYLLABUS.md, chapter 26), and no process to put in one. It has no Unix socket (chapter 25 in the same file: “hearth has no Unix socket”), so no API thread and no HTTP server. It has no /dev/kvm, because it is the hypervisor: where wick’s vCPU thread calls KVM_RUN, hearth enters the guest itself with the H-extension of chapter 18, and the exits arrive as traps in its own vector instead of a return value. The syllabus’s line for chapter 33 says what hearth is instead: “Stay in HS-mode (or EL2 on the Arm port). Own page tables, trap vector, UART, allocator.” The rest of this answer is inference from that line: what would be left of the figure is the middle lane and the bottom one with their eventfd arrows replaced by direct calls: a device model, a doorbell, a guest entry.
Lab
A reading lab: nothing boots. labs/ch23/README.md has an empty table with the Walkthrough’s twenty-two rows, in the same order: for each, three columns. Firecracker: kept, deleted or replaced, and the paper section or the file under src/vmm/src/ that shows it. Cloud Hypervisor: the same, from its README and docs/. wick: this book’s decision and the chapter that implements or refuses it. The README lists the pins and says to cite the paper by its printed page. The Walkthrough is the answer key. A disagreement between your table and a source’s text is a finding to report, not to paper over, and a cell you cannot fill from the sources gets the file you looked in. Chapter 24 is the first lab that boots a guest under wick.
Further reading
- Firecracker: Lightweight Virtualization for Serverless Applications, Agache, Brooker, Florescu, Iordache, Liguori, Neugebauer, Piwonka and Popa, NSDI 2020, pp. 419 to 434: §1 and §3 for what was deleted and why, §3.4.1 for the jailer, §5 for the measurements. The text read for this chapter is
https://www.usenix.org/system/files/nsdi20-paper-agache.pdf(fetched 2026-10-02T01:15Z). docs/design.mdat Firecrackerv1.15.1: the threads, the machine model and the sandboxing, in the project’s words. WithSPECIFICATION.md,docs/jailer.mdanddocs/seccomp.md.src/firecracker/swagger/firecracker.yamlat the same tag: the APIwicktakes a subset of, andsrc/vmm/src/for the tree the Walkthrough reads.- Cloud Hypervisor
README.mdanddocs/device_model.mdatv53.0, withdocs/hotplug.mdfor what PCI and ACPI buy it. - Chapter 21: the buses this chapter’s deletions are made from, and the device model
wickkeeps. Chapter 22: the ringwick’s devices meet in chapter 25.