diff options
| author | Alex Bennée <alex.bennee@linaro.org> | 2014-07-04 10:54:14 -0400 |
|---|---|---|
| committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-07-11 07:46:55 -0400 |
| commit | 1df08ba0aa95f1a8832b7162eec51069bd9be7ae (patch) | |
| tree | 17d48cbca3717b162f311bc00d4a6d4c003c432d /include/kvm | |
| parent | efd48ceacea78e4d4656aa0a6bf4c5b92ed22130 (diff) | |
arm64: KVM: allow export and import of generic timer regs
For correct guest suspend/resume behaviour we need to ensure we include
the generic timer registers for 64 bit guests. As CONFIG_KVM_ARM_TIMER is
always set for arm64 we don't need to worry about null implementations.
However I have re-jigged the kvm_arm_timer_set/get_reg declarations to
be in the common include/kvm/arm_arch_timer.h headers.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'include/kvm')
| -rw-r--r-- | include/kvm/arm_arch_timer.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h index 6d9aeddc09bf..ad9db6045b2f 100644 --- a/include/kvm/arm_arch_timer.h +++ b/include/kvm/arm_arch_timer.h | |||
| @@ -67,6 +67,10 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu); | |||
| 67 | void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu); | 67 | void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu); |
| 68 | void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu); | 68 | void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu); |
| 69 | void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); | 69 | void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); |
| 70 | |||
| 71 | u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid); | ||
| 72 | int kvm_arm_timer_set_reg(struct kvm_vcpu *, u64 regid, u64 value); | ||
| 73 | |||
| 70 | #else | 74 | #else |
| 71 | static inline int kvm_timer_hyp_init(void) | 75 | static inline int kvm_timer_hyp_init(void) |
| 72 | { | 76 | { |
| @@ -84,6 +88,16 @@ static inline void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu) {} | |||
| 84 | static inline void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) {} | 88 | static inline void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) {} |
| 85 | static inline void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) {} | 89 | static inline void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) {} |
| 86 | static inline void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) {} | 90 | static inline void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) {} |
| 91 | |||
| 92 | static inline int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) | ||
| 93 | { | ||
| 94 | return 0; | ||
| 95 | } | ||
| 96 | |||
| 97 | static inline u64 kvm_arm_timer_get_reg(struct kvm_vcpu *vcpu, u64 regid) | ||
| 98 | { | ||
| 99 | return 0; | ||
| 100 | } | ||
| 87 | #endif | 101 | #endif |
| 88 | 102 | ||
| 89 | #endif | 103 | #endif |
