diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-04-03 19:38:05 +0100 |
---|---|---|
committer | Christoffer Dall <cdall@linaro.org> | 2017-04-09 07:49:35 -0700 |
commit | af42f20480bf13d9dbf099ccca65f3de8c44fcaf (patch) | |
tree | fda8f02af6f84242bbbedaa5a99185fdc05055e5 /arch/arm64/kvm/hyp-init.S | |
parent | 0b51c547fdb7ee05b6d65471785a1d899c8a667c (diff) | |
download | linux-af42f20480bf13d9dbf099ccca65f3de8c44fcaf.tar.bz2 |
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>
Diffstat (limited to 'arch/arm64/kvm/hyp-init.S')
-rw-r--r-- | arch/arm64/kvm/hyp-init.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 3734e6315cd7..839425c24b1c 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S @@ -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 |