diff options
author | Jeremy Fitzhardinge <jeremy@xensource.com> | 2007-07-17 21:37:06 -0400 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2007-07-18 11:47:44 -0400 |
commit | f87e4cac4f4e940b328d3deb5b53e642e3881f43 (patch) | |
tree | 7409f86561e5f97459378abd2ae21e9a5c82bfea /include/xen/events.h | |
parent | ab55028886dd1dd54585f22bf19a00eb23869340 (diff) |
xen: SMP guest support
This is a fairly straightforward Xen implementation of smp_ops.
Xen has its own IPI mechanisms, and has no dependency on any
APIC-based IPI. The smp_ops hooks and the flush_tlb_others pv_op
allow a Xen guest to avoid all APIC code in arch/i386 (the only apic
operation is a single apic_read for the apic version number).
One subtle point which needs to be addressed is unpinning pagetables
when another cpu may have a lazy tlb reference to the pagetable. Xen
will not allow an in-use pagetable to be unpinned, so we must find any
other cpus with a reference to the pagetable and get them to shoot
down their references.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/xen/events.h')
-rw-r--r-- | include/xen/events.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/include/xen/events.h b/include/xen/events.h index 77f71c906823..7abe4ddfac54 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -1,15 +1,32 @@ | |||
1 | #ifndef _XEN_EVENTS_H | 1 | #ifndef _XEN_EVENTS_H |
2 | #define _XEN_EVENTS_H | 2 | #define _XEN_EVENTS_H |
3 | 3 | ||
4 | #include <linux/irq.h> | 4 | #include <linux/interrupt.h> |
5 | |||
6 | #include <xen/interface/event_channel.h> | ||
7 | #include <asm/xen/hypercall.h> | ||
8 | |||
9 | enum ipi_vector { | ||
10 | XEN_RESCHEDULE_VECTOR, | ||
11 | XEN_CALL_FUNCTION_VECTOR, | ||
12 | |||
13 | XEN_NR_IPIS, | ||
14 | }; | ||
5 | 15 | ||
6 | int bind_evtchn_to_irqhandler(unsigned int evtchn, | 16 | int bind_evtchn_to_irqhandler(unsigned int evtchn, |
7 | irqreturn_t (*handler)(int, void *), | 17 | irq_handler_t handler, |
8 | unsigned long irqflags, const char *devname, | 18 | unsigned long irqflags, const char *devname, |
9 | void *dev_id); | 19 | void *dev_id); |
10 | int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, | 20 | int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, |
11 | irqreturn_t (*handler)(int, void *), | 21 | irq_handler_t handler, |
12 | unsigned long irqflags, const char *devname, void *dev_id); | 22 | unsigned long irqflags, const char *devname, |
23 | void *dev_id); | ||
24 | int bind_ipi_to_irqhandler(enum ipi_vector ipi, | ||
25 | unsigned int cpu, | ||
26 | irq_handler_t handler, | ||
27 | unsigned long irqflags, | ||
28 | const char *devname, | ||
29 | void *dev_id); | ||
13 | 30 | ||
14 | /* | 31 | /* |
15 | * Common unbind function for all event sources. Takes IRQ to unbind from. | 32 | * Common unbind function for all event sources. Takes IRQ to unbind from. |
@@ -18,6 +35,8 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, | |||
18 | */ | 35 | */ |
19 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); | 36 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); |
20 | 37 | ||
38 | void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector); | ||
39 | |||
21 | static inline void notify_remote_via_evtchn(int port) | 40 | static inline void notify_remote_via_evtchn(int port) |
22 | { | 41 | { |
23 | struct evtchn_send send = { .port = port }; | 42 | struct evtchn_send send = { .port = port }; |