AArch64 EL2 hypervisor for QEMU virt that boots at EL2
1

Configure Feed

Select the types of activity you want to include in your feed.

Formalise EL2 vector provenance checks during early bringup

+14 -2
+12 -2
arch/aarch64/arch.c
··· 33 33 return v; 34 34 } 35 35 36 + uint64_t arch_vectors_base(void) 37 + { 38 + return (uint64_t)(uintptr_t)__vectors_el2; 39 + } 40 + 41 + bool arch_vectors_aligned(void) 42 + { 43 + return hv_is_aligned_u64(arch_vectors_base(), 2048u); 44 + } 45 + 36 46 uint64_t arch_irq_save(void) 37 47 { 38 48 uint64_t flags; ··· 90 100 91 101 void arch_install_vectors(void) 92 102 { 93 - if (!hv_is_aligned_u64((uint64_t)(uintptr_t)__vectors_el2, 2048u)) { 103 + if (!arch_vectors_aligned()) { 94 104 panic("VBAR_EL2 vector table is not 2KB aligned"); 95 105 } 96 - __asm__ volatile("msr vbar_el2, %0\nisb" :: "r"(__vectors_el2) : "memory"); 106 + __asm__ volatile("msr vbar_el2, %0\nisb" :: "r"(arch_vectors_base()) : "memory"); 97 107 } 98 108 99 109 void arch_tlbi_vmalle1is(void)
+2
include/hv/arch.h
··· 18 18 uint64_t arch_mpidr_el1(void); 19 19 uint64_t arch_cntpct_el0(void); 20 20 uint64_t arch_cntfrq_el0(void); 21 + uint64_t arch_vectors_base(void); 22 + bool arch_vectors_aligned(void); 21 23 uint64_t arch_irq_save(void); 22 24 void arch_irq_restore(uint64_t flags); 23 25 void arch_dump_el2_state(void);