diff options
author | Zachary Amsden <zach@vmware.com> | 2007-02-13 07:26:21 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-02-13 07:26:21 -0500 |
commit | ae5da273fe3352febd38658d8d34484cbcfb3423 (patch) | |
tree | 70f619e6c0195bd2684b897d37bde37daa865c86 /include/asm-i386/paravirt.h | |
parent | 8b15114434998a78aa50f8559d69c7a400cff267 (diff) |
[PATCH] i386: SMP boot hook for paravirt
Add VMI SMP boot hook. We emulate a regular boot sequence and use the same
APIC IPI initiation, we just poke magic values to load into the CPU state when
the startup IPI is received, rather than having to jump through a real mode
trampoline.
This is all that was needed to get SMP to work.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'include/asm-i386/paravirt.h')
-rw-r--r-- | include/asm-i386/paravirt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 38e5164bd0e7..6ccf36499b2a 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -151,6 +151,8 @@ struct paravirt_ops | |||
151 | /* These two are jmp to, not actually called. */ | 151 | /* These two are jmp to, not actually called. */ |
152 | void (fastcall *irq_enable_sysexit)(void); | 152 | void (fastcall *irq_enable_sysexit)(void); |
153 | void (fastcall *iret)(void); | 153 | void (fastcall *iret)(void); |
154 | |||
155 | void (fastcall *startup_ipi_hook)(int phys_apicid, unsigned long start_eip, unsigned long start_esp); | ||
154 | }; | 156 | }; |
155 | 157 | ||
156 | /* Mark a paravirt probe function. */ | 158 | /* Mark a paravirt probe function. */ |
@@ -323,6 +325,13 @@ static inline unsigned long apic_read(unsigned long reg) | |||
323 | } | 325 | } |
324 | #endif | 326 | #endif |
325 | 327 | ||
328 | #ifdef CONFIG_SMP | ||
329 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, | ||
330 | unsigned long start_esp) | ||
331 | { | ||
332 | return paravirt_ops.startup_ipi_hook(phys_apicid, start_eip, start_esp); | ||
333 | } | ||
334 | #endif | ||
326 | 335 | ||
327 | #define __flush_tlb() paravirt_ops.flush_tlb_user() | 336 | #define __flush_tlb() paravirt_ops.flush_tlb_user() |
328 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() | 337 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() |