Plug in the core handler for hypercalls, so we can start implementing the more interesting stuff.
Based on patches by Antonios Motakis Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- hypervisor/arch/arm64/traps.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hypervisor/arch/arm64/traps.c b/hypervisor/arch/arm64/traps.c index 3aaaba8..3523b7d 100644 --- a/hypervisor/arch/arm64/traps.c +++ b/hypervisor/arch/arm64/traps.c @@ -45,6 +45,16 @@ static int handle_smc(struct trap_context *ctx) return TRAP_HANDLED; } +static int handle_hvc(struct trap_context *ctx) +{ + unsigned long *regs = ctx->regs; + unsigned long code = regs[0]; + + regs[0] = hypercall(code, regs[1], regs[2]); + + return TRAP_HANDLED; +} + static void dump_regs(struct trap_context *ctx) { unsigned char i; @@ -132,6 +142,10 @@ static void arch_handle_trap(struct per_cpu *cpu_data, ret = handle_smc(&ctx); break; + case ESR_EC_HVC64: + ret = handle_hvc(&ctx); + break; + default: ret = TRAP_UNHANDLED; } -- 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 jailhouse-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.