# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236765834 0
# Node ID b5d074255c38a6171c831f20dc392428905f33be
# Parent d035b66b5b4db5afd42b1ac0bb4ec6bce0c4ece3
passthrough: pt_irq_time_out() should act on all machine_irq
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
xen/drivers/passthrough/io.c | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff -r d035b66b5b4d -r b5d074255c38 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c Mon Mar 09 15:01:34 2009 +0000
+++ b/xen/drivers/passthrough/io.c Wed Mar 11 10:03:54 2009 +0000
@@ -37,6 +37,9 @@ static void pt_irq_time_out(void *data)
struct hvm_irq_dpci *dpci = NULL;
struct dev_intx_gsi_link *digl;
uint32_t device, intx;
+ DECLARE_BITMAP(machine_gsi_map, NR_IRQS);
+
+ bitmap_zero(machine_gsi_map, NR_IRQS);
spin_lock(&irq_map->dom->event_lock);
@@ -46,16 +49,31 @@ static void pt_irq_time_out(void *data)
{
guest_gsi = digl->gsi;
machine_gsi = dpci->girq[guest_gsi].machine_gsi;
+ set_bit(machine_gsi, machine_gsi_map);
device = digl->device;
intx = digl->intx;
hvm_pci_intx_deassert(irq_map->dom, device, intx);
}
- clear_bit(machine_gsi, dpci->dirq_mask);
- vector = domain_irq_to_vector(irq_map->dom, machine_gsi);
- dpci->mirq[machine_gsi].pending = 0;
+ for ( machine_gsi = find_first_bit(machine_gsi_map, NR_IRQS);
+ machine_gsi < NR_IRQS;
+ machine_gsi = find_next_bit(machine_gsi_map, NR_IRQS,
+ machine_gsi + 1) )
+ {
+ clear_bit(machine_gsi, dpci->dirq_mask);
+ vector = domain_irq_to_vector(irq_map->dom, machine_gsi);
+ dpci->mirq[machine_gsi].pending = 0;
+ }
+
spin_unlock(&irq_map->dom->event_lock);
- pirq_guest_eoi(irq_map->dom, machine_gsi);
+
+ for ( machine_gsi = find_first_bit(machine_gsi_map, NR_IRQS);
+ machine_gsi < NR_IRQS;
+ machine_gsi = find_next_bit(machine_gsi_map, NR_IRQS,
+ machine_gsi + 1) )
+ {
+ pirq_guest_eoi(irq_map->dom, machine_gsi);
+ }
}
int pt_irq_create_bind_vtd(
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|