aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/i8254.h
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-02-23 08:57:41 -0500
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:25 -0400
commitd3c7b77d1a6e7a0a27035a7ba723a3455317883e (patch)
tree65053ca8122dda5772c48ce70c9d99e8127f8cdd /arch/x86/kvm/i8254.h
parentfd66842370e32f3bbe429677280a326c07e508c1 (diff)
KVM: unify part of generic timer handling
Hide the internals of vcpu awakening / injection from the in-kernel emulated timers. This makes future changes in this logic easier and decreases the distance to more generic timer handling. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8254.h')
-rw-r--r--arch/x86/kvm/i8254.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/x86/kvm/i8254.h b/arch/x86/kvm/i8254.h
index 521accf3bae7..bbd863ff60b7 100644
--- a/arch/x86/kvm/i8254.h
+++ b/arch/x86/kvm/i8254.h
@@ -3,14 +3,6 @@
3 3
4#include "iodev.h" 4#include "iodev.h"
5 5
6struct kvm_kpit_timer {
7 struct hrtimer timer;
8 int irq;
9 s64 period; /* unit: ns */
10 atomic_t pending;
11 bool reinject;
12};
13
14struct kvm_kpit_channel_state { 6struct kvm_kpit_channel_state {
15 u32 count; /* can be 65536 */ 7 u32 count; /* can be 65536 */
16 u16 latched_count; 8 u16 latched_count;
@@ -29,7 +21,8 @@ struct kvm_kpit_channel_state {
29 21
30struct kvm_kpit_state { 22struct kvm_kpit_state {
31 struct kvm_kpit_channel_state channels[3]; 23 struct kvm_kpit_channel_state channels[3];
32 struct kvm_kpit_timer pit_timer; 24 struct kvm_timer pit_timer;
25 bool is_periodic;
33 u32 speaker_data_on; 26 u32 speaker_data_on;
34 struct mutex lock; 27 struct mutex lock;
35 struct kvm_pit *pit; 28 struct kvm_pit *pit;