minimal hypervisor for aarch64 (WIP)
| include | ||
| src | ||
| .gitignore | ||
| guest.S | ||
| linker.ld | ||
| Makefile | ||
| README.txt | ||
┌─────────────────────────────────────────────────────────────────────────────┐
│ OVERVIEW │
└─────────────────────────────────────────────────────────────────────────────┘
lyra is a current WIP arm64 type1 hypervisor executing at el2 privilege level.
it implements full hardware virtualisation w stage2 page
tables, vcpu context switching and exception vector routing
arm virtualization extensions provide hardware assisted capabilities:
~ stage2 address translation via vtcr_el2 and vttbr_el2
~ cpu state management w full register context
~ exception handling and trap and emulate semantics
~ mmu virtualisation w nested page table walks
~ device emulation (uart virtualisation)
┌─────────────────────────────────────────────────────────────────────────────┐
│ ARCHITECTURAL OVERVIEW │
└─────────────────────────────────────────────────────────────────────────────┘
the hypervisor implements ur typical vmm architecture:
HOST (EL2) GUEST (EL1)
┌─────────────┐ ┌─────────────┐
│ lyra │ │ guest │
│ hypervisor │◄────────────►│ kernel │
│ │ │ │
└─────────────┘ └─────────────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ stage1 mmu │ │ stage1 mmu │
│ (host PTs) │ │ (guest PTs) │
└─────────────┘ └─────────────┘
│ │
▼ ▼
┌─────────────────────────────────────────┐
│ stage2 mmu │
│ (address translation) │
└─────────────────────────────────────────┘
│
▼
┌─────────────┐
│ hardware │
│ memory │
└─────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ MEMORY LAYOUT │
└─────────────────────────────────────────────────────────────────────────────┘
physical memory map:
┌─────────────────────────────────────────────────────────────────────────────┐
│ 0x40000000 - 0x43ffffff │ host hypervisor code/data (64mb) │
│ 0x44000000 - 0x47ffffff │ guest vm memory space (64mb) │
│ 0x09000000 - 0x09000fff │ uart mmio region (4kb) │
└─────────────────────────────────────────────────────────────────────────────┘
virtual memory layout (guest):
┌─────────────────────────────────────────────────────────────────────────────┐
│ 0x40000000 - 0x43ffffff │ guest physical memory │
│ 0x09000000 - 0x09000fff │ virtualized uart device │
└─────────────────────────────────────────────────────────────────────────────┘