aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm/arm_arch_timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kvm/arm_arch_timer.h')
-rw-r--r--include/kvm/arm_arch_timer.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h
index 5c970ce67949..daad3c133b9f 100644
--- a/include/kvm/arm_arch_timer.h
+++ b/include/kvm/arm_arch_timer.h
@@ -28,15 +28,20 @@ struct arch_timer_kvm {
28 u64 cntvoff; 28 u64 cntvoff;
29}; 29};
30 30
31struct arch_timer_cpu { 31struct arch_timer_context {
32 /* Registers: control register, timer value */ 32 /* Registers: control register, timer value */
33 u32 cntv_ctl; /* Saved/restored */ 33 u32 cnt_ctl;
34 u64 cntv_cval; /* Saved/restored */ 34 u64 cnt_cval;
35
36 /* Timer IRQ */
37 struct kvm_irq_level irq;
38
39 /* Active IRQ state caching */
40 bool active_cleared_last;
41};
35 42
36 /* 43struct arch_timer_cpu {
37 * Anything that is not used directly from assembly code goes 44 struct arch_timer_context vtimer;
38 * here.
39 */
40 45
41 /* Background timer used when the guest is not running */ 46 /* Background timer used when the guest is not running */
42 struct hrtimer timer; 47 struct hrtimer timer;
@@ -47,12 +52,6 @@ struct arch_timer_cpu {
47 /* Background timer active */ 52 /* Background timer active */
48 bool armed; 53 bool armed;
49 54
50 /* Timer IRQ */
51 struct kvm_irq_level irq;
52
53 /* Active IRQ state caching */
54 bool active_cleared_last;
55
56 /* Is the timer enabled */ 55 /* Is the timer enabled */
57 bool enabled; 56 bool enabled;
58}; 57};
@@ -77,4 +76,6 @@ void kvm_timer_unschedule(struct kvm_vcpu *vcpu);
77void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu); 76void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu);
78 77
79void kvm_timer_init_vhe(void); 78void kvm_timer_init_vhe(void);
79
80#define vcpu_vtimer(v) (&(v)->arch.timer_cpu.vtimer)
80#endif 81#endif