## Goal Detect and configure EL2 so that the kernel can act as a hypervisor host. ## Tasks - [ ] Detect `CurrentEL` at entry; branch to EL2 setup path if at EL2 - [ ] Configure `HCR_EL2`: `RW=1` (EL1 is AArch64), `VM=0` initially, `IMO/FMO/AMO` routing - [ ] Set up EL2 stack and EL2 exception vectors - [ ] Drop to EL1 via `eret` with `SPSR_EL2` = EL1h, all interrupts unmasked
Goal
Detect and configure EL2 so that the kernel can act as a hypervisor host.
Tasks
CurrentELat entry; branch to EL2 setup path if at EL2HCR_EL2:RW=1(EL1 is AArch64),VM=0initially,IMO/FMO/AMOroutingeretwithSPSR_EL2= EL1h, all interrupts unmasked