diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-08 18:07:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 05:03:01 -0400 |
commit | 88459d4c7eb68c4a15609e00e5d100e2a305f040 (patch) | |
tree | 71514d9bffc9854440e848d4f455713d0a4619da /include/asm-x86/xen/hypercall.h | |
parent | 952d1d7055c8cbf95b4ad2f90be5ed37db8a48ee (diff) |
xen64: register callbacks in arch-independent way
Use callback_op hypercall to register callbacks in a 32/64-bit
independent way (64-bit doesn't need a code segment, but that detail
is hidden in XEN_CALLBACK).
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/xen/hypercall.h')
-rw-r--r-- | include/asm-x86/xen/hypercall.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h index d0c5dedcb001..25366641f3f8 100644 --- a/include/asm-x86/xen/hypercall.h +++ b/include/asm-x86/xen/hypercall.h | |||
@@ -226,6 +226,7 @@ HYPERVISOR_stack_switch(unsigned long ss, unsigned long esp) | |||
226 | return _hypercall2(int, stack_switch, ss, esp); | 226 | return _hypercall2(int, stack_switch, ss, esp); |
227 | } | 227 | } |
228 | 228 | ||
229 | #ifdef CONFIG_X86_32 | ||
229 | static inline int | 230 | static inline int |
230 | HYPERVISOR_set_callbacks(unsigned long event_selector, | 231 | HYPERVISOR_set_callbacks(unsigned long event_selector, |
231 | unsigned long event_address, | 232 | unsigned long event_address, |
@@ -236,6 +237,17 @@ HYPERVISOR_set_callbacks(unsigned long event_selector, | |||
236 | event_selector, event_address, | 237 | event_selector, event_address, |
237 | failsafe_selector, failsafe_address); | 238 | failsafe_selector, failsafe_address); |
238 | } | 239 | } |
240 | #else /* CONFIG_X86_64 */ | ||
241 | static inline int | ||
242 | HYPERVISOR_set_callbacks(unsigned long event_address, | ||
243 | unsigned long failsafe_address, | ||
244 | unsigned long syscall_address) | ||
245 | { | ||
246 | return _hypercall3(int, set_callbacks, | ||
247 | event_address, failsafe_address, | ||
248 | syscall_address); | ||
249 | } | ||
250 | #endif /* CONFIG_X86_{32,64} */ | ||
239 | 251 | ||
240 | static inline int | 252 | static inline int |
241 | HYPERVISOR_callback_op(int cmd, void *arg) | 253 | HYPERVISOR_callback_op(int cmd, void *arg) |