[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: "Zhang, Fengzhe" <fengzhe.zhang@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acu9L199Wlrtz9EgQeylFfmFTFvqLAABYBB0
  • Thread-topic: [Xen-devel] [PATCH]vtd: Fix for irq bind failure after PCI attaching 32 times

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.