diff options
author | Chris Lalancette <clalance@redhat.com> | 2010-06-16 23:11:11 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 09:46:49 +0200 |
commit | 33572ac0ad5ba5016da72e6654e607726568f9c0 (patch) | |
tree | fe622a883803896c98de49226fb1899807005ba9 /arch/x86/kvm/i8254.h | |
parent | KVM: x86 emulator: fix pusha instruction emulation (diff) | |
download | linux-33572ac0ad5ba5016da72e6654e607726568f9c0.tar.xz linux-33572ac0ad5ba5016da72e6654e607726568f9c0.zip |
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.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.h b/arch/x86/kvm/i8254.h index 900d6b0ba7c2..46d08ca0b48f 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 |