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
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 00 of 38] xen: add more Xen dom0 support
- From: Jeremy Fitzhardinge
- [PATCH 36 of 38] xen: route hardware irqs via Xen
- From: Jeremy Fitzhardinge
- [PATCH 00 of 38] xen: add more Xen dom0 support
- Prev by Date: Re: [PATCH] MIPS: Make BUG() __noreturn.
- Next by Date: Re: [PATCH 06/45] FS-Cache: Recruit a couple of page flags for cache management [ver #41]
- Previous by thread: Re: [PATCH 36 of 38] xen: route hardware irqs via Xen
- Next by thread: [PATCH 25 of 38] xen mtrr: Add mtrr_ops support for Xen mtrr
- Index(es):
Relevant Pages
|