1 // SPDX-License-Identifier: GPL-2.0
5 #include "event-parse.h"
8 #define __HYPERVISOR_set_trap_table 0
9 #define __HYPERVISOR_mmu_update 1
10 #define __HYPERVISOR_set_gdt 2
11 #define __HYPERVISOR_stack_switch 3
12 #define __HYPERVISOR_set_callbacks 4
13 #define __HYPERVISOR_fpu_taskswitch 5
14 #define __HYPERVISOR_sched_op_compat 6
15 #define __HYPERVISOR_dom0_op 7
16 #define __HYPERVISOR_set_debugreg 8
17 #define __HYPERVISOR_get_debugreg 9
18 #define __HYPERVISOR_update_descriptor 10
19 #define __HYPERVISOR_memory_op 12
20 #define __HYPERVISOR_multicall 13
21 #define __HYPERVISOR_update_va_mapping 14
22 #define __HYPERVISOR_set_timer_op 15
23 #define __HYPERVISOR_event_channel_op_compat 16
24 #define __HYPERVISOR_xen_version 17
25 #define __HYPERVISOR_console_io 18
26 #define __HYPERVISOR_physdev_op_compat 19
27 #define __HYPERVISOR_grant_table_op 20
28 #define __HYPERVISOR_vm_assist 21
29 #define __HYPERVISOR_update_va_mapping_otherdomain 22
30 #define __HYPERVISOR_iret 23 /* x86 only */
31 #define __HYPERVISOR_vcpu_op 24
32 #define __HYPERVISOR_set_segment_base 25 /* x86/64 only */
33 #define __HYPERVISOR_mmuext_op 26
34 #define __HYPERVISOR_acm_op 27
35 #define __HYPERVISOR_nmi_op 28
36 #define __HYPERVISOR_sched_op 29
37 #define __HYPERVISOR_callback_op 30
38 #define __HYPERVISOR_xenoprof_op 31
39 #define __HYPERVISOR_event_channel_op 32
40 #define __HYPERVISOR_physdev_op 33
41 #define __HYPERVISOR_hvm_op 34
42 #define __HYPERVISOR_tmem_op 38
44 /* Architecture-specific hypercall definitions. */
45 #define __HYPERVISOR_arch_0 48
46 #define __HYPERVISOR_arch_1 49
47 #define __HYPERVISOR_arch_2 50
48 #define __HYPERVISOR_arch_3 51
49 #define __HYPERVISOR_arch_4 52
50 #define __HYPERVISOR_arch_5 53
51 #define __HYPERVISOR_arch_6 54
52 #define __HYPERVISOR_arch_7 55
54 #define N(x) [__HYPERVISOR_##x] = "("#x")"
55 static const char *xen_hypercall_names
[] = {
71 N(event_channel_op_compat
),
77 N(update_va_mapping_otherdomain
),
91 /* Architecture-specific hypercall definitions. */
103 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
105 static const char *xen_hypercall_name(unsigned op
)
107 if (op
< ARRAY_SIZE(xen_hypercall_names
) &&
108 xen_hypercall_names
[op
] != NULL
)
109 return xen_hypercall_names
[op
];
114 unsigned long long process_xen_hypercall_name(struct trace_seq
*s
,
115 unsigned long long *args
)
117 unsigned int op
= args
[0];
119 trace_seq_printf(s
, "%s", xen_hypercall_name(op
));
123 int TEP_PLUGIN_LOADER(struct tep_handle
*tep
)
125 tep_register_print_function(tep
,
126 process_xen_hypercall_name
,
128 "xen_hypercall_name",
134 void TEP_PLUGIN_UNLOADER(struct tep_handle
*tep
)
136 tep_unregister_print_function(tep
, process_xen_hypercall_name
,
137 "xen_hypercall_name");