1 /******************************************************************************
4 * Register guest OS callbacks with Xen.
6 * Copyright (c) 2006, Ian Campbell
9 #ifndef __XEN_PUBLIC_CALLBACK_H__
10 #define __XEN_PUBLIC_CALLBACK_H__
15 * Prototype for this hypercall is:
16 * long callback_op(int cmd, void *extra_args)
17 * @cmd == CALLBACKOP_??? (callback operation).
18 * @extra_args == Operation-specific extra arguments (NULL if none).
21 #define CALLBACKTYPE_event 0
22 #define CALLBACKTYPE_failsafe 1
23 #define CALLBACKTYPE_syscall 2 /* x86_64 only */
25 * sysenter is only available on x86_32 with the
26 * supervisor_mode_kernel option enabled.
28 #define CALLBACKTYPE_sysenter 3
29 #define CALLBACKTYPE_nmi 4
32 * Disable event deliver during callback? This flag is ignored for event and
33 * NMI callbacks: event delivery is unconditionally disabled.
35 #define _CALLBACKF_mask_events 0
36 #define CALLBACKF_mask_events (1U << _CALLBACKF_mask_events)
39 * Register a callback.
41 #define CALLBACKOP_register 0
42 struct callback_register {
45 xen_callback_t address;
47 typedef struct callback_register callback_register_t;
48 DEFINE_XEN_GUEST_HANDLE(callback_register_t);
51 * Unregister a callback.
53 * Not all callbacks can be unregistered. -EINVAL will be returned if
54 * you attempt to unregister such a callback.
56 #define CALLBACKOP_unregister 1
57 struct callback_unregister {
61 typedef struct callback_unregister callback_unregister_t;
62 DEFINE_XEN_GUEST_HANDLE(callback_unregister_t);
64 #endif /* __XEN_PUBLIC_CALLBACK_H__ */
72 * indent-tabs-mode: nil