1 | /****************************************************************************** |
---|
2 | * asm-x86/hypercall.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef __ASM_X86_HYPERCALL_H__ |
---|
6 | #define __ASM_X86_HYPERCALL_H__ |
---|
7 | |
---|
8 | #include <public/physdev.h> |
---|
9 | #include <xen/types.h> |
---|
10 | |
---|
11 | /* |
---|
12 | * Both do_mmuext_op() and do_mmu_update(): |
---|
13 | * We steal the m.s.b. of the @count parameter to indicate whether this |
---|
14 | * invocation of do_mmu_update() is resuming a previously preempted call. |
---|
15 | */ |
---|
16 | #define MMU_UPDATE_PREEMPTED (~(~0U>>1)) |
---|
17 | |
---|
18 | extern long |
---|
19 | do_event_channel_op_compat( |
---|
20 | XEN_GUEST_HANDLE(evtchn_op_t) uop); |
---|
21 | |
---|
22 | extern long |
---|
23 | do_physdev_op_compat( |
---|
24 | XEN_GUEST_HANDLE(physdev_op_t) uop); |
---|
25 | |
---|
26 | extern long |
---|
27 | do_set_trap_table( |
---|
28 | XEN_GUEST_HANDLE(trap_info_t) traps); |
---|
29 | |
---|
30 | extern int |
---|
31 | do_mmu_update( |
---|
32 | XEN_GUEST_HANDLE(mmu_update_t) ureqs, |
---|
33 | unsigned int count, |
---|
34 | XEN_GUEST_HANDLE(uint) pdone, |
---|
35 | unsigned int foreigndom); |
---|
36 | |
---|
37 | extern long |
---|
38 | do_set_gdt( |
---|
39 | XEN_GUEST_HANDLE(ulong) frame_list, |
---|
40 | unsigned int entries); |
---|
41 | |
---|
42 | extern long |
---|
43 | do_stack_switch( |
---|
44 | unsigned long ss, |
---|
45 | unsigned long esp); |
---|
46 | |
---|
47 | extern long |
---|
48 | do_fpu_taskswitch( |
---|
49 | int set); |
---|
50 | |
---|
51 | extern long |
---|
52 | do_set_debugreg( |
---|
53 | int reg, |
---|
54 | unsigned long value); |
---|
55 | |
---|
56 | extern unsigned long |
---|
57 | do_get_debugreg( |
---|
58 | int reg); |
---|
59 | |
---|
60 | extern long |
---|
61 | do_update_descriptor( |
---|
62 | u64 pa, |
---|
63 | u64 desc); |
---|
64 | |
---|
65 | extern int |
---|
66 | do_update_va_mapping( |
---|
67 | unsigned long va, |
---|
68 | u64 val64, |
---|
69 | unsigned long flags); |
---|
70 | |
---|
71 | extern long |
---|
72 | do_physdev_op( |
---|
73 | int cmd, XEN_GUEST_HANDLE(void) arg); |
---|
74 | |
---|
75 | extern int |
---|
76 | do_update_va_mapping_otherdomain( |
---|
77 | unsigned long va, |
---|
78 | u64 val64, |
---|
79 | unsigned long flags, |
---|
80 | domid_t domid); |
---|
81 | |
---|
82 | extern int |
---|
83 | do_mmuext_op( |
---|
84 | XEN_GUEST_HANDLE(mmuext_op_t) uops, |
---|
85 | unsigned int count, |
---|
86 | XEN_GUEST_HANDLE(uint) pdone, |
---|
87 | unsigned int foreigndom); |
---|
88 | |
---|
89 | extern unsigned long |
---|
90 | do_iret( |
---|
91 | void); |
---|
92 | |
---|
93 | struct vcpu; |
---|
94 | extern long |
---|
95 | arch_do_vcpu_op( |
---|
96 | int cmd, struct vcpu *v, XEN_GUEST_HANDLE(void) arg); |
---|
97 | |
---|
98 | extern int |
---|
99 | do_kexec( |
---|
100 | unsigned long op, unsigned arg1, XEN_GUEST_HANDLE(void) uarg); |
---|
101 | |
---|
102 | #ifdef __x86_64__ |
---|
103 | |
---|
104 | extern long |
---|
105 | do_set_callbacks( |
---|
106 | unsigned long event_address, |
---|
107 | unsigned long failsafe_address, |
---|
108 | unsigned long syscall_address); |
---|
109 | |
---|
110 | extern long |
---|
111 | do_set_segment_base( |
---|
112 | unsigned int which, |
---|
113 | unsigned long base); |
---|
114 | |
---|
115 | #else |
---|
116 | |
---|
117 | extern long |
---|
118 | do_set_callbacks( |
---|
119 | unsigned long event_selector, |
---|
120 | unsigned long event_address, |
---|
121 | unsigned long failsafe_selector, |
---|
122 | unsigned long failsafe_address); |
---|
123 | |
---|
124 | #endif |
---|
125 | |
---|
126 | #ifdef CONFIG_COMPAT |
---|
127 | |
---|
128 | extern int |
---|
129 | compat_physdev_op( |
---|
130 | int cmd, |
---|
131 | XEN_GUEST_HANDLE(void) arg); |
---|
132 | |
---|
133 | extern int |
---|
134 | arch_compat_vcpu_op( |
---|
135 | int cmd, struct vcpu *v, XEN_GUEST_HANDLE(void) arg); |
---|
136 | |
---|
137 | #endif |
---|
138 | |
---|
139 | #endif /* __ASM_X86_HYPERCALL_H__ */ |
---|