All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Jin <joe.jin@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, xen-devel@lists.xen.org
Subject: Re: nr_irqs_gsi
Date: Tue, 24 Jul 2012 08:21:59 +0800	[thread overview]
Message-ID: <500DEAA7.4000401@oracle.com> (raw)
In-Reply-To: <500D70FE020000780008FEF1@nat28.tlf.novell.com>

On 07/23/12 21:42, Jan Beulich wrote:
>>>> On 12.07.12 at 01:56, Joe Jin <joe.jin@oracle.com> 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

      reply	other threads:[~2012-07-24  0:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  3:31 nr_irqs_gsi Joe Jin
2012-07-11  9:42 ` nr_irqs_gsi Andrew Cooper
2012-07-11 14:00   ` nr_irqs_gsi Konrad Rzeszutek Wilk
2012-07-12  2:17     ` nr_irqs_gsi Joe Jin
2012-07-12 13:36       ` nr_irqs_gsi Konrad Rzeszutek Wilk
2012-07-23 13:30       ` nr_irqs_gsi Jan Beulich
2012-07-23 15:34         ` nr_irqs_gsi Konrad Rzeszutek Wilk
2012-07-24  2:03           ` nr_irqs_gsi Joe Jin
2012-07-24  2:02             ` nr_irqs_gsi Konrad Rzeszutek Wilk
2012-07-24  2:25               ` nr_irqs_gsi Joe Jin
2012-07-11 23:56   ` nr_irqs_gsi Joe Jin
2012-07-23 13:42     ` nr_irqs_gsi Jan Beulich
2012-07-24  0:21       ` Joe Jin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=500DEAA7.4000401@oracle.com \
    --to=joe.jin@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.