debuggers.hg

changeset 22869:48008a2cbc1e

vtd: Fix for irq bind failure after PCI attaching 32 times

Originally when detaching a PCI device, pirq_to_emuirq and pirq_to_irq
are freed via hypercall do_physdev_op. Now in function
pt_irq_destroy_bind_vtd, duplicated logic is added to free
pirq_to_emuirq, but not pirq_to_irq. This causes do_physdev_op fail to
free both emuirq and irq. After attaching a PCI device for 32 times,
irq resources run out. This patch removes the redundant logic.

Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
author Fengzhe Zhang <fengzhe.zhang@intel.com>
date Thu Jan 27 11:31:46 2011 +0000 (2011-01-27)
parents 7873885ec74d
children f346343cb978
files xen/drivers/passthrough/io.c
line diff
     1.1 --- a/xen/drivers/passthrough/io.c	Thu Jan 27 09:37:19 2011 +0000
     1.2 +++ b/xen/drivers/passthrough/io.c	Thu Jan 27 11:31:46 2011 +0000
     1.3 @@ -375,7 +375,6 @@ int pt_irq_destroy_bind_vtd(
     1.4              hvm_irq_dpci->mirq[machine_gsi].dom   = NULL;
     1.5              hvm_irq_dpci->mirq[machine_gsi].flags = 0;
     1.6              clear_bit(machine_gsi, hvm_irq_dpci->mapping);
     1.7 -            unmap_domain_pirq_emuirq(d, machine_gsi);
     1.8          }
     1.9      }
    1.10      spin_unlock(&d->event_lock);