xcp-1.6-updates/xen-4.1.hg

changeset 23329:fa34499e8f6c

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@suse.com>
Acked-by: Joe Jin <joe.jin@oracle.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset: 25688:e6266fc76d08
xen-unstable date: Fri Jul 27 12:22:13 2012 +0200
author Jan Beulich <jbeulich@suse.com>
date Mon Jul 30 13:38:58 2012 +0100 (2012-07-30)
parents 9908dc9808b7
children 5a65d6a1aab7
files xen/arch/x86/io_apic.c
line diff
     1.1 --- a/xen/arch/x86/io_apic.c	Mon Jul 30 13:38:26 2012 +0100
     1.2 +++ b/xen/arch/x86/io_apic.c	Mon Jul 30 13:38:58 2012 +0100
     1.3 @@ -2665,7 +2665,7 @@ void __init init_ioapic_mappings(void)
     1.4          }
     1.5      }
     1.6  
     1.7 -    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi());
     1.8 +    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi() + 1);
     1.9  
    1.10      if ( max_gsi_irqs == 0 )
    1.11          max_gsi_irqs = nr_irqs ? nr_irqs / 8 : PAGE_SIZE;