From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH 30 of 38] xen: implement io_apic_ops Date: Thu, 20 Nov 2008 12:22:33 -0800 Message-ID: References: <20081120093506.GB6885@elte.hu> <492597B9.8070506@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <492597B9.8070506@goop.org> (Jeremy Fitzhardinge's message of "Thu, 20 Nov 2008 09:00:41 -0800") Sender: linux-kernel-owner@vger.kernel.org To: Jeremy Fitzhardinge Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Xen-devel , the arch/x86 maintainers , Ian Campbell , Thomas Gleixner , "H. Peter Anvin" , Yinghai Lu List-Id: xen-devel@lists.xenproject.org Jeremy Fitzhardinge writes: > Ingo Molnar wrote: >> * Jeremy Fitzhardinge wrote: >> >> >>> Writes to the IO APIC are paravirtualized via hypercalls, so implement >>> the appropriate operations. >>> >>> Signed-off-by: Jeremy Fitzhardinge >>> --- >>> 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. Bad idea (I think). We have a 1:1 relationship between the linux irq number and the GSI because it makes the code dramatically simpler, and it took significant work to get there. The concept of an intermediate mapping layer sounds nasty. But I haven't yet read the patch. > 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. I know that is where I thought the sparse irq code was going. Eric