public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: linux-kernel@vger.kernel.org,
	Xen-devel <xen-devel@lists.xensource.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>, Yinghai Lu <yinghai@kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 30 of 38] xen: implement io_apic_ops
Date: Thu, 20 Nov 2008 20:22:18 +0100	[thread overview]
Message-ID: <20081120192218.GF3955@elte.hu> (raw)
In-Reply-To: <492597B9.8070506@goop.org>


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Ingo Molnar wrote:
>> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>>
>>   
>>> Writes to the IO APIC are paravirtualized via hypercalls, so implement
>>> the appropriate operations.
>>>
>>> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
>>> ---
>>>  arch/x86/xen/Makefile    |    3 +-
>>>  arch/x86/xen/apic.c      |   66 ++++++++++++++++++++++++++++++++++++++++++++++
>>>  arch/x86/xen/enlighten.c |    2 +
>>>  arch/x86/xen/xen-ops.h   |    2 +
>>>  4 files changed, 72 insertions(+), 1 deletion(-)
>>>     
>>
>> hm, why is the ioapic used as the API here, and not an irqchip?
>>   
>
> In essence, the purpose of the series is to break the 1:1 
> relationship between Linux irqs and hardware GSIs.  This allows me 
> to have my own irq allocator, which in turn allows me to intermix 
> "physical" irqs (ie, a Linux irq number bound to a real hardware 
> interrupt source) with the various software/virtual irqs the Xen 
> system needs.
>
> Once a physical irq has been mapped onto a gsi interrupt source, the 
> mechanisms for handing the ioapic side of things are more or less 
> the same.  There's the same procedure of finding the ioapic/pin for 
> a gsi and programming the appropriate vector.
>
> (Presumably once I implement MSI support, all references to "gsi" 
> will become "gsi/msi/etc".)
>
> So, there's an awkward tradeoff.  I could just completely duplicate 
> the whole irq/vector/ioapic management code and hide it under my own 
> irqchip, but it would end up duplicating a lot of the existing code.  
> My alternative was to try to open out the existing code into 
> something like a thin ioapic library, which I can call into as 
> needed.  The only low-level difference is that the Xen ioapics need 
> to be programmed via a hypercall rather than register writes.
>
> If the x86 interrupt layer in general decouples irqs from GSIs, then 
> I can probably make use of that to clean things up.  A general irq 
> allocator along with some way of attaching interrupt-source-specific 
> information to each irq would get me a long way, I think.  I'd still 
> need hooks to paravirtualize the actual ioapic writes, but at least 
> I wouldn't need to have quite so much delicate hooking.

