* Inputs: %ebx, %ecx, %edx, %esi, %edi, %ebp (arguments 1-6)
*/
-#define _hypercall32_2(type, name, a1, a2) \
+#define _hypercall32_2(type, hcall, a1, a2) \
({ \
long __res, __ign1, __ign2; \
asm volatile ( \
"call hypercall_page + %c[offset]" \
: "=a" (__res), "=b" (__ign1), "=c" (__ign2) \
- : [offset] "i" (__HYPERVISOR_##name * 32), \
+ : [offset] "i" (hcall * 32), \
"1" ((long)(a1)), "2" ((long)(a2)) \
: "memory" ); \
(type)__res; \
})
-#define _hypercall32_3(type, name, a1, a2, a3) \
+#define _hypercall32_3(type, hcall, a1, a2, a3) \
({ \
long __res, __ign1, __ign2, __ign3; \
asm volatile ( \
"call hypercall_page + %c[offset]" \
: "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3) \
- : [offset] "i" (__HYPERVISOR_##name * 32), \
+ : [offset] "i" (hcall * 32), \
"1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)) \
: "memory" ); \
(type)__res; \
* Inputs: %rdi, %rsi, %rdx, %r10, %r8, %r9 (arguments 1-6)
*/
-#define _hypercall64_2(type, name, a1, a2) \
+#define _hypercall64_2(type, hcall, a1, a2) \
({ \
long __res, __ign1, __ign2; \
asm volatile ( \
"call hypercall_page + %c[offset]" \
: "=a" (__res), "=D" (__ign1), "=S" (__ign2) \
- : [offset] "i" (__HYPERVISOR_##name * 32), \
+ : [offset] "i" (hcall * 32), \
"1" ((long)(a1)), "2" ((long)(a2)) \
: "memory" ); \
(type)__res; \
})
-#define _hypercall64_3(type, name, a1, a2, a3) \
+#define _hypercall64_3(type, hcall, a1, a2, a3) \
({ \
long __res, __ign1, __ign2, __ign3; \
asm volatile ( \
"call hypercall_page + %c[offset]" \
: "=a" (__res), "=D" (__ign1), "=S" (__ign2), "=d" (__ign3) \
- : [offset] "i" (__HYPERVISOR_##name * 32), \
+ : [offset] "i" (hcall * 32), \
"1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)) \
: "memory" ); \
(type)__res; \
*/
static inline long hypercall_sched_op(unsigned int cmd, void *arg)
{
- return HYPERCALL2(long, sched_op, cmd, arg);
+ return HYPERCALL2(long, __HYPERVISOR_sched_op, cmd, arg);
}
static inline long hypercall_event_channel_op(unsigned int cmd, void *arg)
{
- return HYPERCALL2(long, event_channel_op, cmd, arg);
+ return HYPERCALL2(long, __HYPERVISOR_event_channel_op, cmd, arg);
}
static inline long hypercall_hvm_op(unsigned int cmd, void *arg)
{
- return HYPERCALL2(long, hvm_op, cmd, arg);
+ return HYPERCALL2(long, __HYPERVISOR_hvm_op, cmd, arg);
}
/*
*/
static inline void hypercall_console_write(const char *buf, unsigned long count)
{
- (void)HYPERCALL3(long, console_io, CONSOLEIO_write, count, buf);
+ (void)HYPERCALL3(long, __HYPERVISOR_console_io, CONSOLEIO_write, count, buf);
}
static inline long hypercall_shutdown(unsigned int reason)