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-changelog

[Xen-changelog] [xen-unstable] xen: if mapping GSIs we run out of pirq <

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: if mapping GSIs we run out of pirq < nr_irqs_gsi, use the others
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 14 Sep 2011 18:55:12 +0100
Delivery-date: Wed, 14 Sep 2011 10:57:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1315906344 -3600
# Node ID ad3b4bb097cb6308f73e597c5412395ad783ea4a
# Parent  53416e7c05297978985bd943f8d179599829dbf7
xen: if mapping GSIs we run out of pirq < nr_irqs_gsi, use the others

PV on HVM guests can have more GSIs than the host, in that case we
could run out of pirq < nr_irqs_gsi. When that happens use pirq >=
nr_irqs_gsi rather than returning an error.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Tested-by: Benjamin Schweikert <b.schweikert@xxxxxxxxxxxxxx>
---


diff -r 53416e7c0529 -r ad3b4bb097cb xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Tue Sep 13 10:30:09 2011 +0100
+++ b/xen/arch/x86/irq.c        Tue Sep 13 10:32:24 2011 +0100
@@ -1646,15 +1646,12 @@
                 return i;
             }
     }
-    else
-    {
-        for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
-            if ( is_free_pirq(d, pirq_info(d, i)) )
-            {
-                pirq_get_info(d, i);
-                return i;
-            }
-    }
+    for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
+        if ( is_free_pirq(d, pirq_info(d, i)) )
+        {
+            pirq_get_info(d, i);
+            return i;
+        }
 
     return -ENOSPC;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xen: if mapping GSIs we run out of pirq < nr_irqs_gsi, use the others, Xen patchbot-unstable <=