Commit d9118c87 authored by Marc Zyngier's avatar Marc Zyngier Committed by Christoffer Dall

ARM: hyp-stub: Zero r0 on successful stub handling

We now return HVC_STUB_ERR when a stub hypercall fails, but we
leave whatever was in r0 on success. Zeroing it on return seems
like a good idea.
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarChristoffer Dall <cdall@linaro.org>
parent af42f204
...@@ -215,8 +215,10 @@ __hyp_stub_do_trap: ...@@ -215,8 +215,10 @@ __hyp_stub_do_trap:
beq __hyp_stub_exit beq __hyp_stub_exit
ldr r0, =HVC_STUB_ERR ldr r0, =HVC_STUB_ERR
__ERET
__hyp_stub_exit: __hyp_stub_exit:
mov r0, #0
__ERET __ERET
ENDPROC(__hyp_stub_do_trap) ENDPROC(__hyp_stub_do_trap)
......
...@@ -155,8 +155,10 @@ reset: ...@@ -155,8 +155,10 @@ reset:
b exit b exit
1: ldr r0, =HVC_STUB_ERR 1: ldr r0, =HVC_STUB_ERR
eret
exit: exit:
mov r0, #0
eret eret
ENDPROC(__kvm_handle_stub_hvc) ENDPROC(__kvm_handle_stub_hvc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment