blob: 520022d1a18134715b6ebc16a86341aa3a7f104a [file] [log] [blame]
Jeremy Fitzhardingef04e2ee2010-12-16 14:15:23 -08001#include <linux/ftrace.h>
Konrad Rzeszutek Wilkc00c8aa2011-08-04 18:42:10 -04002#include <xen/interface/xen.h>
Jeremy Fitzhardingef04e2ee2010-12-16 14:15:23 -08003
Jeremy Fitzhardingec796f212010-12-16 14:33:27 -08004#define N(x) [__HYPERVISOR_##x] = "("#x")"
5static const char *xen_hypercall_names[] = {
6 N(set_trap_table),
7 N(mmu_update),
8 N(set_gdt),
9 N(stack_switch),
10 N(set_callbacks),
11 N(fpu_taskswitch),
12 N(sched_op_compat),
13 N(dom0_op),
14 N(set_debugreg),
15 N(get_debugreg),
16 N(update_descriptor),
17 N(memory_op),
18 N(multicall),
19 N(update_va_mapping),
20 N(set_timer_op),
21 N(event_channel_op_compat),
22 N(xen_version),
23 N(console_io),
24 N(physdev_op_compat),
25 N(grant_table_op),
26 N(vm_assist),
27 N(update_va_mapping_otherdomain),
28 N(iret),
29 N(vcpu_op),
30 N(set_segment_base),
31 N(mmuext_op),
32 N(acm_op),
33 N(nmi_op),
34 N(sched_op),
35 N(callback_op),
36 N(xenoprof_op),
37 N(event_channel_op),
38 N(physdev_op),
39 N(hvm_op),
40
41/* Architecture-specific hypercall definitions. */
42 N(arch_0),
43 N(arch_1),
44 N(arch_2),
45 N(arch_3),
46 N(arch_4),
47 N(arch_5),
48 N(arch_6),
49 N(arch_7),
50};
51#undef N
52
53static const char *xen_hypercall_name(unsigned op)
54{
55 if (op < ARRAY_SIZE(xen_hypercall_names) && xen_hypercall_names[op] != NULL)
56 return xen_hypercall_names[op];
57
58 return "";
59}
60
Jeremy Fitzhardingef04e2ee2010-12-16 14:15:23 -080061#define CREATE_TRACE_POINTS
62#include <trace/events/xen.h>