ia64/xen-unstable

changeset 19307:b5d074255c38

passthrough: pt_irq_time_out() should act on all machine_irq

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 11 10:03:54 2009 +0000 (2009-03-11)
parents d035b66b5b4d
children 6357628c678f
files xen/drivers/passthrough/io.c
line diff
     1.1 --- a/xen/drivers/passthrough/io.c	Mon Mar 09 15:01:34 2009 +0000
     1.2 +++ b/xen/drivers/passthrough/io.c	Wed Mar 11 10:03:54 2009 +0000
     1.3 @@ -37,6 +37,9 @@ static void pt_irq_time_out(void *data)
     1.4      struct hvm_irq_dpci *dpci = NULL;
     1.5      struct dev_intx_gsi_link *digl;
     1.6      uint32_t device, intx;
     1.7 +    DECLARE_BITMAP(machine_gsi_map, NR_IRQS);
     1.8 +
     1.9 +    bitmap_zero(machine_gsi_map, NR_IRQS);
    1.10  
    1.11      spin_lock(&irq_map->dom->event_lock);
    1.12  
    1.13 @@ -46,16 +49,31 @@ static void pt_irq_time_out(void *data)
    1.14      {
    1.15          guest_gsi = digl->gsi;
    1.16          machine_gsi = dpci->girq[guest_gsi].machine_gsi;
    1.17 +        set_bit(machine_gsi, machine_gsi_map);
    1.18          device = digl->device;
    1.19          intx = digl->intx;
    1.20          hvm_pci_intx_deassert(irq_map->dom, device, intx);
    1.21      }
    1.22  
    1.23 -    clear_bit(machine_gsi, dpci->dirq_mask);
    1.24 -    vector = domain_irq_to_vector(irq_map->dom, machine_gsi);
    1.25 -    dpci->mirq[machine_gsi].pending = 0;
    1.26 +    for ( machine_gsi = find_first_bit(machine_gsi_map, NR_IRQS);
    1.27 +          machine_gsi < NR_IRQS;
    1.28 +          machine_gsi = find_next_bit(machine_gsi_map, NR_IRQS,
    1.29 +                                      machine_gsi + 1) )
    1.30 +    {
    1.31 +        clear_bit(machine_gsi, dpci->dirq_mask);
    1.32 +        vector = domain_irq_to_vector(irq_map->dom, machine_gsi);
    1.33 +        dpci->mirq[machine_gsi].pending = 0;
    1.34 +    }
    1.35 +
    1.36      spin_unlock(&irq_map->dom->event_lock);
    1.37 -    pirq_guest_eoi(irq_map->dom, machine_gsi);
    1.38 +
    1.39 +    for ( machine_gsi = find_first_bit(machine_gsi_map, NR_IRQS);
    1.40 +          machine_gsi < NR_IRQS;
    1.41 +          machine_gsi = find_next_bit(machine_gsi_map, NR_IRQS,
    1.42 +                                      machine_gsi + 1) )
    1.43 +    {
    1.44 +        pirq_guest_eoi(irq_map->dom, machine_gsi);
    1.45 +    }
    1.46  }
    1.47  
    1.48  int pt_irq_create_bind_vtd(