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-4.1-testing] xen: if mapping GSIs we run out of pir

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] xen: if mapping GSIs we run out of pirq < nr_irqs_gsi, use the others
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Tue, 13 Sep 2011 12:33:08 +0100
Delivery-date: Tue, 13 Sep 2011 04:33:14 -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 1315906544 -3600
# Node ID 08568ad1140addd33566b2ec51230459efd96629
# Parent  78d8c5227bb1b575e299ef76fcbe97676bd2a4fb
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>
xen-unstable changeset:   23832:ad3b4bb097cb
xen-unstable date:        Tue Sep 13 10:32:24 2011 +0100
---


diff -r 78d8c5227bb1 -r 08568ad1140a xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Thu Sep 08 12:24:35 2011 +0100
+++ b/xen/arch/x86/irq.c        Tue Sep 13 10:35:44 2011 +0100
@@ -1463,24 +1463,18 @@
             {
                 if ( !is_hvm_domain(d) ||
                         d->arch.pirq_emuirq[i] == IRQ_UNBOUND )
-                    break;
+                    return i;
             }
-        if ( i == nr_irqs_gsi )
-            return -ENOSPC;
     }
-    else
-    {
-        for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
-            if ( !d->arch.pirq_irq[i] )
-            {
-                if ( !is_hvm_domain(d) ||
-                        d->arch.pirq_emuirq[i] == IRQ_UNBOUND )
-                    break;
-            }
-        if ( i < nr_irqs_gsi )
-            return -ENOSPC;
-    }
-
+    for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
+        if ( !d->arch.pirq_irq[i] )
+        {
+            if ( !is_hvm_domain(d) ||
+                    d->arch.pirq_emuirq[i] == IRQ_UNBOUND )
+                break;
+        }
+    if ( i < nr_irqs_gsi )
+        return -ENOSPC;
     return i;
 }
 

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

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