WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]vtd: Fix for irq bind failure after PCI attaching

To: "Zhang, Fengzhe" <fengzhe.zhang@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]vtd: Fix for irq bind failure after PCI attaching 32 times
From: Keir Fraser <keir@xxxxxxx>
Date: Wed, 26 Jan 2011 08:41:50 +0000
Cc: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 26 Jan 2011 00:42:32 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=wZ6Wt8jRVNrJUAEUbU8xMgns4N4dVrn0T40rAbRV9u4=; b=Ss3t3zZE5NrmXLY4Pa8zu+8aKzfFx0BZXEDGFrU1weZlI9mg7f1uhdikoKnAGpZeUa EIqc4+zid88kYGCaIPSfCZqTxxeW+KEHcDS5DTxXQi3bgNCv1/QfDn6/3qs/bA0biulQ z2qowVsuSeMOGs3MZyP4BJNefjRLhY3Ft3ORc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=fAGttRPY0Znur6kIbAphtAzUm5fO+KILGfzhHTv3m06MrturvlRx2EzmQWk7NFLmbR /XVmh/IO/hUR4FYPH8JQiDIcf/5U2x0JCdCOeYF7LjuyRD2SRRw9s/i7e3uoWP1BaCTH ZnQBgT1f9jbEc7y0Sm9eYRHu8SWC+WDK7g2fQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1A42CE6F5F474C41B63392A5F80372B231F6DFF6@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acu9L199Wlrtz9EgQeylFfmFTFvqLAABYBB0
Thread-topic: [Xen-devel] [PATCH]vtd: Fix for irq bind failure after PCI attaching 32 times
User-agent: Microsoft-Entourage/12.28.0.101117
On 26/01/2011 08:02, "Zhang, Fengzhe" <fengzhe.zhang@xxxxxxxxx> 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 <fengzhe.zhang@xxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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