diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2006-12-06 20:14:08 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-06 20:14:08 -0500 |
commit | c9ccf30d77f04064fe5436027ab9d2230c7cdd94 (patch) | |
tree | 95c028ae6f1e50275ff7a40b987300bb647e8ead /include/asm-i386/paravirt.h | |
parent | d7cd56111f30259e1b532a12e06f59f8e0a20355 (diff) |
[PATCH] paravirt: Add startup infrastructure for paravirtualization
1) Each hypervisor writes a probe function to detect whether we are
running under that hypervisor. paravirt_probe() registers this
function.
2) If vmlinux is booted with ring != 0, we call all the probe
functions (with registers except %esp intact) in link order: the
winner will not return.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'include/asm-i386/paravirt.h')
-rw-r--r-- | include/asm-i386/paravirt.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 081194751ade..dd707d8c8270 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -120,6 +120,11 @@ struct paravirt_ops | |||
120 | void (fastcall *iret)(void); | 120 | void (fastcall *iret)(void); |
121 | }; | 121 | }; |
122 | 122 | ||
123 | /* Mark a paravirt probe function. */ | ||
124 | #define paravirt_probe(fn) \ | ||
125 | static asmlinkage void (*__paravirtprobe_##fn)(void) __attribute_used__ \ | ||
126 | __attribute__((__section__(".paravirtprobe"))) = fn | ||
127 | |||
123 | extern struct paravirt_ops paravirt_ops; | 128 | extern struct paravirt_ops paravirt_ops; |
124 | 129 | ||
125 | #define paravirt_enabled() (paravirt_ops.paravirt_enabled) | 130 | #define paravirt_enabled() (paravirt_ops.paravirt_enabled) |