diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-06 02:08:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-06 02:08:07 -0400 |
commit | ea2aca084ba82aaf7c148d04914ceed8758ce08a (patch) | |
tree | dcb3f4f849cf48deac2dd3bafd5c2cd2f0e7dc79 /virt/kvm/ioapic.c | |
parent | f3032be921cd126615ce3bfd7084e3d319f3f892 (diff) | |
parent | c5a78ac00c400df29645e59938700301efb371d0 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wan/hdlc_fr.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
Diffstat (limited to 'virt/kvm/ioapic.c')
-rw-r--r-- | virt/kvm/ioapic.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 98778cb69c6e..1dcf9f3d1107 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c | |||
@@ -269,28 +269,9 @@ void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) | |||
269 | } | 269 | } |
270 | } | 270 | } |
271 | 271 | ||
272 | static int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector) | 272 | static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int gsi) |
273 | { | 273 | { |
274 | int i; | ||
275 | |||
276 | for (i = 0; i < IOAPIC_NUM_PINS; i++) | ||
277 | if (ioapic->redirtbl[i].fields.vector == vector) | ||
278 | return i; | ||
279 | return -1; | ||
280 | } | ||
281 | |||
282 | void kvm_ioapic_update_eoi(struct kvm *kvm, int vector) | ||
283 | { | ||
284 | struct kvm_ioapic *ioapic = kvm->arch.vioapic; | ||
285 | union ioapic_redir_entry *ent; | 274 | union ioapic_redir_entry *ent; |
286 | int gsi; | ||
287 | |||
288 | gsi = get_eoi_gsi(ioapic, vector); | ||
289 | if (gsi == -1) { | ||
290 | printk(KERN_WARNING "Can't find redir item for %d EOI\n", | ||
291 | vector); | ||
292 | return; | ||
293 | } | ||
294 | 275 | ||
295 | ent = &ioapic->redirtbl[gsi]; | 276 | ent = &ioapic->redirtbl[gsi]; |
296 | ASSERT(ent->fields.trig_mode == IOAPIC_LEVEL_TRIG); | 277 | ASSERT(ent->fields.trig_mode == IOAPIC_LEVEL_TRIG); |
@@ -300,6 +281,16 @@ void kvm_ioapic_update_eoi(struct kvm *kvm, int vector) | |||
300 | ioapic_deliver(ioapic, gsi); | 281 | ioapic_deliver(ioapic, gsi); |
301 | } | 282 | } |
302 | 283 | ||
284 | void kvm_ioapic_update_eoi(struct kvm *kvm, int vector) | ||
285 | { | ||
286 | struct kvm_ioapic *ioapic = kvm->arch.vioapic; | ||
287 | int i; | ||
288 | |||
289 | for (i = 0; i < IOAPIC_NUM_PINS; i++) | ||
290 | if (ioapic->redirtbl[i].fields.vector == vector) | ||
291 | __kvm_ioapic_update_eoi(ioapic, i); | ||
292 | } | ||
293 | |||
303 | static int ioapic_in_range(struct kvm_io_device *this, gpa_t addr) | 294 | static int ioapic_in_range(struct kvm_io_device *this, gpa_t addr) |
304 | { | 295 | { |
305 | struct kvm_ioapic *ioapic = (struct kvm_ioapic *)this->private; | 296 | struct kvm_ioapic *ioapic = (struct kvm_ioapic *)this->private; |