## Goal Set up a stage-2 page table so that guest physical memory accesses are translated and controlled by the hypervisor. ## Tasks - [ ] Implement `s2_map_page(ipa, pa, perms)`: walk/build stage-2 table (IPA → PA) - [ ] Configure `VTCR_EL2`: T0SZ, SL0, granule, IPS - [ ] Configure `VTTBR_EL2`: stage-2 root PA, VMID=1 - [ ] Identity-map all RAM in stage-2 (IPA == PA) so the EL1 kernel boots unmodified - [ ] Enable stage-2: set `HCR_EL2.VM=1`
Goal
Set up a stage-2 page table so that guest physical memory accesses are translated and controlled by the hypervisor.
Tasks
s2_map_page(ipa, pa, perms): walk/build stage-2 table (IPA → PA)VTCR_EL2: T0SZ, SL0, granule, IPSVTTBR_EL2: stage-2 root PA, VMID=1HCR_EL2.VM=1