Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 1 | |
| 2 | struct 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 Natapov | 1ed0ce0 | 2009-06-09 15:56:27 +0300 | [diff] [blame] | 9 | struct kvm_vcpu *vcpu; |
Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 10 | }; |
| 11 | |
| 12 | struct kvm_timer_ops { |
Andrea Gelmini | 0fc5c3a | 2010-02-27 17:51:43 +0100 | [diff] [blame] | 13 | bool (*is_periodic)(struct kvm_timer *); |
Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 14 | }; |
| 15 | |
Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 16 | enum hrtimer_restart kvm_timer_fn(struct hrtimer *data); |