WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 36 of 38] xen: route hardware irqs via Xen

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 36 of 38] xen: route hardware irqs via Xen
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Fri, 21 Nov 2008 16:17:56 +0900
Cc: the arch/x86 maintainers <x86@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Fri, 21 Nov 2008 02:31:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <00079eee3818aa0205e2.1226603434@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1226603398@xxxxxxxxxxxxxxxxx> <00079eee3818aa0205e2.1226603434@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Thu, Nov 13, 2008 at 11:10:34AM -0800, Jeremy Fitzhardinge wrote:
> This patch puts the hooks into place so that when the interrupt
> subsystem registers an irq, it gets routed via Xen (if we're running
> under Xen).
> 
> The first step is to get a gsi for a particular device+pin.  We use
> the normal acpi interrupt routing to do the mapping.
> 
> Normally the gsi number is used directly as the irq number.  We can't
> do that since we also have irqs for non-hardware event channels, and
> so we must share the irq space between them.  A given gsi is only
> allocated a single irq, so re-registering a gsi will simply return the
> same irq.
> 
> We therefore allocate an irq for a given gsi, and return that.  As a
> special case, we reserve the first 16 irqs for identity-mapping legacy
> irqs, since there's a fair amount of code which assumes that.
> 
> Having allocated an irq, we ask Xen to allocate a vector, and then
> bind that pirq/vector to an event channel.  When the hardware raises
> an interrupt on a vector, Xen signals us on the corresponding event
> channel, which gets routed to the irq and delivered to the appropriate
> device driver.
> 
> This patch does everything except set up the IO APIC pin routing to
> the vector.
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> ---
>  arch/x86/kernel/acpi/boot.c |    8 +++
>  arch/x86/pci/legacy.c       |    4 +
>  arch/x86/xen/Makefile       |    1
>  arch/x86/xen/pci.c          |   98 
> +++++++++++++++++++++++++++++++++++++++++++
>  arch/x86/xen/xen-ops.h      |    1
>  drivers/xen/events.c        |    9 ++-
>  include/asm-x86/xen/pci.h   |    7 +++
>  include/xen/events.h        |    8 +++
>  8 files changed, 132 insertions(+), 4 deletions(-)
> 

[snip]

> diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
> --- a/arch/x86/xen/xen-ops.h
> +++ b/arch/x86/xen/xen-ops.h
> @@ -63,7 +63,6 @@
>  static inline void xen_smp_init(void) {}
>  #endif
>  
> -
>  void xen_init_apic(void);
>  
>  /* Declare an asm function, along with symbols needed to make it

Hi Jeremy,

This seems like a spurious whitespace change that could be
merged into "[PATCH 30 of 38] xen: implement io_apic_ops"

[snip]

-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel