diff options
author | Marc Zyngier | 2016-01-04 09:54:50 +0100 |
---|---|---|
committer | Marc Zyngier | 2016-02-29 19:34:13 +0100 |
commit | e59bff9bf302bf1332c6421b39ba2e82b84e63a6 (patch) | |
tree | 77555ba3c94f53e9d19e1d8a3ffb824dac708492 /arch/arm/kvm/hyp/hyp.h | |
parent | ARM: KVM: Add CP15 save/restore code (diff) | |
download | kernel-qcow2-linux-e59bff9bf302bf1332c6421b39ba2e82b84e63a6.tar.gz kernel-qcow2-linux-e59bff9bf302bf1332c6421b39ba2e82b84e63a6.tar.xz kernel-qcow2-linux-e59bff9bf302bf1332c6421b39ba2e82b84e63a6.zip |
ARM: KVM: Add timer save/restore
This patch shouldn't exist, as we should be able to reuse the
arm64 version for free. I'll get there eventually, but in the
meantime I need a timer ticking.
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm/hyp/hyp.h')
-rw-r--r-- | arch/arm/kvm/hyp/hyp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/kvm/hyp/hyp.h b/arch/arm/kvm/hyp/hyp.h index ab2cb828d60a..4924418aee4f 100644 --- a/arch/arm/kvm/hyp/hyp.h +++ b/arch/arm/kvm/hyp/hyp.h @@ -46,6 +46,9 @@ #define TTBR1 __ACCESS_CP15_64(1, c2) #define VTTBR __ACCESS_CP15_64(6, c2) #define PAR __ACCESS_CP15_64(0, c7) +#define CNTV_CVAL __ACCESS_CP15_64(3, c14) +#define CNTVOFF __ACCESS_CP15_64(4, c14) + #define CSSELR __ACCESS_CP15(c0, 2, c0, 0) #define VMPIDR __ACCESS_CP15(c0, 4, c0, 5) #define SCTLR __ACCESS_CP15(c1, 0, c0, 0) @@ -71,6 +74,11 @@ #define TID_URO __ACCESS_CP15(c13, 0, c0, 3) #define TID_PRIV __ACCESS_CP15(c13, 0, c0, 4) #define CNTKCTL __ACCESS_CP15(c14, 0, c1, 0) +#define CNTV_CTL __ACCESS_CP15(c14, 0, c3, 1) +#define CNTHCTL __ACCESS_CP15(c14, 4, c1, 0) + +void __timer_save_state(struct kvm_vcpu *vcpu); +void __timer_restore_state(struct kvm_vcpu *vcpu); void __sysreg_save_state(struct kvm_cpu_context *ctxt); void __sysreg_restore_state(struct kvm_cpu_context *ctxt); |