|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] [PATCH] xen: if mapping GSIs we run out of pirq < nr_irqs_gs
 
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.
This patch should be backported to xen 4.1, the backport is attached.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Tested-by: Benjamin Schweikert <b.schweikert@xxxxxxxxxxxxxx>
diff -r 5260d04148cb xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Fri Sep 09 11:03:38 2011 +0000
+++ b/xen/arch/x86/irq.c        Fri Sep 09 15:06:40 2011 +0000
@@ -1646,15 +1646,12 @@ int get_free_pirq(struct domain *d, int 
                 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;
 }
 
patch 
Description: Text document 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread> |  
- [Xen-devel] [PATCH] xen: if mapping GSIs we run out of pirq < nr_irqs_gsi, use the others,
Stefano Stabellini <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |