diff options
Diffstat (limited to 'virt/kvm/irq_comm.c')
-rw-r--r-- | virt/kvm/irq_comm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 06cf61e729d2..369e38010ad5 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c | |||
@@ -279,15 +279,19 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, | |||
279 | synchronize_rcu(); | 279 | synchronize_rcu(); |
280 | } | 280 | } |
281 | 281 | ||
282 | void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask) | 282 | void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, |
283 | bool mask) | ||
283 | { | 284 | { |
284 | struct kvm_irq_mask_notifier *kimn; | 285 | struct kvm_irq_mask_notifier *kimn; |
285 | struct hlist_node *n; | 286 | struct hlist_node *n; |
287 | int gsi; | ||
286 | 288 | ||
287 | rcu_read_lock(); | 289 | rcu_read_lock(); |
288 | hlist_for_each_entry_rcu(kimn, n, &kvm->mask_notifier_list, link) | 290 | gsi = rcu_dereference(kvm->irq_routing)->chip[irqchip][pin]; |
289 | if (kimn->irq == irq) | 291 | if (gsi != -1) |
290 | kimn->func(kimn, mask); | 292 | hlist_for_each_entry_rcu(kimn, n, &kvm->mask_notifier_list, link) |
293 | if (kimn->irq == gsi) | ||
294 | kimn->func(kimn, mask); | ||
291 | rcu_read_unlock(); | 295 | rcu_read_unlock(); |
292 | } | 296 | } |
293 | 297 | ||