From: Marc Zyngier Date: Mon, 3 Apr 2017 18:37:51 +0000 (+0100) Subject: ARM: hyp-stub: Define a return value for failed stub calls X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4c70cf07cecab1dd5446249dc8d4795bec693c78;p=linux.git ARM: hyp-stub: Define a return value for failed stub calls Define a standard return value to be returned when a hyp stub call fails. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h index 4ea16fcaf2edc..c16f70d6953f1 100644 --- a/arch/arm/include/asm/virt.h +++ b/arch/arm/include/asm/virt.h @@ -104,4 +104,6 @@ extern char __hyp_text_end[]; #endif /* __ASSEMBLY__ */ +#define HVC_STUB_ERR 0xbadca11 + #endif /* ! VIRT_H */ diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 15eaa14322a70..b20ca88159115 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S @@ -216,7 +216,7 @@ __hyp_stub_do_trap: bne 1f bx r1 -1: mov r0, #-1 +1: ldr r0, =HVC_STUB_ERR __hyp_stub_exit: __ERET