Part 11: Virtualization
Prerequisites: 2.6 The trap-control map, 3.3 Routing and masking, 4.1 GICv3 architecture, 4.4 LPIs and the ITS, 4.6 The Generic Timer, 5.1 Translation regimes and stages, 5.8 MMU faults and how to decode them, 9.1 TLBs and TLB maintenance. If you already know: how KVM’s world switch, VHE and the vGIC work, skim 11.1–11.2 and 11.4. Read 11.3 (attribute combination and FWB) and 11.5 (SMMUv3) anyway, because they carry most of the memory-system and bring-up content. Why this matters for bring-up/validation: EL2 and the SMMU decide what every guest and every DMA master can reach, and firmware leaves the trap, timer-offset, GIC and SMMU state that the hypervisor and the IOMMU driver depend on.
EL2 is a trap-and-translate layer. A hypervisor gets control in three ways: by trapping guest instructions and register accesses (HCR_EL2, HCRX_EL2 and the fine-grained trap registers), by translating every guest physical address through stage 2, and by owning physical interrupts and presenting virtual ones. Part 11 covers these in that order. 11.1 covers the trap controls and what a hypervisor must trap. 11.2 covers VHE, which lets a host kernel run at EL2, and the nested-virtualization extensions built on it. 11.3 covers stage 2 itself: its configuration, its faults, and how its attributes and permissions combine with stage 1, which is where FEAT_S2FWB and the cache-coherency problems of virtual machines arise. 11.4 covers virtual exceptions, the GICv3 list registers, GICv4/4.1 direct injection, and the virtual timer.
11.5 applies the same ideas to DMA masters. The SMMUv3 is a separately specified translation unit (IHI0070). It uses stage 1 and stage 2 tables in the same formats as the PE, but it has its own stream and context tables, command and event queues, and its own coherency attributes. Most SMMU bring-up bugs are in the StreamID mapping, the invalidation protocol and coherency, not in translation itself, so 11.5 closes with those mistakes.