it certainly looks thin enough to me although i'm really not sure we 
want to virtualize at the IO-APIC level. Peter, what's your 
opinion/preference?

	Ingo

  reply	other threads:[~2008-11-20 19:23 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13 19:09 [PATCH 00 of 38] xen: add more Xen dom0 support Jeremy Fitzhardinge
2008-11-13 19:09 ` [PATCH 01 of 38] xen: various whitespace and other formatting cleanups Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 02 of 38] x86: remove unused iommu_nr_pages Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 03 of 38] swiotlb: allow architectures to override swiotlb pool allocation Jeremy Fitzhardinge
2008-11-14  9:01   ` [Xen-devel] [PATCH 03 of 38] swiotlb: allow architectures tooverride " Jan Beulich
2008-11-14 19:33     ` Jeremy Fitzhardinge
2008-11-17  8:04       ` Chris Lalancette
2008-11-17  8:44         ` Keir Fraser
2008-11-17  9:15       ` [Xen-devel] [PATCH 03 of 38] swiotlb: allow architectures tooverrideswiotlb " Jan Beulich
2008-11-13 19:10 ` [PATCH 04 of 38] swiotlb: move some definitions to header Jeremy Fitzhardinge
2008-11-17  3:48   ` FUJITA Tomonori
2008-11-17 11:52     ` Ian Campbell
2008-11-13 19:10 ` [PATCH 05 of 38] swiotlb: allow architectures to override virt<->bus<->virt conversions Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 06 of 38] xen: clean up asm-x86/xen/hypervisor.h Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 07 of 38] x86: add io_apic_ops Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 08 of 38] x86: make apic_* operations inline functions Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 09 of 38] x86: make sure we really have an hpet mapping before using it Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 10 of 38] x86: add handle_irq() to allow interrupt injection Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 11 of 38] x86: define no-op exit_idle() on 32-bit Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 12 of 38] xen/dom0: handle acpi lapic parsing in Xen dom0 Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 13 of 38] x86: unstatic mp_find_ioapic so it can be used elsewhere Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 14 of 38] x86: add mp_find_ioapic_pin Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 15 of 38] x86: unstatic ioapic entry funcs Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 16 of 38] x86: include linux/init.h in asm/numa_64.h Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 17 of 38] x86: add swiotlb allocation functions Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 18 of 38] x86: unify pci iommu setup and allow swiotlb to compile for 32 bit Jeremy Fitzhardinge
2008-11-17  3:48   ` FUJITA Tomonori
2008-11-17 16:16     ` Ian Campbell
2008-11-19  2:19       ` FUJITA Tomonori
2008-11-19 13:48         ` Ian Campbell
2008-11-21 14:21         ` Ian Campbell
2008-11-22  1:49           ` FUJITA Tomonori
2008-11-24 11:41             ` Ian Campbell
2008-11-26  2:53               ` FUJITA Tomonori
2008-11-26  9:36                 ` Ian Campbell
2008-11-27  3:43                   ` FUJITA Tomonori
2008-11-27 17:14                     ` Ian Campbell
2008-11-28  6:28                       ` FUJITA Tomonori
2008-11-13 19:10 ` [PATCH 19 of 38] x86: add arch specific version of the swiotlb virt<->bus<->virt functions Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 20 of 38] xen dom0: Make hvc_xen console work for dom0 Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 21 of 38] xen dom0: Initialize xenbus " Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 22 of 38] xen dom0: Set up basic IO permissions " Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 23 of 38] xen-dom0: only selectively disable cpu features Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 24 of 38] xen dom0: Add support for the platform_ops hypercall Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 25 of 38] xen mtrr: Add mtrr_ops support for Xen mtrr Jeremy Fitzhardinge
2008-11-13 20:28   ` Mark McLoughlin
2008-11-14  0:35     ` Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 26 of 38] xen: forcibly disable PAT support Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 27 of 38] xen/dom0: use _PAGE_IOMAP in ioremap to do machine mappings Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 28 of 38] paravirt/xen: add pvop for page_is_ram Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 29 of 38] xen: create dummy ioapic mapping Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 30 of 38] xen: implement io_apic_ops Jeremy Fitzhardinge
2008-11-20  8:33   ` Simon Horman
2008-11-20 17:07     ` Jeremy Fitzhardinge
2008-11-20  9:35   ` Ingo Molnar
2008-11-20 17:00     ` Jeremy Fitzhardinge
2008-11-20 19:22       ` Ingo Molnar [this message]
2008-11-20 19:29         ` Yinghai Lu
2008-11-20 19:39           ` Jeremy Fitzhardinge
2008-11-20 19:40             ` Yinghai Lu
2008-11-20 19:38         ` Jeremy Fitzhardinge
2008-11-21  1:30         ` H. Peter Anvin
2008-11-20 20:22       ` Eric W. Biederman
2008-11-20 21:32         ` Jeremy Fitzhardinge
2008-11-21  0:58           ` Eric W. Biederman
2008-11-21  1:16             ` Jeremy Fitzhardinge
2008-11-21  4:27               ` Eric W. Biederman
2008-11-24 19:18                 ` Jeremy Fitzhardinge
2008-11-24 22:02                   ` Eric W. Biederman
2008-11-13 19:10 ` [PATCH 31 of 38] xen: set irq_chip disable Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 32 of 38] xen: use our own eventchannel->irq path Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 33 of 38] xen: pack all irq-related info together Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 34 of 38] xen: remove irq bindcount Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 35 of 38] xen: implement pirq type event channels Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 36 of 38] xen: route hardware irqs via Xen Jeremy Fitzhardinge
2008-11-20  9:31   ` Ingo Molnar
2008-11-20 17:06     ` Jeremy Fitzhardinge
2008-11-21  7:17   ` Simon Horman
2008-11-13 19:10 ` [PATCH 37 of 38] xen: bind pirq to vector and event channel Jeremy Fitzhardinge
2008-11-13 19:10 ` [PATCH 38 of 38] xen: make sure that softirqs get handled at the end of event processing Jeremy Fitzhardinge

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=20081120192218.GF3955@elte.hu \
    --to=mingo@elte.hu \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=ian.campbell@citrix.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    --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