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

[Xen-changelog] [xen-unstable] x86: fix off-by-one in nr_irqs_gsi calculation


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Sat, 28 Jul 2012 03:00:29 +0000
  • Delivery-date: Sat, 28 Jul 2012 03:00:40 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1343384533 -7200
# Node ID e6266fc76d08b7297fdce7a6ff66cde58fe87ef8
# Parent  fab4434f514532dba54ff4eec8b8ffa230f8330f
x86: fix off-by-one in nr_irqs_gsi calculation

highest_gsi() returns the last valid GSI, not a count.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Joe Jin <joe.jin@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r fab4434f5145 -r e6266fc76d08 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Fri Jul 27 10:00:12 2012 +0200
+++ b/xen/arch/x86/io_apic.c    Fri Jul 27 12:22:13 2012 +0200
@@ -2531,7 +2531,7 @@ void __init init_ioapic_mappings(void)
         }
     }
 
-    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi());
+    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi() + 1);
 
     if ( max_gsi_irqs == 0 )
         max_gsi_irqs = nr_irqs ? nr_irqs / 8 : PAGE_SIZE;

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


 


Rackspace

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