Chapter 14 · Part VI
Booting Linux to a shell
Course progress: chapter 14 is 15 of the 26 chapters written so far (numbering starts at 00)
Warm-up: three questions from earlier chapters
Answer each one in your head or on paper before you open its answer. They change on each visit.
From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
The eight bytes at offset
0x10of an Image header are00 00 2a 02 00 00 00 00, andtext_offsetis 0. Where does the kernel's memory start and end in our plan?Show answer
The field is
image_size, little-endian:0x022a0000. The kernel starts at the 2 MiB-aligned base0x4020_0000plustext_offset0, so it owns0x4020_0000..0x424a_0000(start plusimage_size, end exclusive).From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
That kernel ends at
0x424a_0000. Where does our plan put a 9 MB initramfs, and which part of that choice comes from the boot protocol and which from us?Show answer
At
0x4260_0000, the end rounded up to the next 2 MiB boundary. The protocol only requires that it lie outside the kernel'simage_sizespan and, with the kernel, inside one 1 GiB-aligned window of at most 32 GiB; the 2 MiB rounding is our choice, to keep the numbers readable.From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
A
--kernelfile begins with the bytes4d 5aand haszimgat offset 4. What is it, what does our VMM do with it, and what do you run instead?Show answer
An EFI zboot wrapper: a compressed kernel packaged as a UEFI program (the
MZis the PE/COFF signature). The VMM refuses it with "EFI zboot image" and exit code 2 before creating a VM;cargo xtask unzboot(run byscripts/fetch.sh linux) unwraps it on the host into the raw Image.From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
An Image's
flagsfield is6. Does our loader accept it?Show answer
No. Bit 0 is 0 (little-endian, fine), but bits 1 and 2 read
0b11= 3, "64 KiB pages", which Apple Silicon does not implement. The loader refuses it with a named error rather than let the kernel die in early boot with no output.From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
A header claims
image_size = 0xFFFF_FFFF_FFFF_FFFF. Why doesload + image_size <= ram_endnot catch it, and what does?Show answer
With wrapping arithmetic the sum overflows to a small number (here
0x401F_FFFF), which passes the comparison; in a Rust debug build+panics instead.load.checked_add(image_size)returnsNoneon overflow, and the range check (RamRange::contains) treats that as "outside RAM", so the plan fails with exit code 2.From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
An ELF program header of type
PT_LOADsaysp_filesz = 0x100andp_memsz = 0x80. What does the loader do?Show answer
Refuse the file. A segment cannot hold more file bytes than memory:
p_filesz <= p_memszmust hold, and the difference is the zero-filled tail (the BSS). Copyingp_fileszbytes into ap_memszslot would write past the segment.From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
List the register values our vCPU starts a Linux kernel with, and the one system-register setting that goes with them.
Show answer
PC = the kernel's first byte (
0x4020_0000),x0= the device tree's address (0x4000_0000),x1,x2andx3= 0,CPSR=0x3c5(EL1h with D, A, I and F masked). The MMU is off:SCTLR_EL1.M(and the cache-enable bits C and I) cleared.From chapter 13: Loading kernels: arm64 Image, initramfs and ELF
macvmm run --dry-run ...printed a full boot plan and exited 0 from a binary that lacks the hypervisor entitlement. What does that prove, and why is it worth designing for?Show answer
That planning makes no Hypervisor.framework call: without the entitlement,
hv_vm_createwould have failed withHV_DENIED. Keeping placement a pure computation means every overlap and bound can be printed, unit-tested and property-tested on any machine, and is checked before a VM exists.From chapter 11: Getting the CPU back: the timer and a bare interrupt
A guest reads
CNTV_CTL_EL0and gets0b101. Is its timer raising its interrupt output right now? What about0b111?Show answer
0b101isENABLE(bit 0) andISTATUS(bit 2) withIMASK(bit 1) clear: enabled, not masked, count reached, so yes, the output is up.0b111hasIMASKset as well: the condition still holds, but the interrupt is masked at the timer, so the output is down.From chapter 11: Getting the CPU back: the timer and a bare interrupt
The counter runs at 24 MHz. A guest wants an alarm 250 ms from now and reads
CNTVCT_EL0 = 1,000,000. What does it write toCNTV_CVAL_EL0?Show answer
250 ms is a quarter of 24,000,000 ticks, 6,000,000 ticks, so it writes 7,000,000. The compare value is an absolute count, not a delay.
From chapter 11: Getting the CPU back: the timer and a bare interrupt
A VMM sets the vtimer offset to the host's tick count when the VM boots. Ten minutes later the guest is paused for an hour and then resumed without changing anything. What does the guest's counter show on resume, and what offset would make it continue where it stopped?
Show answer
It jumps forward by an hour of ticks, because
CNTVCT = mach_absolute_time() - offsetand the host kept counting. To resume where it stopped, recompute the offset as the host count now minus the count the guest last saw (restore_offset(now, saved)); then the counter continues fromsaved.From chapter 11: Getting the CPU back: the timer and a bare interrupt
With no interrupt controller, your VMM got a
VTIMER_ACTIVATEDexit. Before the next entry the guest'sCNTV_CTL_EL0still readsENABLE = 1, IMASK = 0, ISTATUS = 1. Do you unmask the vtimer? What do you do instead?Show answer
No: the level line is still high, so an unmasked vtimer would exit again at once, before the guest could handle anything (a real Mac shows millions of VTIMER exits). Keep it masked and set the vCPU's IRQ pending for this run with
hv_vcpu_set_pending_interrupt; unmask only onceCNTV_CTL_EL0shows the timer quiet.From chapter 11: Getting the CPU back: the timer and a bare interrupt
A guest's timer fires while the guest has
PSTATE.Iset and is busy in a loop for another 200 ms. When does its IRQ handler run, and is the interrupt lost meanwhile?Show answer
When the guest clears the mask, about 200 ms later. It is not lost: the timer's output is a level, still high, and the VMM keeps the IRQ pending before every entry, so the interrupt waits as state until the CPU listens.
From chapter 11: Getting the CPU back: the timer and a bare interrupt
A WFI exit arrives with the PC at
0x40081188. Where must the PC point when you resume the guest, and is it a bug if you resume at once without sleeping?Show answer
At
0x4008118c: a trappedWFIleaves the PC at the instruction, so the VMM adds 4. Resuming at once is not a bug, becauseWFIis allowed to end early; it only costs a busy host core while the guest is idle.From chapter 11: Getting the CPU back: the timer and a bare interrupt
Your
--statsline readsvtimer 1, wfx 9435272after a 10-second timeout, and the guest printed one interval. What did your VMM most likely forget?Show answer
To unmask the vtimer once the guest silenced it. The framework masks the vtimer at the first VTIMER exit; if it stays masked, no further VTIMER exit comes, the WFI handler finds the deadline already past and wakes at once, and guest and VMM loop on WFI exits.
From chapter 11: Getting the CPU back: the timer and a bare interrupt
A tick handled with no interrupt controller costs three exits. Your exit costs 1.43 µs. What host CPU do the exits alone cost at 10 Hz and at 250 Hz, and why was the measured 250 Hz cost (23% of a core) so much higher?
Show answer
30 exits per second is about 43 µs per second (0.004%); 750 per second would be about 1 ms per second (0.1%). The measured cost was the guest's own time: after each tick it re-took the stale pending IRQ for over a millisecond until the kick let the VMM drop the line, because the VMM cannot see the guest finish with the interrupt. That lost time also slowed the guest to about 150 ticks per second.
From chapter 11: Getting the CPU back: the timer and a bare interrupt
A key press is signalled as a short pulse while the CPU has IRQs masked. With no latch, what happens to it? Which PL011 register is the latch?
Show answer
It is lost: an edge is an event, and nobody was listening. The PL011's
RISlatches it (it remembers that a byte arrived until the guest clears it), andMIS,RIScombined with the maskIMSC, turns that memory into a level output.From chapter 07: The exit loop: decoding syndromes and emulating MMIO
A data-abort exit carries the syndrome
0x93820046. Without looking at guest memory, say the direction, the size and the register of the access, and name one instruction that fits.Show answer
EC is
0x93820046 >> 26 = 0x24, a data abort from the guest. Bit 24 (ISV) is 1, so the note is valid. SAS (bits 23:22) is 2, so 4 bytes; SSE is 0; SRT (bits 20:16) is 2; SF is 0, so a 32-bitwregister; WnR (bit 6) is 1, a write. A 4-byte store fromw2, such asstr w2, [x1].From chapter 07: The exit loop: decoding syndromes and emulating MMIO
A trapped store has SRT = 31. What value does the VMM send to the device, and why must it never pass 31 to
hv_vcpu_get_reg?Show answer
Zero: in the data-register field of a load or store, 31 means
xzr, which reads as 0. In Hypervisor.framework's register numbering, 31 isHV_REG_PC, so passing it through would send the guest's PC to the device (and a load intoxzrwould overwrite the PC).From chapter 07: The exit loop: decoding syndromes and emulating MMIO
The test device holds
0x8001at some offset. What ends up in the destination register forldrh w3,ldrsh w3andldrsh x3from that offset?Show answer
ldrh w3gives0x8001(zero-extended).ldrsh w3gives0xffff8001: sign-extended to 32 bits, and writing awregister clears the upper half.ldrsh x3gives0xffffffffffff8001, sign-extended to 64 bits. SSE says whether to sign-extend; SF says to which width.From chapter 07: The exit loop: decoding syndromes and emulating MMIO
After your VMM handles each of these exits, where must the PC point before the next run: an
hvc, ansmc, and a data abort it emulated?Show answer
hvc: leave it, the hardware already moved it past the call.smc: add 4, it was intercepted before it executed. Data abort: add 4, the saved PC is the faulting instruction (a fault retries), and the VMM has now done its work.From chapter 07: The exit loop: decoding syndromes and emulating MMIO
A guest runs
ldp x0, x1, [x2]withx2pointing into a device window. What is ISV in the syndrome, why, and what does this chapter's VMM do?Show answer
ISV is 0. The note has room for one register number (SRT) and one size, and a pair load moves two registers, so the hardware cannot describe it. The other syndrome fields are then UNKNOWN, so the VMM stops the VM with a fatal error that prints the instruction word, instead of guessing.
From chapter 07: The exit loop: decoding syndromes and emulating MMIO
The guest runs
strb w5, [x1]to a device, withx5 = 0x12345678. What value must reach the device, and which field tells you?Show answer
0x78. SAS is 0, so the access is 1 byte, and the VMM masks the register's value to that size before writing. Sending all ofx5would let the guest write bytes it never stored.From chapter 07: The exit loop: decoding syndromes and emulating MMIO
Why must
Exit::decodereturn a value for every possible 64-bit input instead of panicking on a value it does not expect?Show answer
The syndrome is the hardware's description of what a possibly hostile guest did. If some value made the decoder panic, the guest could crash the VMM on purpose by producing it. The checkpoint feeds the decoder a million random values to check this.
From chapter 07: The exit loop: decoding syndromes and emulating MMIO
Your VMM forgets to advance the PC after an emulated store. What does the exit trace look like, and how does the run end?
Show answer
The same record over and over: same
pc, sameipa, samevalue, onlyt_nsgrowing, hundreds of thousands per second. The guest retries the store forever, and the run ends only when--timeoutstops it (exit code 5).From chapter 07: The exit loop: decoding syndromes and emulating MMIO
A guest stops with a fatal error after a long run. Where do you look first to see what led up to it, and what does it hold?
Show answer
The
last exits:part of the dump: the vCPU's ring of recent exits, oldest first, with the fatal one last. The ring keeps the last 256 exits of each vCPU whether or not--traceis on, and the dump prints the last 32.
Concepts you'll need
Chapters before this one: chapter 13, Loading kernels: arm64 Image, initramfs and ELF.
- Core, taught here: reading a boot log as evidence, back to the node or device behind each line; the failure fingerprint; the exit ring on demand (
Ctrl-A t, SIGUSR1) and combined trace categories; what a PL011 console byte costs in virtual machine (VM) exits. - Core, from earlier: the exit trace and
--stats(chapters 03 and 11), the exit ring (07), PSCI (power state coordination interface) and--on-reset(08), the PL011 and the stop controlVmControl(09), the device tree (10), the timer and the in-kernel interrupt controller (11, 12), the boot plan and the test initramfs (13). - Primers (read first):
linux-boot-sequence(the eight stages from entry to/init, and the milestone line each one prints);primecell-ids(the eight bytes at0xFE0and how Linux matches on them; chapter 09's parked question resolves here). - Primers (review):
unix-signals(SIGUSR1, SIGINT, exit status128 + n, the self-pipe);tty-termios(whyCtrl-A treaches us and not the guest);cpio-initramfs(where/initcomes from);host-concurrency(ArcandMutex). - Pointers: the kernel's
panic=command-line parameter (an Aside); BusyBox, the one program behind every command in the test shell (a linked sentence). - Forward definitions: virtio (chapter 15); a disk for the guest (chapter 18); several virtual CPUs (vCPUs, chapter 20). Each is defined in a sentence where it first appears.
Here is a real run of your virtual machine monitor (VMM), with one line of its PL011 code changed and the usual earlycon (the kernel's printing-by-address before any driver exists) left off the command line. The guest is a stock Linux kernel. It ran for about a tenth of a second, made 82 VM exits, including a clean power-off, and our VMM exited with status 0. It printed nothing at all:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 macvmm.test=boot" --timeout 10 --statsmacvmm: stats: serial_input_dropped=0 serial_input_queued=0 serial_written=0 serial_sink_dropped=0 serial_capped=0 serial_lost=0 serial_filtered=0macvmm: stats: vcpu0 exits: vtimer 0, wfx 0, total 82: hvc 16, sysreg 2, data abort 64macvmm: stats: vcpu0 time: exec 0.111 s, wfi 0.000 smacvmm: stats: host cpu 0.120 s over 0.129 s wall (94%)macvmm: stats: rlimit core=0 nofile=1048576The kernel was fine. One small part of our machine lied to it, and Linux reacted quietly. By the end of this chapter you will have booted Alpine's Linux kernel to a shell, broken it three ways, and reproduced this run and named the lie from the outside alone. With it, rows 1 to 7 and 10 of the problem ledger hold for one CPU under a stock kernel (privileged state, memory, devices, power control, a machine description, interrupts, an alarm clock, a boot chain). Row 8, cheap bulk input and output, gets a number you measure yourself.
Objectives: by the end you can
- Boot the pinned Alpine
linux-virt6.18.60 kernel to a shell prompt, run a command, and power off cleanly. - Diagnose three injected boot failures from their symptoms alone: a missing
/timernode, a wrong redistributor base in the device tree, and PL011 identification registers that read zero. - Map 20 lines of a real boot log to the device or device-tree node responsible for each.
- Add the exit-ring dump on
Ctrl-A tand SIGUSR1, and trace filters that combine categories. - Measure how many VM exits 64 KiB of PL011 console output costs, the number chapter 15 starts from.
Before you start. From the repository root, run scripts/learner start 14; it copies this chapter's journal to learner/journal/14.md. Chapter 13's scripts/fetch.sh linux left Image-virt and initramfs-test.img in .cache/macvmm/. The only new code is two debugging aids.
Boot it
The --cmdline below is the kernel command line our device tree hands Linux in /chosen. Its last word, macvmm.test=boot, is read by the test initramfs's own /init script, which picks what to do once Linux has started it. Run it from inside learner/, where the cache is one level up:
cd learnercargo run -q -p macvmm -- run --kernel ../.cache/macvmm/Image-virt --initrd ../.cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 30 --statsFrom the root, the same command with .cache/macvmm/ runs the reference; from learner/ it runs yours. Use the second; our captures come from the first, for comparison:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 30 --stats[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x610f0000][ 0.000000] Linux version 6.18.60-0-virt (buildozer@build-3-24-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2026-11-01 07:26:31[ 0.000000] random: crng init done[ 0.000000] Machine model: macvmm-virt[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')[ 0.000000] printk: legacy bootconsole [pl11] enabled[ 0.000000] efi: UEFI not found.[ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x5fd03780-0x5fd05c3f][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] DMA32 empty[ 0.000000] Normal empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] psci: probing for conduit method from DT.[ 0.000000] psci: PSCIv1.1 detected in firmware.[ 0.000000] psci: Using standard PSCI v0.2 function IDs[ 0.000000] psci: Trusted OS migration not required[ 0.000000] psci: SMC Calling Convention v1.1[ 0.000000] percpu: Embedded 34 pages/cpu s99608 r8192 d31464 u139264[ 0.000000] Detected PIPT I-cache on CPU0[ 0.000000] CPU features: detected: Address authentication (IMP DEF algorithm)[ 0.000000] CPU features: detected: GICv3 CPU interface[ 0.000000] CPU features: detected: Spectre-v4[ 0.000000] CPU features: detected: Spectre-BHB[ 0.000000] alternatives: applying boot alternatives[ 0.000000] Kernel command line: console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB[ 0.000000] software IO TLB: area num 1.[ 0.000000] software IO TLB: mapped [mem 0x000000005f380000-0x000000005f400000] (0MB)[ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 131072[ 0.000000] Policy zone: DMA[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1[ 0.000000] Dynamic Preempt: none[ 0.000000] rcu: Preemptible hierarchical RCU implementation.[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4096 to nr_cpu_ids=1.[ 0.000000] Trampoline variant of Tasks RCU enabled.[ 0.000000] Tracing variant of Tasks RCU enabled.[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1[ 0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0[ 0.000000] GICv3: 988 SPIs implemented[ 0.000000] GICv3: 0 Extended SPIs implemented[ 0.000000] Root IRQ handler: gic_handle_irq[ 0.000000] GICv3: GICv3 features: 16 PPIs, RSS[ 0.000000] GICv3: GICD_CTLR.DS=1, SCR_EL3.FIQ=0[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.[ 0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns[ 0.000000] arch_timer: cp15 timer running at 24.00MHz (virt).[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns[ 0.000703] kfence: initialized - using 2097152 bytes for 255 objects at 0x(____ptrval____)-0x(____ptrval____)[ 0.001494] Console: colour dummy device 80x25[ 0.001913] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000)[ 0.002667] pid_max: default: 32768 minimum: 301[ 0.003011] LSM: initializing lsm=lockdown,capability,landlock,yama[ 0.003523] landlock: Up and running.[ 0.003801] Yama: becoming mindful.[ 0.004092] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.004638] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.005613] rcu: Hierarchical SRCU implementation.[ 0.005992] rcu: Max phase no-delay instances is 400.[ 0.006512] EFI services will not be available.[ 0.006884] smp: Bringing up secondary CPUs ...[ 0.007234] smp: Brought up 1 node, 1 CPU[ 0.007586] SMP: Total of 1 processors activated.[ 0.007956] CPU: All CPU(s) started at EL1[ 0.008259] CPU features: detected: Branch Target Identification[ 0.008701] CPU features: detected: ARMv8.4 Translation Table Level[ 0.009164] CPU features: detected: Data cache clean to the PoU not required for I/D coherence[ 0.009735] CPU features: detected: Common not Private translations[ 0.010163] CPU features: detected: CRC32 instructions[ 0.010630] CPU features: detected: Data independent timing control (DIT)[ 0.011112] CPU features: detected: E0PD[ 0.011382] CPU features: detected: Enhanced Privileged Access Never[ 0.011836] CPU features: detected: Generic authentication (IMP DEF algorithm)[ 0.012353] CPU features: detected: RCpc load-acquire (LDAPR)[ 0.012798] CPU features: detected: LSE atomic instructions[ 0.013340] CPU features: detected: Privileged Access Never[ 0.013744] CPU features: detected: RAS Extension Support[ 0.014229] CPU features: detected: Speculation barrier (SB)[ 0.014645] CPU features: detected: TLB range maintenance instructions[ 0.015144] CPU features: detected: Scalable Matrix Extension[ 0.015568] CPU features: detected: SME2[ 0.015886] alternatives: applying system-wide alternatives[ 0.017062] SME: minimum available vector length 64 bytes per vector[ 0.017534] SME: maximum available vector length 64 bytes per vector[ 0.017999] SME: default vector length 64 bytes per vector[ 0.018459] Memory: 464096K/524288K available (13312K kernel code, 1994K rwdata, 8460K rodata, 2048K init, 9282K bss, 57716K reserved, 0K cma-reserved)[ 0.019549] devtmpfs: initialized[ 0.019992] posixtimers hash table entries: 512 (order: 1, 8192 bytes, linear)[ 0.020520] futex hash table entries: 256 (16384 bytes on 1 NUMA nodes, total 16 KiB, linear).[ 0.021135] 23904 pages in range for non-PLT usage[ 0.021135] 515424 pages in range for PLT usage[ 0.021526] pinctrl core: initialized pinctrl subsystem[ 0.022253] DMI not present or invalid.[ 0.023205] NET: Registered PF_NETLINK/PF_ROUTE protocol family[ 0.023711] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations[ 0.024280] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations[ 0.024849] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations[ 0.025555] audit: initializing netlink subsys (disabled)[ 0.026007] thermal_sys: Registered thermal governor 'step_wise'[ 0.026014] audit: type=2000 audit(0.021:1): state=initialized audit_enabled=0 res=1[ 0.027045] cpuidle: using governor ladder[ 0.027338] cpuidle: using governor menu[ 0.027620] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.[ 0.028099] ASID allocator initialised with 65536 entries[ 0.028504] Serial: AMBA PL011 UART driver[ 0.028922] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 13, base_baud = 0) is a PL011 rev1[ 0.029556] printk: console [ttyAMA0] enabled[ 0.029556] printk: console [ttyAMA0] enabled[ 0.030121] printk: legacy bootconsole [pl11] disabled[ 0.030121] printk: legacy bootconsole [pl11] disabled[ 0.031967] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages[ 0.031968] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page[ 0.031969] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages[ 0.031969] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page[ 0.031969] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages[ 0.031969] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page[ 0.031970] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages[ 0.031970] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page[ 0.032094] ACPI: Interpreter disabled.[ 0.032098] iommu: Default domain type: Translated[ 0.032099] iommu: DMA domain TLB invalidation policy: lazy mode[ 0.032233] clocksource: Switched to clocksource arch_sys_counter[ 0.039949] VFS: Disk quotas dquot_6.6.0[ 0.039951] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)[ 0.040147] pnp: PnP ACPI: disabled[ 0.041223] NET: Registered PF_INET protocol family[ 0.041245] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)[ 0.045822] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)[ 0.045825] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)[ 0.045826] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)[ 0.045830] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)[ 0.045833] TCP: Hash tables configured (established 4096 bind 4096)[ 0.045846] MPTCP token hash table entries: 512 (order: 2, 12288 bytes, linear)[ 0.045850] UDP hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.045851] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.045862] NET: Registered PF_UNIX/PF_LOCAL protocol family[ 0.045865] NET: Registered PF_XDP protocol family[ 0.045868] PCI: CLS 0 bytes, default 64[ 0.045911] Unpacking initramfs...[ 0.050227] kvm [1]: HYP mode not available[ 0.050297] Initialise system trusted keyrings[ 0.050789] workingset: timestamp_bits=44 max_order=17 bucket_order=0[ 0.057003] Key type asymmetric registered[ 0.057004] Asymmetric key parser 'x509' registered[ 0.057014] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)[ 0.065263] io scheduler mq-deadline registered[ 0.065264] io scheduler kyber registered[ 0.065270] io scheduler bfq registered[ 0.065425] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled[ 0.065773] hv_vmbus: registering driver hyperv_keyboard[ 0.065875] rtc-pl031 9010000.pl031: registered as rtc0[ 0.065880] rtc-pl031 9010000.pl031: setting system clock to 2026-11-20T09:08:35 UTC (1795165715)[ 0.065938] NET: Registered PF_INET6 protocol family[ 0.066063] Segment Routing with IPv6[ 0.066065] In-situ OAM (IOAM) with IPv6[ 0.071305] registered taskstats version 1[ 0.071351] Loading compiled-in X.509 certificates[ 0.121609] Freeing initrd memory: 9204K[ 0.124174] Loaded X.509 cert 'alpinelinux.org: Alpine Linux kernel key: 87fa969a47f3e2a6aa35859eb932a17c95abcd82'[ 0.125572] Demotion targets for Node 0: null[ 0.125597] Key type .fscrypt registered[ 0.125598] Key type fscrypt-provisioning registered[ 0.126945] clk: Disabling unused clocks[ 0.126947] PM: genpd: Disabling unused power domains[ 0.128465] Freeing unused kernel memory: 2048K[ 0.128483] Run /init as init processmacvmm-initramfs: ready 6.18.60-0-virt[ 0.131242] reboot: Power downmacvmm: stats: serial_input_dropped=0 serial_input_queued=0 serial_written=12093 serial_sink_dropped=0 serial_capped=0 serial_lost=0 serial_filtered=0macvmm: stats: vcpu0 exits: vtimer 0, wfx 0, total 32829: hvc 16, sysreg 2, data abort 32811macvmm: stats: vcpu0 time: exec 0.099 s, wfi 0.000 smacvmm: stats: host cpu 0.198 s over 0.173 s wall (115%)macvmm: stats: rlimit core=0 nofile=1048576About 180 lines in 0.17 seconds, exit status 0. The last two lines before the statistics are what the course has been heading for: Run /init as init process, then macvmm-initramfs: ready 6.18.60-0-virt, printed by a guest user-space program through the driver Linux chose for our UART (universal asynchronous receiver-transmitter), the PL011.
The /init script is shell, run by BusyBox, one program that provides sh, echo, poweroff and about 300 other commands. Its dispatch starts with this chapter's cases: boot powers off at once, shell gives you a prompt, panic crashes the kernel on purpose, timer-latency times a hundred short sleeps:
case "$test_case" in boot) off ;; shell) console_shell off ;; panic) echo "macvmm-initramfs: triggering a kernel panic" echo c > /proc/sysrq-trigger off ;; timer-latency) # 100 x usleep(10 ms), timed with /proc/uptime (10 ms resolution). t0="$(cut -d' ' -f1 /proc/uptime)" i=0 while [ "$i" -lt 100 ]; do usleep 10000 i=$((i + 1)) done t1="$(cut -d' ' -f1 /proc/uptime)" echo "macvmm-timer: 100x usleep(10ms) took $(echo "$t0 $t1" | awk '{printf "%.2f", $2 - $1}') s" off ;;From the root, scripts/run-linux.sh --test CASE builds, signs and runs the reference with these same defaults.
Reading the log as evidence
Linux prints its boot log in stages, each depending on the one before; the linux-boot-sequence primer names the eight stages and the milestone line of each. Here are 14 lines of the run above, each traced to the part of our machine that caused it. Keep beside it the device tree our VMM generated for that run, dumped with chapter 10's --dtb-out:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --dry-run --dtb-out boot.dtb > /dev/null && dtc -q -I dtb -O dts boot.dtb/dts-v1/;/ { compatible = "linux,dummy-virt"; model = "macvmm-virt"; #address-cells = <0x02>; #size-cells = <0x02>; interrupt-parent = <0x01>; dma-coherent; chosen { bootargs = "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot"; stdout-path = "/pl011@9000000"; linux,initrd-start = <0x00 0x42600000>; linux,initrd-end = <0x00 0x42efd8fc>; rng-seed = <0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>; kaslr-seed = <0x00 0x00>; }; memory@40000000 { device_type = "memory"; reg = <0x00 0x40000000 0x00 0x20000000>; }; cpus { #address-cells = <0x01>; #size-cells = <0x00>; cpu@0 { device_type = "cpu"; compatible = "arm,arm-v8"; reg = <0x00>; enable-method = "psci"; }; }; psci { compatible = "arm,psci-1.0", "arm,psci-0.2", "arm,psci"; method = "hvc"; }; timer { compatible = "arm,armv8-timer", "arm,armv7-timer"; always-on; interrupts = <0x01 0x0d 0x04 0x01 0x0e 0x04 0x01 0x0b 0x04 0x01 0x0a 0x04>; }; intc@8000000 { compatible = "arm,gic-v3"; #interrupt-cells = <0x03>; interrupt-controller; #address-cells = <0x02>; #size-cells = <0x02>; ranges; #redistributor-regions = <0x01>; reg = <0x00 0x8000000 0x00 0x10000 0x00 0x80a0000 0x00 0x20000>; phandle = <0x01>; }; apb-pclk { compatible = "fixed-clock"; #clock-cells = <0x00>; clock-frequency = <0x16e3600>; clock-output-names = "clk24mhz"; phandle = <0x02>; }; pl011@9000000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x00 0x9000000 0x00 0x1000>; interrupts = <0x00 0x01 0x04>; clocks = <0x02 0x02>; clock-names = "uartclk", "apb_pclk"; }; pl031@9010000 { compatible = "arm,pl031", "arm,primecell"; reg = <0x00 0x9010000 0x00 0x1000>; interrupts = <0x00 0x02 0x04>; clocks = <0x02>; clock-names = "apb_pclk"; };};rng-seed and kaslr-seed are zeros only in the dump; the guest received fresh random bytes (chapter 10). kaslr-seed is meant for KASLR (kernel address space layout randomisation), which moves the kernel's code to a random virtual address so an attacker cannot guess where its functions live. Our runs do not show it at work: every trace on this page has the same kernel pc values, such as 0xffff800080041338.
| Line in the log | Stage | Caused by, in our machine |
|---|---|---|
Booting Linux on physical CPU 0x0000000000 [0x610f0000] | 1, entry | our entry state (chapter 13); 0x0 is the CPU's affinity (MPIDR_EL1, chapter 06) |
Machine model: macvmm-virt | 2, first device-tree read | the root node's model (chapter 10) |
earlycon: pl11 at MMIO 0x0000000009000000 (options '') | 2 | earlycon= in bootargs, then byte stores to the PL011 (chapter 09) |
psci: PSCIv1.1 detected in firmware. | 2 | /psci says method = "hvc"; our answer to PSCI_VERSION (chapter 08) |
Kernel command line: console=ttyAMA0 ... | 2 | /chosen bootargs (chapter 10) |
GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000 | 3, interrupts | the second reg pair of /intc@8000000 (chapter 12) |
arch_timer: cp15 timer running at 24.00MHz (virt). | 4, time | the /timer node and the counter frequency Hypervisor.framework sets (chapter 11); cp15 is a 32-bit-era name for system registers |
smp: Brought up 1 node, 1 CPU | 5, first process | the single cpu@0 node; chapter 20 adds more vCPUs, so the guest can run on several host cores at once |
9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 13, base_baud = 0) is a PL011 rev1 | 6, drivers bind | /pl011@9000000, its clocks and its identification registers (chapters 09 and 10) |
printk: console [ttyAMA0] enabled | 6 | console=ttyAMA0 on the command line, now that the driver exists |
rtc-pl031 9010000.pl031: registered as rtc0 | 6 | /pl031@9010000 and its identification registers (chapter 09) |
Freeing initrd memory: 9204K | 7, initramfs | linux,initrd-start and -end in /chosen (chapter 13) |
Run /init as init process | 8, user space | the initramfs's /init |
reboot: Power down | after /init | PSCI SYSTEM_OFF, which ends macvmm with status 0 (chapter 08) |
Every line names something we built. The irq = 13 is Linux's own interrupt number, not INTID 33 of the GIC (Generic Interrupt Controller).
Notice what is missing: lines about hardware Linux went looking for. On Arm, nearly everything comes from the device tree. Linux probes only to confirm what the tree claims, and never searches the address space for devices the tree did not mention (it does ask firmware, over HVC (hypervisor call), about optional services, as you will see next). So a wrong node produces a wrong line, or no line. Your journal's second question asks you to extend the table to 20 lines; the annotator does the matching for any log you paste into it, yours included:
Boot-log annotator
Paste a Linux boot log and see each line's stage, what it means, and the device-tree node and chapter behind it; a cut-off log tells you which stage never finished.
Runs in browserOpen full page: Boot-log annotatorLoading the lab. If nothing appears, your browser may have JavaScript turned off or the lab failed to load.
What Linux used that our test guests never did
Linux uses corners of the machine no test guest touched. Two filters on the exit trace show them.
--trace takes one trace category after the file name, a kind of exit to keep: hvc since chapter 03, mmio since chapter 07, sysreg and psci since chapter 08, and all since chapter 11. psci keeps PSCI calls only, whichever conduit (HVC, or SMC, the secure monitor call) carried them. This chapter adds cancel, for the CANCELED exits that a timeout or a stop kick causes, and lets a comma-separated list keep the exits of any of them. Here the trace keeps only hypercalls and trapped system registers:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 30 --trace exits:boot.jsonl:hvc,sysreg > /dev/null && cat boot.jsonl{"t_ns":10215875,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_VERSION","action":"psci"}{"t_ns":10933541,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_MIGRATE_INFO_TYPE","action":"psci"}{"t_ns":11311583,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_FEATURES","action":"psci"}{"t_ns":11315125,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"SMCCC_VERSION","action":"smccc"}{"t_ns":11318416,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800081624aec","imm":0,"fn":"TRNG_VERSION","action":"smccc"}{"t_ns":11607208,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_FEATURES","action":"psci"}{"t_ns":11610375,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_FEATURES","action":"psci"}{"t_ns":11613500,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_FEATURES","action":"psci"}{"t_ns":11616416,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_FEATURES","action":"psci"}{"t_ns":11620833,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff8000809d78fc","imm":0,"fn":"VENDOR_HYP_CALL_UID","action":"smccc"}{"t_ns":13406041,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff80008004186c","imm":0,"fn":"SMCCC_ARCH_FEATURES","action":"smccc"}{"t_ns":33215208,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800081591304","imm":0,"fn":"SMCCC_ARCH_FEATURES","action":"smccc"}{"t_ns":37966833,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff8000809d78fc","imm":0,"fn":"VENDOR_HYP_CALL_UID","action":"smccc"}{"t_ns":48028875,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff80008004186c","imm":0,"fn":"SMCCC_ARCH_FEATURES","action":"smccc"}{"t_ns":48036875,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080042b08","imm":0,"fn":"SMCCC_ARCH_FEATURES","action":"smccc"}{"t_ns":55427791,"vcpu":0,"reason":"exception","ec":"0x18","pc":"0xffff800080029208","value":"0x0","sysreg":"OSDLR_EL1","sysreg_enc":"0x809c","action":"sysreg"}{"t_ns":55435125,"vcpu":0,"reason":"exception","ec":"0x18","pc":"0xffff80008002920c","value":"0x0","sysreg":"OSLAR_EL1","sysreg_enc":"0x8084","action":"sysreg"}{"t_ns":158456125,"vcpu":0,"reason":"exception","ec":"0x16","pc":"0xffff800080041338","imm":0,"fn":"PSCI_SYSTEM_OFF","action":"psci"}That is everything Linux said to our VMM that was not device access: 18 exits out of 32,829. Linux asks for the PSCI version, whether a Trusted OS needs migrating (PSCI_MIGRATE_INFO_TYPE; the log line Trusted OS migration not required), which PSCI calls exist (PSCI_FEATURES), the version of the SMCCC (SMC calling convention, SMCCC_VERSION), and which firmware workarounds exist (SMCCC_ARCH_FEATURES). It probes a random-number source (TRNG_VERSION) and which hypervisor it is talking to (VENDOR_HYP_CALL_UID); we answer both "not supported". It touches two debug registers and finally calls PSCI_SYSTEM_OFF. No ICC_ register appears, because the in-kernel GIC handles the CPU interface's ICC_ registers itself (chapter 12); with --irqchip none you would see them here.
To change the filter, make the category a set of bits and parse the list into it. parse returns None for an unknown name or an empty list, so a typo is an error rather than an empty trace. In learner/crates/vmm/src/trace.rs, where chapter 03 parsed a single name:
#[derive(Clone, Copy, Debug, PartialEq, Eq)]pub struct TraceCats(u8);impl TraceCats { /// Data aborts (EC 0x24). pub const MMIO: TraceCats = TraceCats(1 << 0); /// HVC exits (EC 0x16), whatever the call. pub const HVC: TraceCats = TraceCats(1 << 1); /// Trapped system registers (EC 0x18). pub const SYSREG: TraceCats = TraceCats(1 << 2); /// PSCI calls over either conduit (`action` = `psci`). pub const PSCI: TraceCats = TraceCats(1 << 3); /// `CANCELED` exits (kicks). pub const CANCEL: TraceCats = TraceCats(1 << 4); /// Every exit, including the ones no other category names. pub const ALL: TraceCats = TraceCats(0xff); pub const NONE: TraceCats = TraceCats(0); /// Parse a comma-separated list of category names; `None` if any name is unknown or the /// list is empty. pub fn parse(s: &str) -> Option<TraceCats> { let mut c = TraceCats::NONE; for name in s.split(',') { c = c.union(match name { "mmio" => TraceCats::MMIO, "hvc" => TraceCats::HVC, "sysreg" => TraceCats::SYSREG, "psci" => TraceCats::PSCI, "cancel" => TraceCats::CANCEL, "all" => TraceCats::ALL, _ => return None, }); } (c != TraceCats::NONE).then_some(c) } pub const fn union(self, o: TraceCats) -> TraceCats { TraceCats(self.0 | o.0) }The filter itself is a single predicate over a record. all sets every bit, so it selects everything:
/// Whether `rec` belongs to one of these categories.pub fn selects(self, rec: &ExitRecord) -> bool { use crate::arch::esr::ec; self.has(TraceCats::ALL) || (self.has(TraceCats::MMIO) && rec.ec == Some(ec::DABT_LOWER)) || (self.has(TraceCats::HVC) && rec.ec == Some(ec::HVC64)) || (self.has(TraceCats::SYSREG) && rec.ec == Some(ec::SYSREG)) || (self.has(TraceCats::PSCI) && rec.action == Some(Action::Psci)) || (self.has(TraceCats::CANCEL) && rec.reason == TraceReason::Canceled)}The second filter keeps memory-mapped I/O (MMIO) exits. First, does Linux ever touch the interrupt controller through us? Count every MMIO exit, then those anywhere in the GIC's window, 0x0800_0000 to 0x08FF_FFFF:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 30 --trace exits:mmio.jsonl:mmio > /dev/null && wc -l < mmio.jsonl && grep -cE '"ipa":"0x8[0-9a-f]{6}"' mmio.jsonl 32811032,811 device accesses, none to the GIC, and the boot's --stats said vtimer 0: Hypervisor.framework handles the GIC and the timer without asking us (chapter 12). Now grep for the last 256 bytes of the PL011 and PL031 windows, where the identification registers live:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 30 --trace exits:mmio.jsonl:mmio > /dev/null && grep -E '"ipa":"0x90(0|1)0f' mmio.jsonl{"t_ns":100722833,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9000fe0","wnr":false,"size":4,"reg":2,"value":"0x11","action":"mmio","isv":true}{"t_ns":100727041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9000fe4","wnr":false,"size":4,"reg":2,"value":"0x10","action":"mmio","isv":true}{"t_ns":100742083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9000fe8","wnr":false,"size":4,"reg":2,"value":"0x14","action":"mmio","isv":true}{"t_ns":100745583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9000fec","wnr":false,"size":4,"reg":2,"value":"0x0","action":"mmio","isv":true}{"t_ns":100748916,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9000ff0","wnr":false,"size":4,"reg":2,"value":"0xd","action":"mmio","isv":true}{"t_ns":100752208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9000ff4","wnr":false,"size":4,"reg":2,"value":"0xf0","action":"mmio","isv":true}{"t_ns":100755541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9000ff8","wnr":false,"size":4,"reg":2,"value":"0x5","action":"mmio","isv":true}{"t_ns":100758833,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9000ffc","wnr":false,"size":4,"reg":2,"value":"0xb1","action":"mmio","isv":true}{"t_ns":104125416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9010fe0","wnr":false,"size":4,"reg":2,"value":"0x31","action":"mmio","isv":true}{"t_ns":104135208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9010fe4","wnr":false,"size":4,"reg":2,"value":"0x10","action":"mmio","isv":true}{"t_ns":104138708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9010fe8","wnr":false,"size":4,"reg":2,"value":"0x14","action":"mmio","isv":true}{"t_ns":104142125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff800080859098","ipa":"0x9010fec","wnr":false,"size":4,"reg":2,"value":"0x0","action":"mmio","isv":true}{"t_ns":104145458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9010ff0","wnr":false,"size":4,"reg":2,"value":"0xd","action":"mmio","isv":true}{"t_ns":104148833,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9010ff4","wnr":false,"size":4,"reg":2,"value":"0xf0","action":"mmio","isv":true}{"t_ns":104152208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9010ff8","wnr":false,"size":4,"reg":2,"value":"0x5","action":"mmio","isv":true}{"t_ns":104155583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808590d8","ipa":"0x9010ffc","wnr":false,"size":4,"reg":2,"value":"0xb1","action":"mmio","isv":true}Chapter 09's parked question, answered by Linux. Before binding a driver to an "arm,primecell" node, Linux's AMBA bus code (AMBA, the Advanced Microcontroller Bus Architecture, is Arm's family of on-chip buses) reads the eight identification registers at 0xFE0 to 0xFFC and assembles them, as the primecell-ids primer describes.
0x11 0x10 0x14 0x00 is the peripheral ID 0x00141011: part 0x011, designer 0x41 (Arm), revision 1, hence "PL011 rev1" in the log. 0x0d 0xf0 0x05 0xb1 is the cell ID 0xB105F00D. No test guest of ours read those addresses; deliberate breakage 3 tests your chapter 09 guess.
Security
Every value in these traces came from the guest. A record holds only numbers and names from our own static tables, never guest-chosen text, so a trace, a stats line or a ring dump is safe to print on your terminal even with a hostile guest.
What a console byte costs
The boot's --stats said serial_written=12093 and data abort 32811: almost every exit is the console, about 2.7 per byte printed. Each byte costs a flag-register read to see if there is room, the store to the data register, and often another read, each a round trip to our VMM.
To measure it, boot the shell case with --stats twice, from inside learner/. The --timeout gives you time to type; make it longer if you are slow:
cargo run -q -p macvmm -- run --kernel ../.cache/macvmm/Image-virt --initrd ../.cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=shell" --timeout 20 --statsIn the first run type only poweroff -f. In the second, first type yes macvmm | head -c 65536, which prints 64 KiB of macvmm lines. Compare serial_written and data abort on the stats lines. Our two runs, of the same command from the root against the reference:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=shell" --timeout 20 --statsmacvmm-initramfs: ready 6.18.60-0-virt/ # poweroff -f[ 1.882996] reboot: Power downmacvmm: stats: serial_input_dropped=0 serial_input_queued=0 serial_written=12111 serial_sink_dropped=0 serial_capped=0 serial_lost=0 serial_filtered=3macvmm: stats: vcpu0 exits: vtimer 0, wfx 0, total 32931: hvc 16, sysreg 2, data abort 32913macvmm: stats: vcpu0 time: exec 0.102 s, wfi 1.747 smacvmm: stats: host cpu 0.198 s over 1.917 s wall (11%)macvmm: stats: rlimit core=0 nofile=1048576cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=shell" --timeout 20 --statsmacvmmma/ # poweroff -f[ 3.909161] reboot: Power downmacvmm: stats: serial_input_dropped=0 serial_input_queued=0 serial_written=87041 serial_sink_dropped=0 serial_capped=0 serial_lost=0 serial_filtered=6macvmm: stats: vcpu0 exits: vtimer 0, wfx 0, total 211004: hvc 16, sysreg 2, data abort 210986macvmm: stats: vcpu0 time: exec 0.179 s, wfi 3.377 smacvmm: stats: host cpu 0.733 s over 3.942 s wall (19%)macvmm: stats: rlimit core=0 nofile=1048576Subtract: 87,041 − 12,111 = 74,930 more bytes written, for 210,986 − 32,913 = 178,073 more exits. The bytes are the 64 KiB, a carriage return the guest's tty layer adds before each of its 9,362 newlines, and 32 bytes of echoed command and prompt. That is about 2.4 exits per byte, against 2.7 in the boot. The difference is the driver: earlycon, which prints much of the boot log, reads the flag register before and after every byte (three exits), while the full PL011 driver needs fewer.
The host spent 0.53 s more processor time. At chapter 03's 1.4 microseconds per exit, 178,000 exits are a quarter of a second of round trips alone; the rest is our own work per exit (decoding, the device lock, filtering, the terminal write). Write the number down; chapter 15 starts from it.
Shell, panic and SIGINT
The shell case starts an interactive BusyBox shell on the console. Type a command, and every keystroke travels from your terminal through the PL011's receive interrupt into the guest:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=shell" --timeout 30[ 0.122833] Run /init as init processmacvmm-initramfs: ready 6.18.60-0-virt/ # echo macvmm-shell: $((6*7))macvmm-shell: 42/ # poweroff -f[ 3.903152] reboot: Power downmacvmm-shell: 42 means input, the interrupt, the shell and output all work.
A kernel panic is the kernel's last resort: it prints why it cannot continue, then spins forever, which our VMM cannot tell apart from a busy kernel. So the checkpoint boots with panic=-1, which makes the kernel reboot at once after a panic, and with chapter 08's --on-reset exit, which turns that reboot (a PSCI SYSTEM_RESET) into exit status 4. A test then sees a panic as a number instead of a timeout:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 panic=-1 macvmm.test=panic" --on-reset exit --timeout 30[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x610f0000][ 0.000000] Linux version 6.18.60-0-virt (buildozer@build-3-24-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2026-11-01 07:26:31[ 0.000000] random: crng init done[ 0.000000] Machine model: macvmm-virt[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')[ 0.000000] printk: legacy bootconsole [pl11] enabled[ 0.000000] efi: UEFI not found.[ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x5fd03780-0x5fd05c3f][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] DMA32 empty[ 0.000000] Normal empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] psci: probing for conduit method from DT.[ 0.000000] psci: PSCIv1.1 detected in firmware.[ 0.000000] psci: Using standard PSCI v0.2 function IDs[ 0.000000] psci: Trusted OS migration not required[ 0.000000] psci: SMC Calling Convention v1.1[ 0.000000] percpu: Embedded 34 pages/cpu s99608 r8192 d31464 u139264[ 0.000000] Detected PIPT I-cache on CPU0[ 0.000000] CPU features: detected: Address authentication (IMP DEF algorithm)[ 0.000000] CPU features: detected: GICv3 CPU interface[ 0.000000] CPU features: detected: Spectre-v4[ 0.000000] CPU features: detected: Spectre-BHB[ 0.000000] alternatives: applying boot alternatives[ 0.000000] Kernel command line: console=ttyAMA0 earlycon=pl011,0x09000000 panic=-1 macvmm.test=panic[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB[ 0.000000] software IO TLB: area num 1.[ 0.000000] software IO TLB: mapped [mem 0x000000005f380000-0x000000005f400000] (0MB)[ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 131072[ 0.000000] Policy zone: DMA[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1[ 0.000000] Dynamic Preempt: none[ 0.000000] rcu: Preemptible hierarchical RCU implementation.[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4096 to nr_cpu_ids=1.[ 0.000000] Trampoline variant of Tasks RCU enabled.[ 0.000000] Tracing variant of Tasks RCU enabled.[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1[ 0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0[ 0.000000] GICv3: 988 SPIs implemented[ 0.000000] GICv3: 0 Extended SPIs implemented[ 0.000000] Root IRQ handler: gic_handle_irq[ 0.000000] GICv3: GICv3 features: 16 PPIs, RSS[ 0.000000] GICv3: GICD_CTLR.DS=1, SCR_EL3.FIQ=0[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.[ 0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns[ 0.000000] arch_timer: cp15 timer running at 24.00MHz (virt).[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns[ 0.000711] kfence: initialized - using 2097152 bytes for 255 objects at 0x(____ptrval____)-0x(____ptrval____)[ 0.001445] Console: colour dummy device 80x25[ 0.001761] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000)[ 0.002458] pid_max: default: 32768 minimum: 301[ 0.002771] LSM: initializing lsm=lockdown,capability,landlock,yama[ 0.003248] landlock: Up and running.[ 0.003497] Yama: becoming mindful.[ 0.003760] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.004255] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.005124] rcu: Hierarchical SRCU implementation.[ 0.005455] rcu: Max phase no-delay instances is 400.[ 0.005919] EFI services will not be available.[ 0.006252] smp: Bringing up secondary CPUs ...[ 0.006566] smp: Brought up 1 node, 1 CPU[ 0.006844] SMP: Total of 1 processors activated.[ 0.007172] CPU: All CPU(s) started at EL1[ 0.007459] CPU features: detected: Branch Target Identification[ 0.007876] CPU features: detected: ARMv8.4 Translation Table Level[ 0.008353] CPU features: detected: Data cache clean to the PoU not required for I/D coherence[ 0.009023] CPU features: detected: Common not Private translations[ 0.009506] CPU features: detected: CRC32 instructions[ 0.009891] CPU features: detected: Data independent timing control (DIT)[ 0.010384] CPU features: detected: E0PD[ 0.010671] CPU features: detected: Enhanced Privileged Access Never[ 0.011148] CPU features: detected: Generic authentication (IMP DEF algorithm)[ 0.011691] CPU features: detected: RCpc load-acquire (LDAPR)[ 0.012136] CPU features: detected: LSE atomic instructions[ 0.012574] CPU features: detected: Privileged Access Never[ 0.012991] CPU features: detected: RAS Extension Support[ 0.013384] CPU features: detected: Speculation barrier (SB)[ 0.013780] CPU features: detected: TLB range maintenance instructions[ 0.014285] CPU features: detected: Scalable Matrix Extension[ 0.014724] CPU features: detected: SME2[ 0.015072] alternatives: applying system-wide alternatives[ 0.016164] SME: minimum available vector length 64 bytes per vector[ 0.016625] SME: maximum available vector length 64 bytes per vector[ 0.017099] SME: default vector length 64 bytes per vector[ 0.017520] Memory: 464096K/524288K available (13312K kernel code, 1994K rwdata, 8460K rodata, 2048K init, 9282K bss, 57716K reserved, 0K cma-reserved)[ 0.018568] devtmpfs: initialized[ 0.018978] posixtimers hash table entries: 512 (order: 1, 8192 bytes, linear)[ 0.019529] futex hash table entries: 256 (16384 bytes on 1 NUMA nodes, total 16 KiB, linear).[ 0.020151] 23904 pages in range for non-PLT usage[ 0.020151] 515424 pages in range for PLT usage[ 0.020498] pinctrl core: initialized pinctrl subsystem[ 0.021222] DMI not present or invalid.[ 0.022050] NET: Registered PF_NETLINK/PF_ROUTE protocol family[ 0.022499] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations[ 0.022999] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations[ 0.023537] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations[ 0.024088] audit: initializing netlink subsys (disabled)[ 0.024518] thermal_sys: Registered thermal governor 'step_wise'[ 0.024522] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1[ 0.025497] cpuidle: using governor ladder[ 0.025785] cpuidle: using governor menu[ 0.026062] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.[ 0.026539] ASID allocator initialised with 65536 entries[ 0.026926] Serial: AMBA PL011 UART driver[ 0.027316] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 13, base_baud = 0) is a PL011 rev1[ 0.027946] printk: console [ttyAMA0] enabled[ 0.027946] printk: console [ttyAMA0] enabled[ 0.028460] printk: legacy bootconsole [pl11] disabled[ 0.028460] printk: legacy bootconsole [pl11] disabled[ 0.030105] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages[ 0.030105] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page[ 0.030106] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages[ 0.030106] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page[ 0.030106] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages[ 0.030106] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page[ 0.030107] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages[ 0.030107] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page[ 0.030216] ACPI: Interpreter disabled.[ 0.030220] iommu: Default domain type: Translated[ 0.030220] iommu: DMA domain TLB invalidation policy: lazy mode[ 0.030348] clocksource: Switched to clocksource arch_sys_counter[ 0.037687] VFS: Disk quotas dquot_6.6.0[ 0.037690] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)[ 0.037726] pnp: PnP ACPI: disabled[ 0.038149] NET: Registered PF_INET protocol family[ 0.038161] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)[ 0.043396] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)[ 0.043398] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)[ 0.043400] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)[ 0.043403] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)[ 0.043407] TCP: Hash tables configured (established 4096 bind 4096)[ 0.043419] MPTCP token hash table entries: 512 (order: 2, 12288 bytes, linear)[ 0.043423] UDP hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.043424] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.043435] NET: Registered PF_UNIX/PF_LOCAL protocol family[ 0.043438] NET: Registered PF_XDP protocol family[ 0.043440] PCI: CLS 0 bytes, default 64[ 0.043479] Unpacking initramfs...[ 0.048176] kvm [1]: HYP mode not available[ 0.048247] Initialise system trusted keyrings[ 0.048299] workingset: timestamp_bits=44 max_order=17 bucket_order=0[ 0.054489] Key type asymmetric registered[ 0.054490] Asymmetric key parser 'x509' registered[ 0.054498] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)[ 0.062367] io scheduler mq-deadline registered[ 0.062369] io scheduler kyber registered[ 0.062376] io scheduler bfq registered[ 0.062543] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled[ 0.062862] hv_vmbus: registering driver hyperv_keyboard[ 0.062993] rtc-pl031 9010000.pl031: registered as rtc0[ 0.062998] rtc-pl031 9010000.pl031: setting system clock to 2026-11-20T09:08:43 UTC (1795165723)[ 0.063060] NET: Registered PF_INET6 protocol family[ 0.065683] Segment Routing with IPv6[ 0.065685] In-situ OAM (IOAM) with IPv6[ 0.068410] registered taskstats version 1[ 0.068459] Loading compiled-in X.509 certificates[ 0.118328] Freeing initrd memory: 9204K[ 0.120787] Loaded X.509 cert 'alpinelinux.org: Alpine Linux kernel key: 87fa969a47f3e2a6aa35859eb932a17c95abcd82'[ 0.121332] Demotion targets for Node 0: null[ 0.121355] Key type .fscrypt registered[ 0.121355] Key type fscrypt-provisioning registered[ 0.123860] clk: Disabling unused clocks[ 0.123862] PM: genpd: Disabling unused power domains[ 0.124080] Freeing unused kernel memory: 2048K[ 0.124095] Run /init as init processmacvmm-initramfs: ready 6.18.60-0-virtmacvmm-initramfs: triggering a kernel panic[ 0.127196] sysrq: Trigger a crash[ 0.127197] Kernel panic - not syncing: sysrq triggered crash[ 0.127677] CPU: 0 UID: 0 PID: 1 Comm: init Not tainted 6.18.60-0-virt #1-Alpine PREEMPT(none) [ 0.128155] Hardware name: macvmm-virt (DT)[ 0.128391] Call trace:[ 0.128526] show_stack+0x28/0xbc (C)[ 0.128750] dump_stack_lvl+0x60/0x94[ 0.128952] dump_stack+0x18/0x30[ 0.129137] vpanic+0xf8/0x2e4[ 0.129298] trace_suspend_resume+0x0/0xcc[ 0.129510] sysrq_reset_seq_param_set+0x0/0xb4[ 0.129756] __handle_sysrq+0x94/0x1c0[ 0.129957] write_sysrq_trigger+0xd0/0x100[ 0.130184] proc_reg_write+0xa0/0x138[ 0.130379] vfs_write+0xd0/0x3a8[ 0.130560] ksys_write+0x64/0x120[ 0.130749] __arm64_sys_write+0x18/0x40[ 0.130979] invoke_syscall.constprop.0+0x54/0xe0[ 0.131221] el0_svc_common.constprop.0+0x38/0x120[ 0.131468] do_el0_svc+0x1c/0x40[ 0.131654] el0_svc+0x40/0x1e0[ 0.131823] el0t_64_sync_handler+0xb8/0xfc[ 0.132037] el0t_64_sync+0x198/0x19c[ 0.132237] Kernel Offset: disabled[ 0.132429] CPU features: 0x000000,00006500,42242281,94267727[ 0.132745] Memory Limit: nonemacvmm: guest requested a reset (exit code 4)Aside
panic=N is a kernel command-line parameter: after a panic, wait N seconds and reboot; a negative N reboots at once (Documentation/admin-guide/kernel-parameters.txt).
Two more behaviours the checkpoint checks. SIGINT stops the VM at once with status 130, 128 + 2. At a prompt, raw mode makes your Ctrl-C a byte for the guest's shell, not a signal; you quit with Ctrl-A x, and SIGINT comes from kill -INT or a script:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=shell" --timeout 30macvmm-initramfs: ready 6.18.60-0-virt/ # macvmm: user quit(macvmm exited 0.01 s after SIGINT)And timer-latency asks for a hundred 10 ms sleeps; each one needs the virtual timer to fire and the interrupt controller to wake the vCPU:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=timer-latency" --timeout 30[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x610f0000][ 0.000000] Linux version 6.18.60-0-virt (buildozer@build-3-24-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2026-11-01 07:26:31[ 0.000000] random: crng init done[ 0.000000] Machine model: macvmm-virt[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')[ 0.000000] printk: legacy bootconsole [pl11] enabled[ 0.000000] efi: UEFI not found.[ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x5fd03780-0x5fd05c3f][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] DMA32 empty[ 0.000000] Normal empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] psci: probing for conduit method from DT.[ 0.000000] psci: PSCIv1.1 detected in firmware.[ 0.000000] psci: Using standard PSCI v0.2 function IDs[ 0.000000] psci: Trusted OS migration not required[ 0.000000] psci: SMC Calling Convention v1.1[ 0.000000] percpu: Embedded 34 pages/cpu s99608 r8192 d31464 u139264[ 0.000000] Detected PIPT I-cache on CPU0[ 0.000000] CPU features: detected: Address authentication (IMP DEF algorithm)[ 0.000000] CPU features: detected: GICv3 CPU interface[ 0.000000] CPU features: detected: Spectre-v4[ 0.000000] CPU features: detected: Spectre-BHB[ 0.000000] alternatives: applying boot alternatives[ 0.000000] Kernel command line: console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=timer-latency[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB[ 0.000000] software IO TLB: area num 1.[ 0.000000] software IO TLB: mapped [mem 0x000000005f380000-0x000000005f400000] (0MB)[ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 131072[ 0.000000] Policy zone: DMA[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1[ 0.000000] Dynamic Preempt: none[ 0.000000] rcu: Preemptible hierarchical RCU implementation.[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4096 to nr_cpu_ids=1.[ 0.000000] Trampoline variant of Tasks RCU enabled.[ 0.000000] Tracing variant of Tasks RCU enabled.[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1[ 0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0[ 0.000000] GICv3: 988 SPIs implemented[ 0.000000] GICv3: 0 Extended SPIs implemented[ 0.000000] Root IRQ handler: gic_handle_irq[ 0.000000] GICv3: GICv3 features: 16 PPIs, RSS[ 0.000000] GICv3: GICD_CTLR.DS=1, SCR_EL3.FIQ=0[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.[ 0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns[ 0.000000] arch_timer: cp15 timer running at 24.00MHz (virt).[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns[ 0.000878] kfence: initialized - using 2097152 bytes for 255 objects at 0x(____ptrval____)-0x(____ptrval____)[ 0.001651] Console: colour dummy device 80x25[ 0.001976] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000)[ 0.002680] pid_max: default: 32768 minimum: 301[ 0.003027] LSM: initializing lsm=lockdown,capability,landlock,yama[ 0.003525] landlock: Up and running.[ 0.003860] Yama: becoming mindful.[ 0.004126] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.004618] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.005531] rcu: Hierarchical SRCU implementation.[ 0.005871] rcu: Max phase no-delay instances is 400.[ 0.006345] EFI services will not be available.[ 0.006673] smp: Bringing up secondary CPUs ...[ 0.006995] smp: Brought up 1 node, 1 CPU[ 0.007271] SMP: Total of 1 processors activated.[ 0.007595] CPU: All CPU(s) started at EL1[ 0.007896] CPU features: detected: Branch Target Identification[ 0.008315] CPU features: detected: ARMv8.4 Translation Table Level[ 0.008758] CPU features: detected: Data cache clean to the PoU not required for I/D coherence[ 0.009353] CPU features: detected: Common not Private translations[ 0.009795] CPU features: detected: CRC32 instructions[ 0.010157] CPU features: detected: Data independent timing control (DIT)[ 0.010627] CPU features: detected: E0PD[ 0.010889] CPU features: detected: Enhanced Privileged Access Never[ 0.011331] CPU features: detected: Generic authentication (IMP DEF algorithm)[ 0.011960] CPU features: detected: RCpc load-acquire (LDAPR)[ 0.012367] CPU features: detected: LSE atomic instructions[ 0.012817] CPU features: detected: Privileged Access Never[ 0.013205] CPU features: detected: RAS Extension Support[ 0.013703] CPU features: detected: Speculation barrier (SB)[ 0.014103] CPU features: detected: TLB range maintenance instructions[ 0.014556] CPU features: detected: Scalable Matrix Extension[ 0.014950] CPU features: detected: SME2[ 0.015256] alternatives: applying system-wide alternatives[ 0.016373] SME: minimum available vector length 64 bytes per vector[ 0.016825] SME: maximum available vector length 64 bytes per vector[ 0.017263] SME: default vector length 64 bytes per vector[ 0.017675] Memory: 464096K/524288K available (13312K kernel code, 1994K rwdata, 8460K rodata, 2048K init, 9282K bss, 57716K reserved, 0K cma-reserved)[ 0.020338] devtmpfs: initialized[ 0.020721] posixtimers hash table entries: 512 (order: 1, 8192 bytes, linear)[ 0.021375] futex hash table entries: 256 (16384 bytes on 1 NUMA nodes, total 16 KiB, linear).[ 0.022025] 23904 pages in range for non-PLT usage[ 0.022026] 515424 pages in range for PLT usage[ 0.022386] pinctrl core: initialized pinctrl subsystem[ 0.023171] DMI not present or invalid.[ 0.024031] NET: Registered PF_NETLINK/PF_ROUTE protocol family[ 0.024521] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations[ 0.025049] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations[ 0.025621] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations[ 0.026192] audit: initializing netlink subsys (disabled)[ 0.026628] thermal_sys: Registered thermal governor 'step_wise'[ 0.026636] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1[ 0.027615] cpuidle: using governor ladder[ 0.027936] cpuidle: using governor menu[ 0.028403] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.[ 0.029126] ASID allocator initialised with 65536 entries[ 0.029585] Serial: AMBA PL011 UART driver[ 0.029970] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 13, base_baud = 0) is a PL011 rev1[ 0.030521] printk: console [ttyAMA0] enabled[ 0.030521] printk: console [ttyAMA0] enabled[ 0.031073] printk: legacy bootconsole [pl11] disabled[ 0.031073] printk: legacy bootconsole [pl11] disabled[ 0.032898] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages[ 0.032899] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page[ 0.032899] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages[ 0.032900] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page[ 0.032900] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages[ 0.032900] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page[ 0.032900] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages[ 0.032900] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page[ 0.033027] ACPI: Interpreter disabled.[ 0.033032] iommu: Default domain type: Translated[ 0.033032] iommu: DMA domain TLB invalidation policy: lazy mode[ 0.033202] clocksource: Switched to clocksource arch_sys_counter[ 0.040862] VFS: Disk quotas dquot_6.6.0[ 0.040866] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)[ 0.041087] pnp: PnP ACPI: disabled[ 0.042108] NET: Registered PF_INET protocol family[ 0.042127] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)[ 0.046657] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)[ 0.046661] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)[ 0.046662] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)[ 0.046666] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)[ 0.046669] TCP: Hash tables configured (established 4096 bind 4096)[ 0.046685] MPTCP token hash table entries: 512 (order: 2, 12288 bytes, linear)[ 0.046688] UDP hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.046690] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.046701] NET: Registered PF_UNIX/PF_LOCAL protocol family[ 0.046704] NET: Registered PF_XDP protocol family[ 0.046707] PCI: CLS 0 bytes, default 64[ 0.046754] Unpacking initramfs...[ 0.051067] kvm [1]: HYP mode not available[ 0.051134] Initialise system trusted keyrings[ 0.051191] workingset: timestamp_bits=44 max_order=17 bucket_order=0[ 0.057358] Key type asymmetric registered[ 0.057358] Asymmetric key parser 'x509' registered[ 0.057366] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)[ 0.066260] io scheduler mq-deadline registered[ 0.066262] io scheduler kyber registered[ 0.066270] io scheduler bfq registered[ 0.066452] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled[ 0.066783] hv_vmbus: registering driver hyperv_keyboard[ 0.066891] rtc-pl031 9010000.pl031: registered as rtc0[ 0.066896] rtc-pl031 9010000.pl031: setting system clock to 2026-11-20T09:08:43 UTC (1795165723)[ 0.066958] NET: Registered PF_INET6 protocol family[ 0.067093] Segment Routing with IPv6[ 0.067095] In-situ OAM (IOAM) with IPv6[ 0.071252] registered taskstats version 1[ 0.071305] Loading compiled-in X.509 certificates[ 0.121230] Freeing initrd memory: 9204K[ 0.123833] Loaded X.509 cert 'alpinelinux.org: Alpine Linux kernel key: 87fa969a47f3e2a6aa35859eb932a17c95abcd82'[ 0.125026] Demotion targets for Node 0: null[ 0.125048] Key type .fscrypt registered[ 0.125048] Key type fscrypt-provisioning registered[ 0.126336] clk: Disabling unused clocks[ 0.126338] PM: genpd: Disabling unused power domains[ 0.127883] Freeing unused kernel memory: 2048K[ 0.127901] Run /init as init processmacvmm-initramfs: ready 6.18.60-0-virtmacvmm-timer: 100x usleep(10ms) took 1.07 s[ 1.199848] reboot: Power down1.07 s for a requested 1.00 s, shell overhead included: the timer and the GIC deliver promptly. The checkpoint accepts 1.00 to 1.99 s.
Good place to stop. The next half breaks the machine three ways and adds the dump that diagnoses them.
The exit ring, on demand
Chapter 07 gave every vCPU a ring of its last 256 exits, and a fatal stop printed the last 32 of them. That covers only failures our VMM notices; a panicked kernel spins quietly, and the run loop sees nothing. We need a ring dump: every running vCPU's ring, printed on request while the guest keeps running.
The requests come from chapter 09's stdin and signal threads, which live for the whole process. But each boot, and each reboot, builds a fresh machine with a fresh stop control, chapter 09's VmControl. The threads need a stable meeting point that each boot plugs into while it runs: HostCtl, new in learner/crates/vmm/src/hostctl.rs. A quit stops whatever boot is attached, and a quit between two boots stops the next one at once:
/// Attach this boot's `ctl` until the guard drops. If the user already asked to quit, the/// boot is stopped at once.pub fn attach<'a>(&'a self, ctl: &Arc<VmControl>) -> Attached<'a> { let quit = { let mut inner = lock(&self.inner); inner.current = Some(Arc::downgrade(ctl)); inner.quit }; if quit { ctl.request_stop(StopReason::UserQuit); } Attached { host: self }}/// The user asked to quit: stop the attached boot (exit code 130), and every later one./// Returns true the first time.pub fn request_quit(&self) -> bool { let (first, current) = { let mut inner = lock(&self.inner); let first = !inner.quit; inner.quit = true; (first, inner.current.as_ref().and_then(Weak::upgrade)) }; if let Some(ctl) = current { ctl.request_stop(StopReason::UserQuit); } first}Three edits wire it in:
- Add
hostctl: Arc<HostCtl>(made withArc::new(HostCtl::new())) to the struct that holds your host side. In the reference that isHostIo(crates/vmm/src/backend/hostio.rs); give the machine a clone of theArc. - At the start of
Machine::runinlearner/crates/vmm/src/machine/mod.rs, which chapter 08's reboot loop calls once per boot, writelet attached = self.hostctl.attach(&ctl);before the vCPUs start. The guard detaches whenrunreturns. - Make
Ctrl-A xand the signal thread's quit arms callhostctl.request_quit()instead ofctl.request_stop. In the reference,HostIo::request_quitdoes that.
Beside the attached boot, HostCtl keeps a list of rings, one per running vCPU:
#[derive(Debug, Default)]struct Inner { current: Option<Weak<VmControl>>, quit: bool, rings: Vec<(usize, Weak<ExitRing>)>,}The list holds a Weak (chapter 09's non-owning Arc, made here by Arc::downgrade) to each ExitRing, so the registry never keeps a ring alive: once the vCPU drops its own Arc, upgrade() returns None and the dump skips that ring. A dump that wins the race holds a ring only until its text is built, and Arc guarantees it never reads a freed one. The host-concurrency primer reviews Arc and Mutex:
/// Make vCPU `index`'s ring visible to [`HostCtl::dump_rings`] while it runs.pub fn register_ring(&self, index: usize, ring: &Arc<ExitRing>) { let mut inner = lock(&self.inner); inner.rings.retain(|(i, _)| *i != index); inner.rings.push((index, Arc::downgrade(ring)));}/// Forget vCPU `index`'s ring.pub fn unregister_ring(&self, index: usize) { lock(&self.inner).rings.retain(|(i, _)| *i != index);}/// The registered rings as text: one header per vCPU, then one JSON record per line,/// oldest first. Numbers and static names only.pub fn dump_rings(&self) -> String { let rings: Vec<(usize, Arc<ExitRing>)> = lock(&self.inner) .rings .iter() .filter_map(|(i, w)| w.upgrade().map(|r| (*i, r))) .collect(); crate::trace::dump_rings(&rings) // the format lives with the records}In chapter 07 your VcpuLog held the ring by value; make the field ring: Arc<ExitRing>, so the registry can hold a second, weak pointer to it. The vCPU thread reaches HostCtl through obs.host, an Option<&HostCtl> that Machine::run fills in (None in tests). In learner/crates/vmm/src/vcpu/manager.rs, each vCPU thread registers its ring once it is set up and allowed to run, and removes it when its run loop returns:
let mut log = VcpuLog::default();if let Some(host) = obs.host { host.register_ring(index, &log.ring); // Ctrl-A t and SIGUSR1 can dump it now}if let Some(host) = obs.host { host.unregister_ring(index);}The text itself is built next to the records, in learner/crates/vmm/src/trace.rs. Each ring is locked only for the copy inside ExitRing::last, never while formatting or writing, so a slow terminal cannot stall the guest:
pub fn dump_rings(rings: &[(usize, std::sync::Arc<ExitRing>)]) -> String { let mut out = String::new(); if rings.is_empty() { out.push_str("no vCPU is running\n"); } for (index, ring) in rings { let recs = ring.last(RING_CAP); let _ = writeln!(out, "vcpu{index}: last {} exits, oldest first:", recs.len()); for r in recs { out.push_str(" "); r.write_json(&mut out); // ends the line itself } } out}From the keyboard: add a t arm, Command::DumpRing, to chapter 09's escape parser in learner/crates/macvmm/src/term.rs (the tty-termios primer explains why raw mode hands us Ctrl-A as byte 0x01):
#[derive(Debug, Default)]pub struct EscapeParser { after_ctrl_a: bool,}impl EscapeParser { /// Split `input` into guest-bound bytes (appended to `to_guest`) and host commands /// (appended to `cmds`), in order. After a `Quit`, the rest of `input` is discarded. pub fn feed(&mut self, input: &[u8], to_guest: &mut Vec<u8>, cmds: &mut Vec<Command>) { for &b in input { if !self.after_ctrl_a { if b == CTRL_A { self.after_ctrl_a = true; } else { to_guest.push(b); } continue; } self.after_ctrl_a = false; match b { b'x' | b'X' => { cmds.push(Command::Quit); return; } b't' | b'T' => cmds.push(Command::DumpRing), b's' | b'S' => cmds.push(Command::Stats), b'h' | b'H' | b'?' => cmds.push(Command::Help), CTRL_A => to_guest.push(CTRL_A), _ => {} // unknown escape: both bytes are discarded } } }}Chapter 09 showed the stdin loop and the signal thread with their dump arms already in, and let you skip those arms because HostCtl did not exist yet. If you skipped them, add them now; if you stubbed them, point them at host.hostctl.dump_rings(). In the stdin loop, the arm prints the dump on standard error:
/// Run the stdin thread (detached; it ends at EOF, on a read error, or after Ctrl-A x).pub fn spawn_stdin(host: Arc<HostIo>) -> io::Result<()> { std::thread::Builder::new() .name("stdin".into()) .spawn(move || stdin_loop(&host)) .map(|_| ())}fn stdin_loop(host: &HostIo) { let mut stdin = io::stdin().lock(); let mut buf = [0u8; 4096]; let mut parser = EscapeParser::default(); let mut to_guest = Vec::with_capacity(buf.len()); let mut cmds = Vec::new(); loop { let n = match stdin.read(&mut buf) { Ok(0) => return, // EOF: the guest just sees no more input Ok(n) => n, Err(e) if e.kind() == io::ErrorKind::Interrupted => continue, Err(_) => return, }; to_guest.clear(); parser.feed(buf.get(..n).unwrap_or(&[]), &mut to_guest, &mut cmds); if !to_guest.is_empty() { // The PL011's queue (or, from chapter 17, the console's: whichever sink is stdio). host.stdin_queue().push(&to_guest); // never waits for room } for cmd in cmds.drain(..) { match cmd { Command::Quit => { host.request_quit(); return; } Command::DumpRing => err(host.hostctl.dump_rings().trim_end()), Command::Stats => err(&format!("macvmm: stats: {}", host.io_stats())), Command::Help => err(HELP), } } }}From another terminal: SIGUSR1, through chapter 09's self-pipe and signal thread. In learner/crates/macvmm/src/signals.rs, SIGUSR1 must be in the installed list, with its Ok(SIGUSR1) arm:
/// Route the signals to the self-pipe and start the (detached) thread that serves it.pub fn spawn(host: Arc<HostIo>) -> std::io::Result<()> { let pipe = SignalPipe::install(&[SIGINT, SIGTERM, SIGHUP, SIGUSR1])?; std::thread::Builder::new() .name("signal".into()) .spawn(move || { loop { match pipe.wait() { Ok(SIGUSR1) => err(host.hostctl.dump_rings().trim_end()), Ok(_) => { if !host.request_quit() { term::emergency_restore(); term::emergency_line("macvmm: user quit (second signal: exiting now)"); hvf::host::exit_now(USER_QUIT); } } Err(_) => return, } } }) .map(|_| ())}You will need this in the first break.
Breaking it on purpose
Three one-line edits to your learner/ tree, each undone before the next; Linux is unchanged. After each edit, boot the boot case from inside learner/ (cargo run rebuilds first):
cargo run -q -p macvmm -- run --kernel ../.cache/macvmm/Image-virt --initrd ../.cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 10A missing timer
Deliberate breakage 1: no /timer node. In learner/crates/vmm/src/fdt/machine.rs, delete the call that writes it, the line timer(&mut w, with_gic)?;. The node you removed is this one:
/// `/timer` (`arm,arch_timer.yaml`). No `clock-frequency`: the binding says firmware should/// set `CNTFRQ_EL0` instead, and HVF does (24 MHz, measured on this Mac).fn timer(w: &mut FdtWriter, with_gic: bool) -> Result<(), FdtError> { let n = w.begin_node("timer")?; w.prop_strs("compatible", &["arm,armv8-timer", "arm,armv7-timer"])?; w.prop_null("always-on")?; if with_gic { let cells: Vec<u32> = TIMER_PPIS .iter() .flat_map(|&ppi| [GIC_PPI, ppi, IRQ_TYPE_LEVEL_HIGH]) .collect(); w.prop_cells("interrupts", &cells)?; } w.end_node(n)}Predict What is the last line of serial output, and what exit status does macvmm return?
Write your guess under ## Predict in your journal before you look. A common guess is "no error at all: the output stops where the timer is set up". Another is "a clean message about the timer".
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 10[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x610f0000][ 0.000000] Linux version 6.18.60-0-virt (buildozer@build-3-24-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2026-11-01 07:26:31[ 0.000000] random: crng init done[ 0.000000] Machine model: macvmm-virt[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')[ 0.000000] printk: legacy bootconsole [pl11] enabled[ 0.000000] efi: UEFI not found.[ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x5fd03a00-0x5fd05ebf][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] DMA32 empty[ 0.000000] Normal empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] psci: probing for conduit method from DT.[ 0.000000] psci: PSCIv1.1 detected in firmware.[ 0.000000] psci: Using standard PSCI v0.2 function IDs[ 0.000000] psci: Trusted OS migration not required[ 0.000000] psci: SMC Calling Convention v1.1[ 0.000000] percpu: Embedded 34 pages/cpu s99608 r8192 d31464 u139264[ 0.000000] Detected PIPT I-cache on CPU0[ 0.000000] CPU features: detected: Address authentication (IMP DEF algorithm)[ 0.000000] CPU features: detected: GICv3 CPU interface[ 0.000000] CPU features: detected: Spectre-v4[ 0.000000] CPU features: detected: Spectre-BHB[ 0.000000] alternatives: applying boot alternatives[ 0.000000] Kernel command line: console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB[ 0.000000] software IO TLB: area num 1.[ 0.000000] software IO TLB: mapped [mem 0x000000005f380000-0x000000005f400000] (0MB)[ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 131072[ 0.000000] Policy zone: DMA[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1[ 0.000000] Dynamic Preempt: none[ 0.000000] rcu: Preemptible hierarchical RCU implementation.[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4096 to nr_cpu_ids=1.[ 0.000000] Trampoline variant of Tasks RCU enabled.[ 0.000000] Tracing variant of Tasks RCU enabled.[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1[ 0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0[ 0.000000] GICv3: 988 SPIs implemented[ 0.000000] GICv3: 0 Extended SPIs implemented[ 0.000000] Root IRQ handler: gic_handle_irq[ 0.000000] GICv3: GICv3 features: 16 PPIs, RSS[ 0.000000] GICv3: GICD_CTLR.DS=1, SCR_EL3.FIQ=0[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.[ 0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns[ 0.000000] timer_probe: no matching timers found[ 0.000000] Kernel panic - not syncing: Unable to initialise architected timer.[ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.18.60-0-virt #1-Alpine PREEMPT(none) [ 0.000000] Hardware name: macvmm-virt (DT)[ 0.000000] Call trace:[ 0.000000] show_stack+0x28/0xbc (C)[ 0.000000] dump_stack_lvl+0x60/0x94[ 0.000000] dump_stack+0x18/0x30[ 0.000000] vpanic+0xf8/0x2e4[ 0.000000] trace_suspend_resume+0x0/0xcc[ 0.000000] time_init+0x54/0x94[ 0.000000] start_kernel+0x598/0x758[ 0.000000] __primary_switched+0x88/0x90[ 0.000000] ---[ end Kernel panic - not syncing: Unable to initialise architected timer. ]---macvmm: timeout: the guest was still running after --timeout 10sWe checked this on a real Mac, and the second guess is the closer one: timer_probe: no matching timers found, then Kernel panic - not syncing: Unable to initialise architected timer., from stage 4, time_init. Linux cannot run without a clock, and says so.
But look at the bottom: exit status 5, from --timeout. Our VMM never learned that its guest had died. Ask the ring what the vCPU was doing. In a second run, we sent SIGUSR1 three seconds after the start (the capture's header records when):
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 6[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x610f0000][ 0.000000] Linux version 6.18.60-0-virt (buildozer@build-3-24-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2026-11-01 07:26:31[ 0.000000] random: crng init done[ 0.000000] Machine model: macvmm-virt[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')[ 0.000000] printk: legacy bootconsole [pl11] enabled[ 0.000000] efi: UEFI not found.[ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x5fd03a00-0x5fd05ebf][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] DMA32 empty[ 0.000000] Normal empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] psci: probing for conduit method from DT.[ 0.000000] psci: PSCIv1.1 detected in firmware.[ 0.000000] psci: Using standard PSCI v0.2 function IDs[ 0.000000] psci: Trusted OS migration not required[ 0.000000] psci: SMC Calling Convention v1.1[ 0.000000] percpu: Embedded 34 pages/cpu s99608 r8192 d31464 u139264[ 0.000000] Detected PIPT I-cache on CPU0[ 0.000000] CPU features: detected: Address authentication (IMP DEF algorithm)[ 0.000000] CPU features: detected: GICv3 CPU interface[ 0.000000] CPU features: detected: Spectre-v4[ 0.000000] CPU features: detected: Spectre-BHB[ 0.000000] alternatives: applying boot alternatives[ 0.000000] Kernel command line: console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB[ 0.000000] software IO TLB: area num 1.[ 0.000000] software IO TLB: mapped [mem 0x000000005f380000-0x000000005f400000] (0MB)[ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 131072[ 0.000000] Policy zone: DMA[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1[ 0.000000] Dynamic Preempt: none[ 0.000000] rcu: Preemptible hierarchical RCU implementation.[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4096 to nr_cpu_ids=1.[ 0.000000] Trampoline variant of Tasks RCU enabled.[ 0.000000] Tracing variant of Tasks RCU enabled.[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1[ 0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0[ 0.000000] GICv3: 988 SPIs implemented[ 0.000000] GICv3: 0 Extended SPIs implemented[ 0.000000] Root IRQ handler: gic_handle_irq[ 0.000000] GICv3: GICv3 features: 16 PPIs, RSS[ 0.000000] GICv3: GICD_CTLR.DS=1, SCR_EL3.FIQ=0[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.[ 0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns[ 0.000000] timer_probe: no matching timers found[ 0.000000] Kernel panic - not syncing: Unable to initialise architected timer.[ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.18.60-0-virt #1-Alpine PREEMPT(none) [ 0.000000] Hardware name: macvmm-virt (DT)[ 0.000000] Call trace:[ 0.000000] show_stack+0x28/0xbc (C)[ 0.000000] dump_stack_lvl+0x60/0x94[ 0.000000] dump_stack+0x18/0x30[ 0.000000] vpanic+0xf8/0x2e4[ 0.000000] trace_suspend_resume+0x0/0xcc[ 0.000000] time_init+0x54/0x94[ 0.000000] start_kernel+0x598/0x758[ 0.000000] __primary_switched+0x88/0x90[ 0.000000] ---[ end Kernel panic - not syncing: Unable to initialise architected timer. ]---vcpu0: last 256 exits, oldest first: {"t_ns":36131083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36132625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36134291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x5d","action":"mmio","isv":true} {"t_ns":36136375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36138375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36139958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36142416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36144041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36145583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2d","action":"mmio","isv":true} {"t_ns":36155750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36157458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36159250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2d","action":"mmio","isv":true} {"t_ns":36161416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36163500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36165083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2d","action":"mmio","isv":true} {"t_ns":36167750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36169291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36171000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x5b","action":"mmio","isv":true} {"t_ns":36173958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36175625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36177208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36180083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36181666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36183208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36185041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36186625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36188208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36191000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36192666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36194250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x64","action":"mmio","isv":true} {"t_ns":36198083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36199666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36201208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36204000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36205625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36207208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x4b","action":"mmio","isv":true} {"t_ns":36210208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36211750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36213333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36215583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36217208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36219166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x72","action":"mmio","isv":true} {"t_ns":36222333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36223875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36225416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36235083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36237208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36239375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36242041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36243625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36245333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6c","action":"mmio","isv":true} {"t_ns":36248166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36250208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36251833,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36254625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36256166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36257875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x70","action":"mmio","isv":true} {"t_ns":36260000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36262041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36263583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x61","action":"mmio","isv":true} {"t_ns":36266041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36267583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36269291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36273583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36275250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36276875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36279208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36280875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36282458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x63","action":"mmio","isv":true} {"t_ns":36285458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36287000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36288583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36291500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36293166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36294791,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2d","action":"mmio","isv":true} {"t_ns":36297666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36299291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36300875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36303875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36305500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36307083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36310041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36311583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36313166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6f","action":"mmio","isv":true} {"t_ns":36317583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36319250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36320875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x74","action":"mmio","isv":true} {"t_ns":36324750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36326291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36327958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36330250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36331791,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36333333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x73","action":"mmio","isv":true} {"t_ns":36336208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36337833,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36339458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x79","action":"mmio","isv":true} {"t_ns":36342375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36343916,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36345458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36347416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36349333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36351416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x63","action":"mmio","isv":true} {"t_ns":36354875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36356416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36357958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36360875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36362416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36363958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36367416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36368916,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36370458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x67","action":"mmio","isv":true} {"t_ns":36373166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36374708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36376250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x3a","action":"mmio","isv":true} {"t_ns":36378500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36380541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36382333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36384916,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36386458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36388125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x55","action":"mmio","isv":true} {"t_ns":36391083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36392708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36394291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36397291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36398875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36400541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x61","action":"mmio","isv":true} {"t_ns":36403375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36404916,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36406500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x62","action":"mmio","isv":true} {"t_ns":36409375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36411083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36412708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6c","action":"mmio","isv":true} {"t_ns":36415583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36417208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36418750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36421666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36423208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36424791,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36427708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36429250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36430750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x74","action":"mmio","isv":true} {"t_ns":36432583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36434125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36435625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6f","action":"mmio","isv":true} {"t_ns":36438166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36439708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36441375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36444291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36446000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36447541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36450333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36451875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36453541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6e","action":"mmio","isv":true} {"t_ns":36455583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36457625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36459208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36461666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36463208,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36464875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x74","action":"mmio","isv":true} {"t_ns":36467000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36469083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36470625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36474083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36475625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36477291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x61","action":"mmio","isv":true} {"t_ns":36479416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36481458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36483000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6c","action":"mmio","isv":true} {"t_ns":36485500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36487041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36488708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36491666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36493291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36494833,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x73","action":"mmio","isv":true} {"t_ns":36497583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36499125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36500625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36509875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36511583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36513250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36516125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36517791,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36519416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x61","action":"mmio","isv":true} {"t_ns":36522458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36524041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36525625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x72","action":"mmio","isv":true} {"t_ns":36528541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36530083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36531666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x63","action":"mmio","isv":true} {"t_ns":36534375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36535958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36537500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x68","action":"mmio","isv":true} {"t_ns":36539791,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36541500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36543500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36546416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36548000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36549583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x74","action":"mmio","isv":true} {"t_ns":36551958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36553541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36555125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36558083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36559750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36561416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x63","action":"mmio","isv":true} {"t_ns":36564333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36565916,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36567500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x74","action":"mmio","isv":true} {"t_ns":36569375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36570958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36572541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36575291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36576875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36578583,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x64","action":"mmio","isv":true} {"t_ns":36580666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36582708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36584291,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36586750,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36588333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36590000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x74","action":"mmio","isv":true} {"t_ns":36593000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36594666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36596250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x69","action":"mmio","isv":true} {"t_ns":36598541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36600041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36601625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x6d","action":"mmio","isv":true} {"t_ns":36604500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36606083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36607625,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x65","action":"mmio","isv":true} {"t_ns":36610500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36612083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36613666,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x72","action":"mmio","isv":true} {"t_ns":36615958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36617500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36619083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2e","action":"mmio","isv":true} {"t_ns":36622000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36623500,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36625125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x20","action":"mmio","isv":true} {"t_ns":36627041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36629000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36631041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x5d","action":"mmio","isv":true} {"t_ns":36633708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36635250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36636958,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2d","action":"mmio","isv":true} {"t_ns":36639041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36641125,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36642708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2d","action":"mmio","isv":true} {"t_ns":36645458,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36647000,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36648708,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0x2d","action":"mmio","isv":true} {"t_ns":36650416,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36652333,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36654250,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0xd","action":"mmio","isv":true} {"t_ns":36657041,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true} {"t_ns":36658541,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e64","ipa":"0x9000018","wnr":false,"size":4,"reg":2,"value":"0x90","action":"mmio","isv":true} {"t_ns":36660083,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0e90","ipa":"0x9000000","wnr":true,"size":1,"reg":1,"value":"0xa","action":"mmio","isv":true} {"t_ns":36662875,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff8000808d0ea4","ipa":"0x9000018","wnr":false,"size":4,"reg":1,"value":"0x90","action":"mmio","isv":true}macvmm: timeout: the guest was still running after --timeout 6sThe last 256 exits are the panic message, one byte at a time: a flag-register read (0x9000018), a data-register write (0x9000000), another read. The last record is stamped 36 ms after the start; the dump came at 3 s. For almost three seconds the vCPU ran without an exit, spinning in the panic loop. Press Ctrl-A t twice in your own run and watch the newest t_ns stay put.
What you saw: a named panic, then a hang our VMM could not see. The misconception it exposes: "if the guest dies, the VMM will know". The tool that finds it: the ring dump on demand, whose timestamps tell "stuck in a loop" from "busy".
A misplaced redistributor
Deliberate breakage 2: a wrong redistributor base. In gic() in learner/crates/vmm/src/fdt/machine.rs, change the second reg pair from GICR_BASE to GICR_BASE + 0x20000, one whole redistributor higher: each redistributor is 128 KiB (two 64 KiB frames, chapter 12). The real GIC is unchanged; only the device tree now points Linux at the wrong place:
/// `/intc@8000000` (`arm,gic-v3.yaml`): the in-kernel GICv3 HVF emulates at the layout bases/// (`vm::create_vm`). `reg[0]` is the distributor, `reg[1]` one redistributor region of/// `ncpus` 128 KiB frames (RD_base + SGI_base, IHI 0069 section 12.10). No ITS and no v2m frame: the/// virtio-mmio devices use wired SPIs.fn gic(w: &mut FdtWriter, layout: &Layout, d: &MachineDesc) -> Result<(), FdtError> { let gicr = layout .gicr_size(d.ncpus) .ok_or_else(|| bad(format!("{} vCPUs (1..={MAX_CPUS})", d.ncpus)))?; let n = w.begin_node(&format!("intc@{GICD_BASE:x}"))?; w.prop_str("compatible", "arm,gic-v3")?; w.prop_u32("#interrupt-cells", 3)?; w.prop_null("interrupt-controller")?; w.prop_u32("#address-cells", 2)?; w.prop_u32("#size-cells", 2)?; w.prop_null("ranges")?; w.prop_u32("#redistributor-regions", 1)?; let mut reg = reg64(GICD_BASE, GICD_SIZE).to_vec(); reg.extend_from_slice(®64(GICR_BASE, gicr)); w.prop_cells("reg", ®)?; w.prop_u32("phandle", GIC_PHANDLE)?; w.end_node(n)}Predict Does Linux notice, and does our VMM stop it with an unhandled-MMIO error?
Write your guess on paper; nothing checks it.
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 10[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x610f0000][ 0.000000] Linux version 6.18.60-0-virt (buildozer@build-3-24-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2026-11-01 07:26:31[ 0.000000] random: crng init done[ 0.000000] Machine model: macvmm-virt[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')[ 0.000000] printk: legacy bootconsole [pl11] enabled[ 0.000000] efi: UEFI not found.[ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x5fd03780-0x5fd05c3f][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] DMA32 empty[ 0.000000] Normal empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] psci: probing for conduit method from DT.[ 0.000000] psci: PSCIv1.1 detected in firmware.[ 0.000000] psci: Using standard PSCI v0.2 function IDs[ 0.000000] psci: Trusted OS migration not required[ 0.000000] psci: SMC Calling Convention v1.1[ 0.000000] percpu: Embedded 34 pages/cpu s99608 r8192 d31464 u139264[ 0.000000] Detected PIPT I-cache on CPU0[ 0.000000] CPU features: detected: Address authentication (IMP DEF algorithm)[ 0.000000] CPU features: detected: GICv3 CPU interface[ 0.000000] CPU features: detected: Spectre-v4[ 0.000000] CPU features: detected: Spectre-BHB[ 0.000000] alternatives: applying boot alternatives[ 0.000000] Kernel command line: console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB[ 0.000000] software IO TLB: area num 1.[ 0.000000] software IO TLB: mapped [mem 0x000000005f380000-0x000000005f400000] (0MB)[ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 131072[ 0.000000] Policy zone: DMA[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1[ 0.000000] Dynamic Preempt: none[ 0.000000] rcu: Preemptible hierarchical RCU implementation.[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4096 to nr_cpu_ids=1.[ 0.000000] Trampoline variant of Tasks RCU enabled.[ 0.000000] Tracing variant of Tasks RCU enabled.[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1[ 0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0[ 0.000000] GICv3: 988 SPIs implemented[ 0.000000] GICv3: 0 Extended SPIs implemented[ 0.000000] Root IRQ handler: gic_handle_irq[ 0.000000] GICv3: No redistributor present @(____ptrval____)[ 0.000000] ------------[ cut here ]------------[ 0.000000] WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic-v3.c:1174 gic_init_bases+0x444/0xf24[ 0.000000] Modules linked in:[ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.18.60-0-virt #1-Alpine PREEMPT(none) [ 0.000000] Hardware name: macvmm-virt (DT)[ 0.000000] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)[ 0.000000] pc : gic_init_bases+0x444/0xf24[ 0.000000] lr : gic_init_bases+0x41c/0xf24[ 0.000000] sp : ffff800081783b90[ 0.000000] x29: ffff800081783bf0 x28: ffff800081793fc8 x27: 0000000008000000[ 0.000000] x26: ffff000003007340 x25: 0000000000000001 x24: 000000000478001f[ 0.000000] x23: ffff800081793fc8 x22: ffff8000818a3000 x21: ffff00001fd07028[ 0.000000] x20: ffff800081793dc8 x19: 8efbc393b3c330a0 x18: 0000000000000000[ 0.000000] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000[ 0.000000] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000[ 0.000000] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000[ 0.000000] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000[ 0.000000] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000[ 0.000000] x2 : 0000000000000000 x1 : 00000000ffffffff x0 : 56f499ba3a082d85[ 0.000000] Call trace:[ 0.000000] gic_init_bases+0x444/0xf24 (P)[ 0.000000] gic_of_init+0x2ec/0x4cc[ 0.000000] of_irq_init+0x450/0x788[ 0.000000] irqchip_init+0x24/0x84[ 0.000000] init_IRQ+0xf4/0x158[ 0.000000] start_kernel+0x578/0x758[ 0.000000] __primary_switched+0x88/0x90[ 0.000000] ---[ end trace 0000000000000000 ]---[ 0.000000] GICv3: GICv3 features: 0 PPIs, RSS, DirectLPI[ 0.000000] GICv3: GICv4 features: DirectLPI RVPEID Valid+Dirty [ 0.000000] GICv3: GICD_CTLR.DS=1, SCR_EL3.FIQ=0[ 0.000000] GICv3: No redistributor present @(____ptrval____)[ 0.000000] ------------[ cut here ]------------[ 0.000000] CPU0: mpidr 0 has no re-distributor![ 0.000000] WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic-v3.c:1113 gic_init_bases+0xc9c/0xf24[ 0.000000] Modules linked in:[ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.18.60-0-virt #1-Alpine PREEMPT(none) [ 0.000000] Tainted: [W]=WARN[ 0.000000] Hardware name: macvmm-virt (DT)[ 0.000000] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)[ 0.000000] pc : gic_init_bases+0xc9c/0xf24[ 0.000000] lr : gic_init_bases+0xc9c/0xf24[ 0.000000] sp : ffff800081783b90[ 0.000000] x29: ffff800081783bf0 x28: ffff800081793fc8 x27: 0000000008000000[ 0.000000] x26: ffff000003007340 x25: 0000000000000001 x24: 0000000000000000[ 0.000000] x23: ffff8000810bb000 x22: ffff8000818a3000 x21: ffff00001fd07028[ 0.000000] x20: ffff800081793dc8 x19: bc779336ef2c5a3b x18: 0000000000000000[ 0.000000] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000[ 0.000000] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000[ 0.000000] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000[ 0.000000] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000[ 0.000000] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000[ 0.000000] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000[ 0.000000] Call trace:[ 0.000000] gic_init_bases+0xc9c/0xf24 (P)[ 0.000000] gic_of_init+0x2ec/0x4cc[ 0.000000] of_irq_init+0x450/0x788[ 0.000000] irqchip_init+0x24/0x84[ 0.000000] init_IRQ+0xf4/0x158[ 0.000000] start_kernel+0x578/0x758[ 0.000000] __primary_switched+0x88/0x90[ 0.000000] ---[ end trace 0000000000000000 ]---[ 0.000000] Unable to handle kernel paging request at virtual address 0000000000010100[ 0.000000] Mem abort info:[ 0.000000] ESR = 0x0000000096000044[ 0.000000] EC = 0x25: DABT (current EL), IL = 32 bits[ 0.000000] SET = 0, FnV = 0[ 0.000000] EA = 0, S1PTW = 0[ 0.000000] FSC = 0x04: level 0 translation fault[ 0.000000] Data abort info:[ 0.000000] ISV = 0, ISS = 0x00000044, ISS2 = 0x00000000[ 0.000000] CM = 0, WnR = 1, TnD = 0, TagAccess = 0[ 0.000000] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0[ 0.000000] [0000000000010100] user address but active_mm is swapper[ 0.000000] Internal error: Oops: 0000000096000044 [#1] SMP[ 0.000000] Modules linked in:[ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.18.60-0-virt #1-Alpine PREEMPT(none) [ 0.000000] Tainted: [W]=WARN[ 0.000000] Hardware name: macvmm-virt (DT)[ 0.000000] pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)[ 0.000000] pc : gic_poke_irq+0x68/0xe0[ 0.000000] lr : gic_poke_irq+0x2c/0xe0[ 0.000000] sp : ffff800081783a00[ 0.000000] x29: ffff800081783a10 x28: ffff8000818a3000 x27: ffff800080fea730[ 0.000000] x26: ffff80008003f510 x25: ffff800081790bc0 x24: ffff8000816dc008[ 0.000000] x23: 0000000000000001 x22: 0000000000000000 x21: 0000000000000000[ 0.000000] x20: 0000000000000000 x19: ffff000003036400 x18: 0000000000000000[ 0.000000] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000[ 0.000000] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000[ 0.000000] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000[ 0.000000] x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff000003036430[ 0.000000] x5 : 0000000000000000 x4 : ffff7fff9e5f0000 x3 : 0000000000000001[ 0.000000] x2 : 0000000000010100 x1 : 0000000000000000 x0 : 0000000000000100[ 0.000000] Call trace:[ 0.000000] gic_poke_irq+0x68/0xe0 (P)[ 0.000000] gic_unmask_irq+0x14/0x30[ 0.000000] irq_percpu_enable+0x2c/0xc0[ 0.000000] enable_percpu_irq+0x9c/0x124[ 0.000000] ipi_setup+0x60/0xd0[ 0.000000] set_smp_ipi_range_percpu+0x3fc/0x464[ 0.000000] gic_init_bases+0xd70/0xf24[ 0.000000] gic_of_init+0x2ec/0x4cc[ 0.000000] of_irq_init+0x450/0x788[ 0.000000] irqchip_init+0x24/0x84[ 0.000000] init_IRQ+0xf4/0x158[ 0.000000] start_kernel+0x578/0x758[ 0.000000] __primary_switched+0x88/0x90[ 0.000000] Code: 53057c21 d37e6821 8b204020 8b000042 (b9000043) [ 0.000000] ---[ end trace 0000000000000000 ]---[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task![ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---macvmm: timeout: the guest was still running after --timeout 10sStage 3 fails loudly: GICv3: No redistributor present, a WARNING with a call trace, then an Oops in gic_poke_irq and a panic. Our VMM printed nothing until the timeout. Why no unhandled-MMIO stop? The trace says:
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 5 --trace exits:gic.jsonl:mmio > /dev/null; grep '"ipa":"0x80' gic.jsonl{"t_ns":50782166,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff80008075c750","ipa":"0x80cffe8","wnr":false,"size":4,"reg":0,"value":"0x0","action":"mmio","isv":true}{"t_ns":75653375,"vcpu":0,"reason":"exception","ec":"0x24","pc":"0xffff80008075c750","ipa":"0x80cffe8","wnr":false,"size":4,"reg":0,"value":"0x0","action":"mmio","isv":true}macvmm: timeout: the guest was still running after --timeout 5sLinux read offset 0xFFE8 of the redistributor it was told about: the register GICR_PIDR2, whose architecture-revision field must say "GICv3" or "GICv4". Hypervisor.framework claims only the redistributors of the vCPUs that exist, 128 KiB for our one vCPU. Our VMM maps the rest of the window, up to the PL011, as a read-as-zero, writes-ignored region, so a stray access gets zeros instead of a fatal stop. The healthy boot counted no GIC exits because Linux never strays there; this time it did. The region is registered in learner/crates/vmm/src/machine/virt.rs:
let frames = Layout::virt() .gicr_size(ncpus) .ok_or(Error::Internal("vCPU count outside 1..=MAX_CPUS"))?;let rest = GICR_BASE .checked_add(frames) .filter(|start| *start < GICR_WINDOW_END);if let Some(start) = rest { bus.insert( "gicr-unused", start, GICR_WINDOW_END.saturating_sub(start), Arc::new(Mutex::new(RazWi::new("gicr-unused"))), ) .map_err(Error::Bus)?;}So the answer was a polite 0x0, and Linux concluded no redistributor was there.
An Oops is Linux's report of a fault inside the kernel itself; here it was fatal. Read it with chapter 02's tools. The ESR (exception syndrome register) is 0x96000044: EC (exception class) 0x25, a data abort taken at the current exception level (EL1); the Oops prints it as DABT. So it went to the guest's own vector table, not to us.
The address is exact, too. To enable a per-CPU interrupt, gic_poke_irq writes to the redistributor's second 64 KiB frame plus GICR_ISENABLER0 (0x100). With no redistributor found, its base is 0: 0 + 0x10000 + 0x100 = 0x10100. The ISS (instruction specific syndrome) bits agree: WnR = 1 (write-not-read: a write), and FSC = 0x04 (fault status code: a translation fault at level 0), an address nothing maps.
What you saw: a loud failure at the GIC stage, and silence from the VMM. The misconception: "a wrong address gives an unhandled-MMIO error". The tool: a trace filtered to mmio, grepped for the window.
A mute UART
Deliberate breakage 3: identification registers that read zero. In learner/crates/vmm/src/devices/pl011.rs, set ID_BYTES to [0; 8], and add --stats to the boot command.
Predict Using your chapter 09 guess: what happens to the console?
Write your guess in your journal under Q3, where you will check it.
cargo run -q -p macvmm -- run --kernel .cache/macvmm/Image-virt --initrd .cache/macvmm/initramfs-test.img --mem 512M --cmdline "console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot" --timeout 10 --stats[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x610f0000][ 0.000000] Linux version 6.18.60-0-virt (buildozer@build-3-24-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2026-11-01 07:26:31[ 0.000000] random: crng init done[ 0.000000] Machine model: macvmm-virt[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')[ 0.000000] printk: legacy bootconsole [pl11] enabled[ 0.000000] efi: UEFI not found.[ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] NODE_DATA(0) allocated [mem 0x5fd03780-0x5fd05c3f][ 0.000000] Zone ranges:[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] DMA32 empty[ 0.000000] Normal empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff][ 0.000000] psci: probing for conduit method from DT.[ 0.000000] psci: PSCIv1.1 detected in firmware.[ 0.000000] psci: Using standard PSCI v0.2 function IDs[ 0.000000] psci: Trusted OS migration not required[ 0.000000] psci: SMC Calling Convention v1.1[ 0.000000] percpu: Embedded 34 pages/cpu s99608 r8192 d31464 u139264[ 0.000000] Detected PIPT I-cache on CPU0[ 0.000000] CPU features: detected: Address authentication (IMP DEF algorithm)[ 0.000000] CPU features: detected: GICv3 CPU interface[ 0.000000] CPU features: detected: Spectre-v4[ 0.000000] CPU features: detected: Spectre-BHB[ 0.000000] alternatives: applying boot alternatives[ 0.000000] Kernel command line: console=ttyAMA0 earlycon=pl011,0x09000000 macvmm.test=boot[ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)[ 0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB[ 0.000000] software IO TLB: area num 1.[ 0.000000] software IO TLB: mapped [mem 0x000000005f380000-0x000000005f400000] (0MB)[ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 131072[ 0.000000] Policy zone: DMA[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1[ 0.000000] Dynamic Preempt: none[ 0.000000] rcu: Preemptible hierarchical RCU implementation.[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4096 to nr_cpu_ids=1.[ 0.000000] Trampoline variant of Tasks RCU enabled.[ 0.000000] Tracing variant of Tasks RCU enabled.[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1[ 0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0[ 0.000000] GICv3: 988 SPIs implemented[ 0.000000] GICv3: 0 Extended SPIs implemented[ 0.000000] Root IRQ handler: gic_handle_irq[ 0.000000] GICv3: GICv3 features: 16 PPIs, RSS[ 0.000000] GICv3: GICD_CTLR.DS=1, SCR_EL3.FIQ=0[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.[ 0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns[ 0.000000] arch_timer: cp15 timer running at 24.00MHz (virt).[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns[ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns[ 0.000729] kfence: initialized - using 2097152 bytes for 255 objects at 0x(____ptrval____)-0x(____ptrval____)[ 0.001475] Console: colour dummy device 80x25[ 0.001798] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000)[ 0.002484] pid_max: default: 32768 minimum: 301[ 0.002817] LSM: initializing lsm=lockdown,capability,landlock,yama[ 0.003293] landlock: Up and running.[ 0.003542] Yama: becoming mindful.[ 0.004196] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.004715] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)[ 0.005666] rcu: Hierarchical SRCU implementation.[ 0.006004] rcu: Max phase no-delay instances is 400.[ 0.006705] EFI services will not be available.[ 0.007039] smp: Bringing up secondary CPUs ...[ 0.007349] smp: Brought up 1 node, 1 CPU[ 0.007618] SMP: Total of 1 processors activated.[ 0.007936] CPU: All CPU(s) started at EL1[ 0.008224] CPU features: detected: Branch Target Identification[ 0.008776] CPU features: detected: ARMv8.4 Translation Table Level[ 0.009200] CPU features: detected: Data cache clean to the PoU not required for I/D coherence[ 0.009956] CPU features: detected: Common not Private translations[ 0.010408] CPU features: detected: CRC32 instructions[ 0.010888] CPU features: detected: Data independent timing control (DIT)[ 0.011482] CPU features: detected: E0PD[ 0.011817] CPU features: detected: Enhanced Privileged Access Never[ 0.012339] CPU features: detected: Generic authentication (IMP DEF algorithm)[ 0.013032] CPU features: detected: RCpc load-acquire (LDAPR)[ 0.013736] CPU features: detected: LSE atomic instructions[ 0.014163] CPU features: detected: Privileged Access Never[ 0.014558] CPU features: detected: RAS Extension Support[ 0.014945] CPU features: detected: Speculation barrier (SB)[ 0.015354] CPU features: detected: TLB range maintenance instructions[ 0.015798] CPU features: detected: Scalable Matrix Extension[ 0.016185] CPU features: detected: SME2[ 0.016497] alternatives: applying system-wide alternatives[ 0.017698] SME: minimum available vector length 64 bytes per vector[ 0.018340] SME: maximum available vector length 64 bytes per vector[ 0.018859] SME: default vector length 64 bytes per vector[ 0.019287] Memory: 464096K/524288K available (13312K kernel code, 1994K rwdata, 8460K rodata, 2048K init, 9282K bss, 57716K reserved, 0K cma-reserved)[ 0.020415] devtmpfs: initialized[ 0.020858] posixtimers hash table entries: 512 (order: 1, 8192 bytes, linear)[ 0.021417] futex hash table entries: 256 (16384 bytes on 1 NUMA nodes, total 16 KiB, linear).[ 0.022064] 23904 pages in range for non-PLT usage[ 0.022065] 515424 pages in range for PLT usage[ 0.022529] pinctrl core: initialized pinctrl subsystem[ 0.023298] DMI not present or invalid.[ 0.024239] NET: Registered PF_NETLINK/PF_ROUTE protocol family[ 0.024714] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations[ 0.025220] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations[ 0.025758] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations[ 0.026292] audit: initializing netlink subsys (disabled)[ 0.026723] thermal_sys: Registered thermal governor 'step_wise'[ 0.026732] audit: type=2000 audit(0.021:1): state=initialized audit_enabled=0 res=1[ 0.027666] cpuidle: using governor ladder[ 0.027940] cpuidle: using governor menu[ 0.028216] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.[ 0.028672] ASID allocator initialised with 65536 entries[ 0.029051] Serial: AMBA PL011 UART driver[ 0.030421] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages[ 0.031989] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page[ 0.032508] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages[ 0.033069] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page[ 0.033582] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages[ 0.034138] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page[ 0.034651] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages[ 0.035208] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page[ 0.041586] ACPI: Interpreter disabled.[ 0.041944] iommu: Default domain type: Translated[ 0.042305] iommu: DMA domain TLB invalidation policy: lazy mode[ 0.043395] clocksource: Switched to clocksource arch_sys_counter[ 0.044000] VFS: Disk quotas dquot_6.6.0[ 0.044287] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)[ 0.045190] pnp: PnP ACPI: disabled[ 0.045942] NET: Registered PF_INET protocol family[ 0.046325] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)[ 0.051483] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)[ 0.052087] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)[ 0.052634] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)[ 0.053170] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)[ 0.053688] TCP: Hash tables configured (established 4096 bind 4096)[ 0.054163] MPTCP token hash table entries: 512 (order: 2, 12288 bytes, linear)[ 0.054690] UDP hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.055904] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes, linear)[ 0.056574] NET: Registered PF_UNIX/PF_LOCAL protocol family[ 0.056987] NET: Registered PF_XDP protocol family[ 0.057335] PCI: CLS 0 bytes, default 64[ 0.057798] Unpacking initramfs...[ 0.066464] kvm [1]: HYP mode not available[ 0.067031] Initialise system trusted keyrings[ 0.068632] workingset: timestamp_bits=44 max_order=17 bucket_order=0[ 0.078376] Key type asymmetric registered[ 0.078736] Asymmetric key parser 'x509' registered[ 0.079165] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)[ 0.092184] io scheduler mq-deadline registered[ 0.092598] io scheduler kyber registered[ 0.092944] io scheduler bfq registered[ 0.094536] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled[ 0.096572] hv_vmbus: registering driver hyperv_keyboard[ 0.097180] rtc-pl031 9010000.pl031: registered as rtc0[ 0.097564] rtc-pl031 9010000.pl031: setting system clock to 2026-11-20T10:22:03 UTC (1795170123)[ 0.098289] NET: Registered PF_INET6 protocol family[ 0.101535] Segment Routing with IPv6[ 0.101843] In-situ OAM (IOAM) with IPv6[ 0.105496] registered taskstats version 1[ 0.105869] Loading compiled-in X.509 certificates[ 0.164689] Freeing initrd memory: 9204K[ 0.168847] Loaded X.509 cert 'alpinelinux.org: Alpine Linux kernel key: 87fa969a47f3e2a6aa35859eb932a17c95abcd82'[ 0.170586] Demotion targets for Node 0: null[ 0.170942] Key type .fscrypt registered[ 0.171211] Key type fscrypt-provisioning registered[ 0.174147] clk: Disabling unused clocks[ 0.174440] PM: genpd: Disabling unused power domains[ 0.175583] Warning: unable to open an initial console.[ 0.176039] Freeing unused kernel memory: 2048K[ 0.176445] Run /init as init process[ 0.179510] reboot: Power downmacvmm: stats: serial_input_dropped=0 serial_input_queued=0 serial_written=11796 serial_sink_dropped=0 serial_capped=0 serial_lost=0 serial_filtered=0macvmm: stats: vcpu0 exits: vtimer 0, wfx 0, total 35470: hvc 16, sysreg 2, data abort 35452macvmm: stats: vcpu0 time: exec 0.126 s, wfi 0.000 smacvmm: stats: host cpu 0.200 s over 0.221 s wall (91%)macvmm: stats: rlimit core=0 nofile=1048576Exit status 0, and reboot: Power down. But there is no ttyAMA0 at MMIO line, Linux warns unable to open an initial console, and the line macvmm-initramfs: ready never appears. The AMBA bus read zeros where 0x00141011 and the cell ID 0xB105F00D should be, so it could not identify the device and kept deferring it (try the trace: the ID reads repeat). No driver bound, and no ttyAMA0 was created.
Why do the kernel's own lines still appear? earlycon writes to the PL011 by address, and Linux retires it only when a real console (ttyAMA0) registers, which never happened, so the kernel kept printing through it.
/init writes to /dev/console, which needs that real console (the linux-boot-sequence primer), so its output had nowhere to go. Remove earlycon from the command line, and you have the opening run: a kernel that boots, powers off, and says nothing.
What you saw: a "successful" boot with a missing line. The misconception: "if Linux boots, the devices are correct". The tool: the stage table, which says which milestone line is missing, and the --stats line, which says the kernel ran: 35,470 exits.
Three fingerprints
What a broken part looks like from outside (its last stage, what the kernel says, how our VMM exits) is its failure fingerprint:
| Broken part | Last stage reached | Kernel says | macvmm exit |
|---|---|---|---|
/timer node | 4, time | Unable to initialise architected timer, panic | 5, timeout |
| redistributor base | 3, interrupts | No redistributor present, Oops, panic | 5, timeout |
| PL011 identification registers | 8, but with no console | unable to open an initial console | 0 |
None of the three produced a diagnostic from our VMM: at most a timeout. Breakage 3 is the dangerous one: Linux tolerated a broken device and reported success, so booting is where testing starts, not where it ends. A timeline of a run's trace shows where its exits cluster and stop; try your three broken runs:
Boot timeline
See where a Linux boot's VM exits cluster and where they stop: chapter 14's real reference boot, its three deliberate breakages, or a trace file from your own run, on one zoomable time axis.
Runs in browserOpen full page: Boot timelineYour turn
Before the checkpoint:
- Boot the
shellcase with thecargo runline from the console measurement. At the prompt, pressCtrl-Athent; from a second terminal, runkill -USR1 $(pgrep -n macvmm)and compare. - Rerun the boot with
--trace exits:boot.jsonl:psciand check that only PSCI calls remain. - Repeat the 64 KiB measurement on your own build and write both numbers in your journal.
- Extend the log table to 20 lines in journal question 2.
Try it
In primecell() in learner/crates/vmm/src/fdt/machine.rs, which writes both the PL011 and the PL031 nodes, skip the interrupts property for the PL011 only (when region.base is PL011_BASE), and boot the shell case. Before you run it, predict which of output and input still work, then look at whether the prompt appears and whether it answers your typing.
Stuck? scripts/learner hint 14 gives four hints, from a nudge to the exact reference file.
Checkpoint
Checkpoint
Needs a MacRun this from the repository root:
scripts/checkpoint.sh 14You should see, as the last line:
CHECKPOINT 14 PASSThe checkpoint first runs three host-only tests: two on your comma-list parse (a union of names; unknown or empty refused) and one on a ring registry that never keeps a ring alive. Then it boots Linux six ways on your Mac and checks:
- (a)
macvmm.test=bootprints eight of the table's milestone lines plusmacvmm-initramfs: ready, in order, fromBooting Linux on physical CPUtoreboot: Power down, with noKernel panic,unhandled MMIOorunknown SMCCC, and exits 0; its trace, filtered tohvc,sysreg, holdsPSCI_VERSIONandPSCI_SYSTEM_OFFand no data abort, which proves the filter dropped the MMIO exits; - (b)
shellanswersmacvmm-shell: 42and powers off with 0; - (c)
panicexits 4; - (d) SIGINT at the prompt exits 130;
- (e)
timer-latencyreports a time from 1.00 to 1.99 s; - (f) SIGUSR1 and then
Ctrl-A tat the prompt each print a 256-exit dump on standard error, and the shell still answers.
Then it checks your journal. This is the checkpoint on our Mac, run against the reference:
scripts/checkpoint.sh 14[PASS] contract tests trace_cats (3 tests)[PASS] runs on your Mac boot: 9/9 serial markers, 2/2 trace markers, exit 0 in 0.38s[PASS] runs on your Mac shell: 4/4 serial markers, exit 0 in 0.34s[PASS] runs on your Mac panic: 2/2 serial markers, exit 4 in 0.27s[PASS] runs on your Mac sigint: 3/3 serial markers, exit 130 in 0.26s[PASS] runs on your Mac timer-latency: 3/3 serial markers, exit 0 in 1.38s[PASS] runs on your Mac ring-dump: 8/8 serial markers, exit 0 in 0.93s[INFO] journal not checked (not a learner tree)CHECKPOINT 14 PASSWhat now works:
- a stock Linux kernel boots on your VMM to a shell, takes your typing, and powers off, panics or quits with distinct exit statuses;
- you can trace any line of its boot log to the node or device that caused it;
- you can tell a missing timer, a misplaced redistributor and a mute UART apart from their fingerprints;
- you can dump a running guest's last 256 exits, and filter a trace;
- you know what a console byte costs: between 2.4 and 2.7 exits.
This is the end of the core path. The next chapter starts from this state (the reference at the end of chapter 14).
What's next
178,000 exits for 64 KiB of text; a disk read through registers like the PL011's would cost as many. Chapter 15 builds virtio, a standard way for guest and VMM to share rings of buffers in guest memory, so a whole request costs one exit instead of one per byte; chapter 18 uses it for a disk, a file on your Mac that the guest sees as a block device.
Open question
Linux booted. List three things a useful VM must do that this one cannot, and defend the order you would build them in: what would you build first, and why that one?
Spec hunt
- GICv3 and GICv4 architecture specification (Arm IHI 0069), register GICR_PIDR2: which field did Linux read at offset
0xFFE8in breakage 2, and which values mean "a GICv3 or GICv4 redistributor is here"? - PrimeCell UART (PL011) Technical Reference Manual (Arm DDI 0183), registers UARTPeriphID0-3 and UARTPCellID0-3: which bits of the eight bytes give the part number, the designer and the revision that Linux printed as "PL011 rev1"?
- Linux device-tree binding
Documentation/devicetree/bindings/timer/arm,arch_timer.yaml: which properties are required, and in which order are the four timer interrupts listed?