All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]vtd: Fix for irq bind failure after PCI attaching 32 times
@ 2011-01-26  8:02 Zhang, Fengzhe
  2011-01-26  8:41 ` Keir Fraser
  2011-01-26 11:10 ` Stefano Stabellini
  0 siblings, 2 replies; 10+ messages in thread
From: Zhang, Fengzhe @ 2011-01-26  8:02 UTC (permalink / raw)
  To: xen-devel; +Cc: Zhang, Fengzhe

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

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>

diff -r 003acf02d416 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c	Thu Jan 20 17:04:06 2011 +0000
+++ b/xen/drivers/passthrough/io.c	Wed Jan 26 23:05:33 2011 +0800
@@ -375,7 +375,6 @@
             hvm_irq_dpci->mirq[machine_gsi].dom   = NULL;
             hvm_irq_dpci->mirq[machine_gsi].flags = 0;
             clear_bit(machine_gsi, hvm_irq_dpci->mapping);
-            unmap_domain_pirq_emuirq(d, machine_gsi);
         }
     }
     spin_unlock(&d->event_lock);

[-- Attachment #2: irq_bind_failure_after_pci-attach_32_times_fix.patch --]
[-- Type: application/octet-stream, Size: 1006 bytes --]

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>

diff -r 003acf02d416 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c	Thu Jan 20 17:04:06 2011 +0000
+++ b/xen/drivers/passthrough/io.c	Wed Jan 26 23:05:33 2011 +0800
@@ -375,7 +375,6 @@
             hvm_irq_dpci->mirq[machine_gsi].dom   = NULL;
             hvm_irq_dpci->mirq[machine_gsi].flags = 0;
             clear_bit(machine_gsi, hvm_irq_dpci->mapping);
-            unmap_domain_pirq_emuirq(d, machine_gsi);
         }
     }
     spin_unlock(&d->event_lock);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-02-25  1:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26  8:02 [PATCH]vtd: Fix for irq bind failure after PCI attaching 32 times Zhang, Fengzhe
2011-01-26  8:41 ` Keir Fraser
2011-01-26 11:10 ` Stefano Stabellini
2011-01-27  7:39   ` Zhang, Fengzhe
2011-01-27 11:16     ` Stefano Stabellini
2011-02-02 17:35     ` Stefano Stabellini
2011-02-03 15:22       ` Stefano Stabellini
2011-02-03 16:54         ` Ian Jackson
2011-02-14 14:17         ` Stefano Stabellini
2011-02-25  1:41         ` Kay, Allen M

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.