aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/i8254.h
diff options
context:
space:
mode:
authorChris Lalancette <clalance@redhat.com>2010-06-16 17:11:11 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 10:46:49 +0300
commit33572ac0ad5ba5016da72e6654e607726568f9c0 (patch)
treefe622a883803896c98de49226fb1899807005ba9 /arch/x86/kvm/i8254.h
parentc37eda138473f8c843f2b4aa8da252fdfdaaafa3 (diff)
KVM: x86: Introduce a workqueue to deliver PIT timer interrupts
We really want to "kvm_set_irq" during the hrtimer callback, but that is risky because that is during interrupt context. Instead, offload the work to a workqueue, which is a bit safer and should provide most of the same functionality. Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8254.h')
-rw-r--r--arch/x86/kvm/i8254.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.h b/arch/x86/kvm/i8254.h
index 900d6b0ba7c..46d08ca0b48 100644
--- a/arch/x86/kvm/i8254.h
+++ b/arch/x86/kvm/i8254.h
@@ -27,7 +27,7 @@ struct kvm_kpit_state {
u32 speaker_data_on;
struct mutex lock;
struct kvm_pit *pit;
- raw_spinlock_t inject_lock;
+ spinlock_t inject_lock;
unsigned long irq_ack;
struct kvm_irq_ack_notifier irq_ack_notifier;
};
@@ -40,6 +40,8 @@ struct kvm_pit {
struct kvm_kpit_state pit_state;
int irq_source_id;
struct kvm_irq_mask_notifier mask_notifier;
+ struct workqueue_struct *wq;
+ struct work_struct expired;
};
#define KVM_PIT_BASE_ADDRESS 0x40