aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/irq_comm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:43:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:43:01 -0400
commit5e83f6fbdb020b70c0e413312801424d13c58d68 (patch)
treeca270178fa891813dbc47751c331fed975d3766c /virt/kvm/irq_comm.c
parentfe445c6e2cb62a566e1a89f8798de11459975710 (diff)
parent3444d7da1839b851eefedd372978d8a982316c36 (diff)
Merge branch 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm
* 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (198 commits) KVM: VMX: Fix host GDT.LIMIT corruption KVM: MMU: using __xchg_spte more smarter KVM: MMU: cleanup spte set and accssed/dirty tracking KVM: MMU: don't atomicly set spte if it's not present KVM: MMU: fix page dirty tracking lost while sync page KVM: MMU: fix broken page accessed tracking with ept enabled KVM: MMU: add missing reserved bits check in speculative path KVM: MMU: fix mmu notifier invalidate handler for huge spte KVM: x86 emulator: fix xchg instruction emulation KVM: x86: Call mask notifiers from pic KVM: x86: never re-execute instruction with enabled tdp KVM: Document KVM_GET_SUPPORTED_CPUID2 ioctl KVM: x86: emulator: inc/dec can have lock prefix KVM: MMU: Eliminate redundant temporaries in FNAME(fetch) KVM: MMU: Validate all gptes during fetch, not just those used for new pages KVM: MMU: Simplify spte fetch() function KVM: MMU: Add gpte_valid() helper KVM: MMU: Add validate_direct_spte() helper KVM: MMU: Add drop_large_spte() helper KVM: MMU: Use __set_spte to link shadow pages ...
Diffstat (limited to 'virt/kvm/irq_comm.c')
-rw-r--r--virt/kvm/irq_comm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index a0e88809e45e..369e38010ad5 100644
--- a/virt/kvm/irq_comm.c
+++ b/virt/kvm/irq_comm.c
@@ -17,6 +17,7 @@
17 * Authors: 17 * Authors:
18 * Yaozu (Eddie) Dong <Eddie.dong@intel.com> 18 * Yaozu (Eddie) Dong <Eddie.dong@intel.com>
19 * 19 *
20 * Copyright 2010 Red Hat, Inc. and/or its affilates.
20 */ 21 */
21 22
22#include <linux/kvm_host.h> 23#include <linux/kvm_host.h>
@@ -99,7 +100,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
99 if (r < 0) 100 if (r < 0)
100 r = 0; 101 r = 0;
101 r += kvm_apic_set_irq(vcpu, irq); 102 r += kvm_apic_set_irq(vcpu, irq);
102 } else { 103 } else if (kvm_lapic_enabled(vcpu)) {
103 if (!lowest) 104 if (!lowest)
104 lowest = vcpu; 105 lowest = vcpu;
105 else if (kvm_apic_compare_prio(vcpu, lowest) < 0) 106 else if (kvm_apic_compare_prio(vcpu, lowest) < 0)
@@ -278,15 +279,19 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq,
278 synchronize_rcu(); 279 synchronize_rcu();
279} 280}
280 281
281void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask) 282void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin,
283 bool mask)
282{ 284{
283 struct kvm_irq_mask_notifier *kimn; 285 struct kvm_irq_mask_notifier *kimn;
284 struct hlist_node *n; 286 struct hlist_node *n;
287 int gsi;
285 288
286 rcu_read_lock(); 289 rcu_read_lock();
287 hlist_for_each_entry_rcu(kimn, n, &kvm->mask_notifier_list, link) 290 gsi = rcu_dereference(kvm->irq_routing)->chip[irqchip][pin];
288 if (kimn->irq == irq) 291 if (gsi != -1)
289 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);
290 rcu_read_unlock(); 295 rcu_read_unlock();
291} 296}
292 297