blob: 64bc6ea78d90961c2f3095fd62c3e130d3cf98aa [file] [log] [blame]
Marcelo Tosattid3c7b772009-02-23 10:57:41 -03001
2struct kvm_timer {
3 struct hrtimer timer;
4 s64 period; /* unit: ns */
5 atomic_t pending; /* accumulated triggered timers */
6 bool reinject;
7 struct kvm_timer_ops *t_ops;
8 struct kvm *kvm;
Gleb Natapov1ed0ce02009-06-09 15:56:27 +03009 struct kvm_vcpu *vcpu;
Marcelo Tosattid3c7b772009-02-23 10:57:41 -030010};
11
12struct kvm_timer_ops {
Andrea Gelmini0fc5c3a2010-02-27 17:51:43 +010013 bool (*is_periodic)(struct kvm_timer *);
Marcelo Tosattid3c7b772009-02-23 10:57:41 -030014};
15
Marcelo Tosattid3c7b772009-02-23 10:57:41 -030016enum hrtimer_restart kvm_timer_fn(struct hrtimer *data);