linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Jiang Liu <jiang.liu@linux.intel.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Sander Eikelenboom <linux@eikelenboom.it>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	<x86@kernel.org>, Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Grant Likely <grant.likely@linaro.org>,
	Yinghai Lu <yinghai@kernel.org>
Cc: <xen-devel@lists.xenproject.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH v2] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c
Date: Tue, 13 Jan 2015 10:09:09 +0000	[thread overview]
Message-ID: <54B4EEC5.1090107@citrix.com> (raw)
In-Reply-To: <54B48190.9000906@linux.intel.com>

On 13/01/15 02:23, Jiang Liu wrote:
> On 2015/1/12 23:01, David Vrabel wrote:
>> On 12/01/15 13:39, Jiang Liu wrote:
>>> Commit b81975eade8c ("x86, irq: Clean up irqdomain transition code")
>>> breaks xen IRQ allocation because xen_smp_prepare_cpus() doesn't invoke
>>> setup_IO_APIC(), so no irqdomains created for IOAPICs and
>>> mp_map_pin_to_irq() fails at the very beginning.
>>>
>>> Enhance xen_smp_prepare_cpus() to call setup_IO_APIC() to initialize
>>> irqdomain for IOAPICs.
>>
>> Having Xen call setup_IO_APIC() to initialize the irq domains then having to
>> add special cases to it is just wrong.
>>
>> The bits of init deferred by mp_register_apic() are also deferred to
>> two different places which looks odd.
>>
>> What about something like the following (untested) patch?
> Hi David,
> 	Really appreciate your suggestions about Xen IOAPIC:)
> Your patch solves the issue, but it will break a coming patch
> set to enable hierarchy irqdomain on x86.

For 3.19 I would recommend this patch.  Since it's been tested and it's
pretty small.  Can you spin a version of this with a proper changelog.
please?

> 	To enable hierarchy irqdomain on x86, need to build
> irqdomains in following order:
> 1) create irqdomain for CPU vector domain
> 2) create irqdomains for interrupt remapping unit if interrupt
>    remapping is enabled.
> 3) create irqdomains for IOAPIC/MSI/HPET etc.
> 
> Function arch_early_ioapic_init() is called before initializing
> interrupt remapping subsystem. So creating IOAPIC irqdomains in
> arch_early_ioapic_init() will break hierarchy irqdomain with
> interrupt remapping enabled. I will post the x86 hierarchy
> irqdomain patch soon.
> 
> So could you please help to advice on:

I don't know enough about this area to comment on these authoritatively
and I don't have time to look into this in more detail right now, but to
the best of my understanding.

> 1) Is IOAPIC irqdomain needed for PV?

PV dom0 only requires a mechanism to obtain properties of the IOAPIC
interrupt lines.  The actual physical interrupts are delivered to the
hypervisor.  It doesn't require any of the irq setup.

> 2) Is IOAPIC irqdomain needed for HVM?

Yes.

> 3) Is IOAPIC irqdomain needed for Dom0?


See (1) above.

> 4) What's the proper hook point to create IOAPIC irqdomain for Xen
>    UP systems?

Don't know.

David

  reply	other threads:[~2015-01-13 10:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07  6:13 [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c Jiang Liu
2015-01-07 14:50 ` Konrad Rzeszutek Wilk
2015-01-07 15:37   ` Jiang Liu
2015-01-07 15:44     ` Konrad Rzeszutek Wilk
2015-01-08  6:36       ` Jiang Liu
2015-01-09 21:15         ` Konrad Rzeszutek Wilk
2015-01-10 19:12 ` Sander Eikelenboom
2015-01-12 13:39   ` [PATCH v2] " Jiang Liu
2015-01-12 15:01     ` [Xen-devel] " David Vrabel
2015-01-12 23:18       ` Sander Eikelenboom
2015-01-13  9:01         ` Thomas Gleixner
2015-01-14  3:09           ` [PATCH v3] " Jiang Liu
2015-01-14 12:23             ` Sander Eikelenboom
2015-01-14 12:29               ` Jiang Liu
2015-01-15 13:04             ` [Bugfix v4 0/2] " Jiang Liu
2015-01-15 13:04               ` [Bugfix v4 1/2] xen/pci: " Jiang Liu
2015-01-16 18:13                 ` Konrad Rzeszutek Wilk
2015-01-19  4:39                   ` Jiang Liu
2015-01-19  4:41                   ` Jiang Liu
2015-01-20 19:12                     ` Konrad Rzeszutek Wilk
2015-01-15 13:04               ` [Bugfix v4 2/2] xen/pci: Simplify x86/pci/xen.c by killing gsi_override related code Jiang Liu
2015-01-15 13:11               ` [Bugfix v4 0/2] Fix xen IRQ allocation failure caused by commit b81975eade8c Sander Eikelenboom
2015-01-15 14:22               ` Sander Eikelenboom
2015-01-15 14:37                 ` Jiang Liu
2015-01-13  2:23       ` [Xen-devel] [PATCH v2] [Bugfix] x86/apic: " Jiang Liu
2015-01-13 10:09         ` David Vrabel [this message]
2015-01-13 12:39           ` Jiang Liu

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=54B4EEC5.1090107@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=grant.likely@linaro.org \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yinghai@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).