KVM: arm64: Move common VHE/non-VHE trap config in separate functions
authorChristoffer Dall <christoffer.dall@linaro.org>
Fri, 4 Aug 2017 06:50:25 +0000 (08:50 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 10:53:19 +0000 (10:53 +0000)
commitd5a21bcc29955c7df3fbd881b4c4229090331a5d
treeab02bfb451f4b04e74de22949effe9725acff6f4
parentb9f8ca4db409c6cd24218bfc90eafe8a0df42927
KVM: arm64: Move common VHE/non-VHE trap config in separate functions

As we are about to be more lazy with some of the trap configuration
register read/writes for VHE systems, move the logic that is currently
shared between VHE and non-VHE into a separate function which can be
called from either the world-switch path or from vcpu_load/vcpu_put.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/hyp/switch.c