aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-06-04 14:08:24 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:49 -0400
commitfa40a8214bb9bcae8d49c234c19d8b4a6c1f37ff (patch)
tree6449f27072f128a1c39faaaeef1787f754345aaf /include/linux
parent60eead79ad8750f80384cbe48fc44edcc78a0305 (diff)
KVM: switch irq injection/acking data structures to irq_lock
Protect irq injection/acking data structures with a separate irq_lock mutex. This fixes the following deadlock: CPU A CPU B kvm_vm_ioctl_deassign_dev_irq() mutex_lock(&kvm->lock); worker_thread() -> kvm_deassign_irq() -> kvm_assigned_dev_interrupt_work_handler() -> deassign_host_irq() mutex_lock(&kvm->lock); -> cancel_work_sync() [blocked] [gleb: fix ia64 path] Reported-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kvm_host.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 0c71688b1ee3..a29ea030dd8e 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -371,7 +371,8 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level);
371void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin); 371void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin);
372void kvm_register_irq_ack_notifier(struct kvm *kvm, 372void kvm_register_irq_ack_notifier(struct kvm *kvm,
373 struct kvm_irq_ack_notifier *kian); 373 struct kvm_irq_ack_notifier *kian);
374void kvm_unregister_irq_ack_notifier(struct kvm_irq_ack_notifier *kian); 374void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
375 struct kvm_irq_ack_notifier *kian);
375int kvm_request_irq_source_id(struct kvm *kvm); 376int kvm_request_irq_source_id(struct kvm *kvm);
376void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); 377void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id);
377 378