From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Jin Subject: Re: nr_irqs_gsi Date: Tue, 24 Jul 2012 08:21:59 +0800 Message-ID: <500DEAA7.4000401@oracle.com> References: <4FFCF3AE.1050200@oracle.com> <4FFD4A72.9090500@citrix.com> <4FFE12BD.2000205@oracle.com> <500D70FE020000780008FEF1@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <500D70FE020000780008FEF1@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Konrad Rzeszutek Wilk , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 07/23/12 21:42, Jan Beulich wrote: >>>> On 12.07.12 at 01:56, Joe Jin wrote: >> On 07/11/12 17:42, Andrew Cooper wrote: >>> >>> No. There are 55 GSIs, indexed 0 thru 54. You would be introducing an >>> off-by-one error by changing the condition. >> >> Per xen log, I think it should be 0-55? for it start from 0 yet, please >> confirm! > > Indeed it should. And I think it's this line > > nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi()); > > in io_apic.c:init_ioapic_mappings(), which fails to add 1 to the > result of highest_gsi() (regression from c/s 20076:2b8b6ee95c93). > >>>> (XEN) ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0]) >>>> (XEN) IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23 >>>> (XEN) ACPI: IOAPIC (id[0x01] address[0xfec80000] gsi_base[32]) >>>> (XEN) IOAPIC[1]: apic_id 1, version 32, address 0xfec80000, GSI 32-55 > > Would you retry with the patch below? > > Jan > > --- a/xen/arch/x86/io_apic.c > +++ b/xen/arch/x86/io_apic.c > @@ -2531,7 +2531,9 @@ void __init init_ioapic_mappings(void) > } > } > > - nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi()); > + i = highest_gsi(); > + if ( i >= nr_irqs_gsi ) > + nr_irqs_gsi = i + 1; > > if ( max_gsi_irqs == 0 ) > max_gsi_irqs = nr_irqs ? nr_irqs / 8 : PAGE_SIZE; > > > > > Hi Jan, I created similar patch for my customer, now waiting their response. Thanks, Joe