1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef __HYPERCALL_H__
13#define __HYPERCALL_H__
14
15#include <linux/errno.h>
16#include <linux/string.h>
17
18#include <xen/interface/xen.h>
19#include <xen/interface/sched.h>
20#include <xen/interface/physdev.h>
21
22#define _hypercall0(type, name)  ({   long __res;   asm volatile (   "call %[call]"   : "=a" (__res)   : [call] "m" (hypercall_page[__HYPERVISOR_##name])   : "memory" );   (type)__res;  })
23
24#define _hypercall1(type, name, a1)  ({   long __res, __ign1;   asm volatile (   "call %[call]"   : "=a" (__res), "=b" (__ign1)   : "1" ((long)(a1)),   [call] "m" (hypercall_page[__HYPERVISOR_##name])   : "memory" );   (type)__res;  })
25
26#define _hypercall2(type, name, a1, a2)  ({   long __res, __ign1, __ign2;   asm volatile (   "call %[call]"   : "=a" (__res), "=b" (__ign1), "=c" (__ign2)   : "1" ((long)(a1)), "2" ((long)(a2)),   [call] "m" (hypercall_page[__HYPERVISOR_##name])   : "memory" );   (type)__res;  })
27
28#define _hypercall3(type, name, a1, a2, a3)  ({   long __res, __ign1, __ign2, __ign3;   asm volatile (   "call %[call]"   : "=a" (__res), "=b" (__ign1), "=c" (__ign2),   "=d" (__ign3)   : "1" ((long)(a1)), "2" ((long)(a2)),   "3" ((long)(a3)),   [call] "m" (hypercall_page[__HYPERVISOR_##name])   : "memory" );   (type)__res;  })
29
30#define _hypercall4(type, name, a1, a2, a3, a4)  ({   long __res, __ign1, __ign2, __ign3, __ign4;   asm volatile (   "call %[call]"   : "=a" (__res), "=b" (__ign1), "=c" (__ign2),   "=d" (__ign3), "=S" (__ign4)   : "1" ((long)(a1)), "2" ((long)(a2)),   "3" ((long)(a3)), "4" ((long)(a4)),   [call] "m" (hypercall_page[__HYPERVISOR_##name])   : "memory" );   (type)__res;  })
31
32#define _hypercall5(type, name, a1, a2, a3, a4, a5)  ({   long __res, __ign1, __ign2, __ign3, __ign4, __ign5;   asm volatile (   "call %[call]"   : "=a" (__res), "=b" (__ign1), "=c" (__ign2),   "=d" (__ign3), "=S" (__ign4), "=D" (__ign5)   : "1" ((long)(a1)), "2" ((long)(a2)),   "3" ((long)(a3)), "4" ((long)(a4)),   "5" ((long)(a5)),   [call] "m" (hypercall_page[__HYPERVISOR_##name])   : "memory" );   (type)__res;  })
33
34#endif
35