]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen/irq: The Xen hypervisor cleans up the PIRQs if the other domain forgot.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 16 Feb 2011 21:26:44 +0000 (16:26 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 14 Apr 2011 15:17:56 +0000 (11:17 -0400)
And if the other domain forgot to clean up its PIRQs we don't need
to fail the operation. Just take a note of it and continue on.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/events.c

index e4e8e9a745bfd21316c05963d4dc9561fbe073aa..e51f3c50bd40cfcb9e9979cd82268c98a05488ff 100644 (file)
@@ -728,7 +728,14 @@ int xen_destroy_irq(int irq)
                unmap_irq.pirq = info->u.pirq.pirq;
                unmap_irq.domid = info->u.pirq.domid;
                rc = HYPERVISOR_physdev_op(PHYSDEVOP_unmap_pirq, &unmap_irq);
-               if (rc) {
+               /* If another domain quits without making the pci_disable_msix
+                * call, the Xen hypervisor takes care of freeing the PIRQs
+                * (free_domain_pirqs).
+                */
+               if ((rc == -ESRCH && info->u.pirq.domid != DOMID_SELF))
+                       printk(KERN_INFO "domain %d does not have %d anymore\n",
+                               info->u.pirq.domid, info->u.pirq.pirq);
+               else if (rc) {
                        printk(KERN_WARNING "unmap irq failed %d\n", rc);
                        goto out;
                }