summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/hyp-stub.S
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2017-04-03 19:37:52 +0100
committerChristoffer Dall <cdall@linaro.org>2017-04-09 07:49:27 -0700
commit7d1bf4e05717d900e69b249b4f08f6b36b00fbf0 (patch)
treeeb51f41c4aeed1dc30a9f2763f5620c4c198b419 /arch/arm/kernel/hyp-stub.S
parent4c70cf07cecab1dd5446249dc8d4795bec693c78 (diff)
ARM: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall
Let's define a new stub hypercall that resets the HYP configuration to its default: hyp-stub vectors, and MMU disabled. Of course, for the hyp-stub itself, this is a trivial no-op. Hypervisors will have a bit more work to do. Tested-by: Keerthy <j-keerthy@ti.com> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'arch/arm/kernel/hyp-stub.S')
-rw-r--r--arch/arm/kernel/hyp-stub.S11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
index b20ca8815911..e637854335aa 100644
--- a/arch/arm/kernel/hyp-stub.S
+++ b/arch/arm/kernel/hyp-stub.S
@@ -216,7 +216,10 @@ __hyp_stub_do_trap:
bne 1f
bx r1
-1: ldr r0, =HVC_STUB_ERR
+1: teq r0, #HVC_RESET_VECTORS
+ beq __hyp_stub_exit
+
+ ldr r0, =HVC_STUB_ERR
__hyp_stub_exit:
__ERET
@@ -264,6 +267,12 @@ ENTRY(__hyp_soft_restart)
ret lr
ENDPROC(__hyp_soft_restart)
+ENTRY(__hyp_reset_vectors)
+ mov r0, #HVC_RESET_VECTORS
+ __HVC(0)
+ ret lr
+ENDPROC(__hyp_reset_vectors)
+
#ifndef ZIMAGE
.align 2
.L__boot_cpu_mode_offset: