summaryrefslogtreecommitdiff
path: root/arch/arm/kvm/interrupts.S
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-01-03 11:01:49 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2016-02-29 18:34:12 +0000
commit0ca5565df8ef7534c0d85ec87e6c74f8ebe86e88 (patch)
tree8e59e7da933cc8b9dd19992a5d6d956c26d70ca4 /arch/arm/kvm/interrupts.S
parent42428525a9eefea9dda68de684381ce9f3dc4266 (diff)
ARM: KVM: Move VFP registers to a CPU context structure
In order to turn the WS code into something that looks a bit more like the arm64 version, move the VFP registers into a CPU context container for both the host and the guest. Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm/interrupts.S')
-rw-r--r--arch/arm/kvm/interrupts.S10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S
index 9d9cb71df449..7bfb28936914 100644
--- a/arch/arm/kvm/interrupts.S
+++ b/arch/arm/kvm/interrupts.S
@@ -172,10 +172,11 @@ __kvm_vcpu_return:
#ifdef CONFIG_VFPv3
@ Switch VFP/NEON hardware state to the host's
- add r7, vcpu, #VCPU_VFP_GUEST
+ add r7, vcpu, #(VCPU_GUEST_CTXT + CPU_CTXT_VFP)
store_vfp_state r7
- add r7, vcpu, #VCPU_VFP_HOST
+ add r7, vcpu, #VCPU_HOST_CTXT
ldr r7, [r7]
+ add r7, r7, #CPU_CTXT_VFP
restore_vfp_state r7
after_vfp_restore:
@@ -482,10 +483,11 @@ switch_to_guest_vfp:
set_hcptr vmtrap, (HCPTR_TCP(10) | HCPTR_TCP(11))
@ Switch VFP/NEON hardware state to the guest's
- add r7, r0, #VCPU_VFP_HOST
+ add r7, r0, #VCPU_HOST_CTXT
ldr r7, [r7]
+ add r7, r7, #CPU_CTXT_VFP
store_vfp_state r7
- add r7, r0, #VCPU_VFP_GUEST
+ add r7, r0, #(VCPU_GUEST_CTXT + CPU_CTXT_VFP)
restore_vfp_state r7
pop {r3-r7}