KVM: arm/arm64: vgic-v2: Do not save an LR known to be empty
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 9 Feb 2016 17:09:49 +0000 (17:09 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 9 Mar 2016 04:22:24 +0000 (04:22 +0000)
commitf8cfbce1bb85984d2601a18e8f21dacc1b79dce3
tree82a1d4ace25eb2bc717f35e7015a52cfc842079b
parent2a1044f8b7bfd99296774f5f90abf8f96013a997
KVM: arm/arm64: vgic-v2: Do not save an LR known to be empty

On exit, any empty LR will be signaled in GICH_ELRSR*. Which
means that we do not have to save it, and we can just clear
its state in the in-memory copy.

Take this opportunity to move the LR saving code into its
own function.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/hyp/vgic-v2-sr.c