summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJintack Lim <jintack@cs.columbia.edu>2017-02-03 10:20:00 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2017-02-08 15:13:33 +0000
commit90de943a430028ee389b22bf4a7ae5867c32ce0c (patch)
tree80c64f76f1be349523dd346933858ed9c730fb1f /include
parentfbb4aeec5fc2ab47615b2a0cbabc503e1eef4c60 (diff)
KVM: arm/arm64: Move cntvoff to each timer context
Make cntvoff per each timer context. This is helpful to abstract kvm timer functions to work with timer context without considering timer types (e.g. physical timer or virtual timer). This also would pave the way for ever doing adjustments of the cntvoff on a per-CPU basis if that should ever make sense. Signed-off-by: Jintack Lim <jintack@cs.columbia.edu> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/kvm/arm_arch_timer.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h
index daad3c133b9f..2c8560b4642a 100644
--- a/include/kvm/arm_arch_timer.h
+++ b/include/kvm/arm_arch_timer.h
@@ -23,11 +23,6 @@
#include <linux/hrtimer.h>
#include <linux/workqueue.h>
-struct arch_timer_kvm {
- /* Virtual offset */
- u64 cntvoff;
-};
-
struct arch_timer_context {
/* Registers: control register, timer value */
u32 cnt_ctl;
@@ -38,6 +33,9 @@ struct arch_timer_context {
/* Active IRQ state caching */
bool active_cleared_last;
+
+ /* Virtual offset */
+ u64 cntvoff;
};
struct arch_timer_cpu {
@@ -58,7 +56,6 @@ struct arch_timer_cpu {
int kvm_timer_hyp_init(void);
int kvm_timer_enable(struct kvm_vcpu *vcpu);
-void kvm_timer_init(struct kvm *kvm);
int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu,
const struct kvm_irq_level *irq);
void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu);