From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH]vtd: Fix for irq bind failure after PCI attaching 32 times Date: Wed, 26 Jan 2011 08:41:50 +0000 Message-ID: References: <1A42CE6F5F474C41B63392A5F80372B231F6DFF6@shsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1A42CE6F5F474C41B63392A5F80372B231F6DFF6@shsmsx501.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Zhang, Fengzhe" , "xen-devel@lists.xensource.com" Cc: Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 26/01/2011 08:02, "Zhang, Fengzhe" wrote: > 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. This needs an Ack, or alternative fix, from Stefano (cc'ed). -- Keir > Signed-off-by: Fengzhe Zhang > > 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); > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel