arm64: kvm: Move lr save/restore from do_el2_call into EL1
authorJames Morse <james.morse@arm.com>
Wed, 27 Apr 2016 16:47:02 +0000 (17:47 +0100)
committerAlex Shi <alex.shi@linaro.org>
Thu, 17 Nov 2016 01:49:37 +0000 (09:49 +0800)
commit46b1c4a370fbdef15423ba645772ab7e5486d711
tree5225cc2ed58dddade8f01034aab77d387c21f21d
parent09fa0a88d0a37d7b53ec1208a0c949d8ee3e6279
arm64: kvm: Move lr save/restore from do_el2_call into EL1

Today the 'hvc' calling KVM or the hyp-stub is expected to preserve all
registers. KVM saves/restores the registers it needs on the EL2 stack using
do_el2_call(). The hyp-stub has no stack, later patches need to be able to
be able to clobber the link register.

Move the link register save/restore to the the call sites.

Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 00a44cdaba0900c63a003e0c431f506f49376a90)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/kernel/hyp-stub.S
arch/arm64/kvm/hyp.S
arch/arm64/kvm/hyp/hyp-entry.S