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 */ |
Liu, Jinsong | a3e06bb | 2011-09-22 16:55:52 +0800 | [diff] [blame] | 5 | u32 timer_mode_mask; |
| 6 | u64 tscdeadline; |
Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 7 | atomic_t pending; /* accumulated triggered timers */ |
| 8 | bool reinject; |
| 9 | struct kvm_timer_ops *t_ops; |
| 10 | struct kvm *kvm; |
Gleb Natapov | 1ed0ce0 | 2009-06-09 15:56:27 +0300 | [diff] [blame] | 11 | struct kvm_vcpu *vcpu; |
Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 12 | }; |
| 13 | |
| 14 | struct kvm_timer_ops { |
Andrea Gelmini | 0fc5c3a | 2010-02-27 17:51:43 +0100 | [diff] [blame] | 15 | bool (*is_periodic)(struct kvm_timer *); |
Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 16 | }; |
| 17 | |
Marcelo Tosatti | d3c7b77 | 2009-02-23 10:57:41 -0300 | [diff] [blame] | 18 | enum hrtimer_restart kvm_timer_fn(struct hrtimer *data); |