2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 14:14:01 +08:00

arm64: hyp-stub: Zero x0 on successful stub handling

We now return HVC_STUB_ERR when a stub hypercall fails, but we
leave whatever was in x0 on success. Zeroing it on return seems
like a good idea.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
This commit is contained in:
Marc Zyngier 2017-04-03 19:38:05 +01:00 committed by Christoffer Dall
parent 0b51c547fd
commit af42f20480
2 changed files with 6 additions and 4 deletions

View File

@ -73,8 +73,10 @@ el1_sync:
/* Someone called kvm_call_hyp() against the hyp-stub... */
ldr x0, =HVC_STUB_ERR
eret
9: eret
9: mov x0, xzr
eret
ENDPROC(el1_sync)
.macro invalid_vector label

View File

@ -154,13 +154,13 @@ reset:
/* Install stub vectors */
adr_l x5, __hyp_stub_vectors
msr vbar_el2, x5
b exit
mov x0, xzr
eret
1: /* Bad stub call */
ldr x0, =HVC_STUB_ERR
exit:
eret
ENDPROC(__kvm_handle_stub_hvc)
.ltorg