Convert the TTBR0_EL2 value into a physical address before passing it to enable_mmu_el2. This conceptually makes it an opaque 64-bit value, so also adjust the function's parameter type.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm64/include/asm/setup.h | 9 ++------- hypervisor/arch/arm64/setup.c | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hypervisor/arch/arm64/include/asm/setup.h b/hypervisor/arch/arm64/include/asm/setup.h index 00dd9e1..81161f8 100644 --- a/hypervisor/arch/arm64/include/asm/setup.h +++ b/hypervisor/arch/arm64/include/asm/setup.h @@ -13,13 +13,8 @@ #ifndef _JAILHOUSE_ASM_SETUP_H #define _JAILHOUSE_ASM_SETUP_H -#include <asm/percpu.h> +#include <jailhouse/types.h> -#ifndef __ASSEMBLY__ +void enable_mmu_el2(u64 ttbr0_el2); -#include <jailhouse/string.h> - -void enable_mmu_el2(page_table_t ttbr0_el2); - -#endif /* !__ASSEMBLY__ */ #endif /* !_JAILHOUSE_ASM_SETUP_H */ diff --git a/hypervisor/arch/arm64/setup.c b/hypervisor/arch/arm64/setup.c index 1c9f212..595a25b 100644 --- a/hypervisor/arch/arm64/setup.c +++ b/hypervisor/arch/arm64/setup.c @@ -54,7 +54,7 @@ int arch_cpu_init(struct per_cpu *cpu_data) int err; /* switch to the permanent page tables */ - enable_mmu_el2(hv_paging_structs.root_table); + enable_mmu_el2(paging_hvirt2phys(hv_paging_structs.root_table)); cpu_data->mpidr = phys_processor_id(); -- 2.1.4 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
