Xen Test Framework
callback.h
Go to the documentation of this file.
1/*
2 * Xen public PV callback interface
3 */
4
5#ifndef XEN_PUBLIC_CALLBACK_H
6#define XEN_PUBLIC_CALLBACK_H
7
8#include "xen.h"
9
10/*
11 * Prototype for this hypercall is:
12 * long callback_op(int cmd, void *extra_args)
13 * @cmd == CALLBACKOP_??? (callback operation).
14 * @extra_args == Operation-specific extra arguments (NULL if none).
15 */
16
17/* x86: Callback for event delivery. */
18#define CALLBACKTYPE_event 0
19
20/* x86: Failsafe callback when guest state cannot be restored by Xen. */
21#define CALLBACKTYPE_failsafe 1
22
23/* x86/64 hypervisor: Syscall by 64-bit guest app ('64-on-64-on-64'). */
24#define CALLBACKTYPE_syscall 2
25
26/*
27 * x86/32 hypervisor: Only available on x86/32 when supervisor_mode_kernel
28 * feature is enabled. Do not use this callback type in new code.
29 */
30#define CALLBACKTYPE_sysenter_deprecated 3
31
32/* x86: Callback for NMI delivery. */
33#define CALLBACKTYPE_nmi 4
34
35/*
36 * x86: sysenter is only available as follows:
37 * - 32-bit hypervisor: with the supervisor_mode_kernel feature enabled
38 * - 64-bit hypervisor: 32-bit guest applications on Intel CPUs
39 * ('32-on-32-on-64', '32-on-64-on-64')
40 * [nb. also 64-bit guest applications on Intel CPUs
41 * ('64-on-64-on-64'), but syscall is preferred]
42 */
43#define CALLBACKTYPE_sysenter 5
44
45/*
46 * x86/64 hypervisor: Syscall by 32-bit guest app on AMD CPUs
47 * ('32-on-32-on-64', '32-on-64-on-64')
48 */
49#define CALLBACKTYPE_syscall32 7
50
51/*
52 * Disable event deliver during callback? This flag is ignored for event and
53 * NMI callbacks: event delivery is unconditionally disabled.
54 */
55#define _CALLBACKF_mask_events 0
56#define CALLBACKF_mask_events (1U << _CALLBACKF_mask_events)
57
58/*
59 * Register a callback.
60 */
61#define CALLBACKOP_register 0
66};
68
69#endif /* XEN_PUBLIC_CALLBACK_H */
70
71/*
72 * Local variables:
73 * mode: C
74 * c-file-style: "BSD"
75 * c-basic-offset: 4
76 * tab-width: 4
77 * indent-tabs-mode: nil
78 * End:
79 */
__UINT16_TYPE__ uint16_t
Definition: stdint.h:15
xen_callback_t address
Definition: callback.h:65