Skip to content
indicogni
/
Build a
VMM
Course
Primers
Labs
Glossary
Reference
Contents
Part 0
What a virtual machine is, and where ours sits
00
Two kernels, one Mac: what a virtual machine is
01
Where our VMM sits: Hypervisor.framework and a hand-written FFI
Part I
The bare machine, first VM exit
02
An exception, one level up: your first VM exit
03
A guest of your own, and what an exit costs
Part II
Memory
04
Guest memory: the only safe access is a copy
05
Two stages, one map: holes in stage 2 on purpose
Part III
A CPU that runs: registers, exits, sysregs
06
vCPU state: registers, PSTATE and reset
07
The exit loop: decoding syndromes and emulating MMIO
08
System registers, injection, hypercalls and PSCI
Part IV
Devices: MMIO, PL011, DTB
09
A device is a state machine: the bus, PL011 and PL031
10
The Device Tree: the VMM's promise to the guest
Part V
Interrupts and time
11
Getting the CPU back: the timer and a bare interrupt
12
Why an interrupt controller, and why in the kernel
Part VI
Booting Linux
13
Loading kernels: arm64 Image, initramfs and ELF
14
Booting Linux to a shell
Part VII
Virtio
15
Rings and a doorbell: the virtio-mmio transport
16
Split virtqueues: shared memory with an adversary
17
virtio-rng (worked) and virtio-console (faded)
18
virtio-blk: a root filesystem that persists
19
virtio-net without a networking entitlement
Part VIII
SMP
20
SMP: many vCPUs, many threads
Part IX
Firmware and FreeBSD
21
Firmware: a stricter guest (U-Boot, flash, ISV=0)
22
FreeBSD through U-Boot EFI
Part X
macOS guests
23
macOS guests, the high road: Virtualization.framework
24
macOS guests, the low road: vmapple and AVPBooter (capstone)
Part XI
Productization
25
Hardening: threat model, fuzzing and sandboxing
26
Snapshots: save, restore, resume (planned)
27
Debugging and performance: gdbstub, exit profiling (planned)
Also
Primers
Labs
Glossary
Part 0
What a virtual machine is, and where ours sits
00
Two kernels, one Mac: what a virtual machine is
01
Where our VMM sits: Hypervisor.framework and a hand-written FFI
Part I
The bare machine, first VM exit
02
An exception, one level up: your first VM exit
03
A guest of your own, and what an exit costs
Part II
Memory
04
Guest memory: the only safe access is a copy
05
Two stages, one map: holes in stage 2 on purpose
Part III
A CPU that runs: registers, exits, sysregs
06
vCPU state: registers, PSTATE and reset
07
The exit loop: decoding syndromes and emulating MMIO
08
System registers, injection, hypercalls and PSCI
Part IV
Devices: MMIO, PL011, DTB
09
A device is a state machine: the bus, PL011 and PL031
10
The Device Tree: the VMM's promise to the guest
Part V
Interrupts and time
11
Getting the CPU back: the timer and a bare interrupt
12
Why an interrupt controller, and why in the kernel
Part VI
Booting Linux
13
Loading kernels: arm64 Image, initramfs and ELF
14
Booting Linux to a shell
Part VII
Virtio
15
Rings and a doorbell: the virtio-mmio transport
16
Split virtqueues: shared memory with an adversary
17
virtio-rng (worked) and virtio-console (faded)
18
virtio-blk: a root filesystem that persists
19
virtio-net without a networking entitlement
Part VIII
SMP
20
SMP: many vCPUs, many threads
Part IX
Firmware and FreeBSD
21
Firmware: a stricter guest (U-Boot, flash, ISV=0)
22
FreeBSD through U-Boot EFI
Part X
macOS guests
23
macOS guests, the high road: Virtualization.framework
24
macOS guests, the low road: vmapple and AVPBooter (capstone)
Part XI
Productization
25
Hardening: threat model, fuzzing and sandboxing
26
Snapshots: save, restore, resume (planned)
27
Debugging and performance: gdbstub, exit profiling (planned)
Also
Primers
Labs
Glossary
Part VI
Booting Linux
13
Loading kernels: arm64 Image, initramfs and ELF
Needs a Mac
Runs in browser
~4.5 h
14
Booting Linux to a shell
Needs a Mac
Runs in browser
~5 h