Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
hypercall.h File Reference
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <trace/events/xen.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <xen/interface/xen.h>
#include <xen/interface/sched.h>
#include <xen/interface/physdev.h>
#include <xen/interface/platform.h>
#include <xen/interface/xen-mca.h>

Go to the source code of this file.

Macros

#define __HYPERCALL   "call hypercall_page+%c[offset]"
 
#define __HYPERCALL_ENTRY(x)   [offset] "i" (__HYPERVISOR_##x * sizeof(hypercall_page[0]))
 
#define __HYPERCALL_RETREG   "rax"
 
#define __HYPERCALL_ARG1REG   "rdi"
 
#define __HYPERCALL_ARG2REG   "rsi"
 
#define __HYPERCALL_ARG3REG   "rdx"
 
#define __HYPERCALL_ARG4REG   "r10"
 
#define __HYPERCALL_ARG5REG   "r8"
 
#define __HYPERCALL_DECLS
 
#define __HYPERCALL_0PARAM   "=r" (__res)
 
#define __HYPERCALL_1PARAM   __HYPERCALL_0PARAM, "+r" (__arg1)
 
#define __HYPERCALL_2PARAM   __HYPERCALL_1PARAM, "+r" (__arg2)
 
#define __HYPERCALL_3PARAM   __HYPERCALL_2PARAM, "+r" (__arg3)
 
#define __HYPERCALL_4PARAM   __HYPERCALL_3PARAM, "+r" (__arg4)
 
#define __HYPERCALL_5PARAM   __HYPERCALL_4PARAM, "+r" (__arg5)
 
#define __HYPERCALL_0ARG()
 
#define __HYPERCALL_1ARG(a1)   __HYPERCALL_0ARG() __arg1 = (unsigned long)(a1);
 
#define __HYPERCALL_2ARG(a1, a2)   __HYPERCALL_1ARG(a1) __arg2 = (unsigned long)(a2);
 
#define __HYPERCALL_3ARG(a1, a2, a3)   __HYPERCALL_2ARG(a1,a2) __arg3 = (unsigned long)(a3);
 
#define __HYPERCALL_4ARG(a1, a2, a3, a4)   __HYPERCALL_3ARG(a1,a2,a3) __arg4 = (unsigned long)(a4);
 
#define __HYPERCALL_5ARG(a1, a2, a3, a4, a5)   __HYPERCALL_4ARG(a1,a2,a3,a4) __arg5 = (unsigned long)(a5);
 
#define __HYPERCALL_CLOBBER5   "memory"
 
#define __HYPERCALL_CLOBBER4   __HYPERCALL_CLOBBER5, __HYPERCALL_ARG5REG
 
#define __HYPERCALL_CLOBBER3   __HYPERCALL_CLOBBER4, __HYPERCALL_ARG4REG
 
#define __HYPERCALL_CLOBBER2   __HYPERCALL_CLOBBER3, __HYPERCALL_ARG3REG
 
#define __HYPERCALL_CLOBBER1   __HYPERCALL_CLOBBER2, __HYPERCALL_ARG2REG
 
#define __HYPERCALL_CLOBBER0   __HYPERCALL_CLOBBER1, __HYPERCALL_ARG1REG
 
#define _hypercall0(type, name)
 
#define _hypercall1(type, name, a1)
 
#define _hypercall2(type, name, a1, a2)
 
#define _hypercall3(type, name, a1, a2, a3)
 
#define _hypercall4(type, name, a1, a2, a3, a4)
 
#define _hypercall5(type, name, a1, a2, a3, a4, a5)
 

Functions

int __must_check xen_event_channel_op_compat (int, void *)
 
int __must_check HYPERVISOR_physdev_op_compat (int, void *)
 

Variables

struct {
   char   _entry [32]
 
hypercall_page []
 

Macro Definition Documentation

#define __HYPERCALL   "call hypercall_page+%c[offset]"

Definition at line 87 of file hypercall.h.

#define __HYPERCALL_0ARG ( )

Definition at line 122 of file hypercall.h.

#define __HYPERCALL_0PARAM   "=r" (__res)

Definition at line 115 of file hypercall.h.

#define __HYPERCALL_1ARG (   a1)    __HYPERCALL_0ARG() __arg1 = (unsigned long)(a1);

Definition at line 123 of file hypercall.h.

#define __HYPERCALL_1PARAM   __HYPERCALL_0PARAM, "+r" (__arg1)

Definition at line 116 of file hypercall.h.

#define __HYPERCALL_2ARG (   a1,
  a2 
)    __HYPERCALL_1ARG(a1) __arg2 = (unsigned long)(a2);

Definition at line 125 of file hypercall.h.

#define __HYPERCALL_2PARAM   __HYPERCALL_1PARAM, "+r" (__arg2)

Definition at line 117 of file hypercall.h.

#define __HYPERCALL_3ARG (   a1,
  a2,
  a3 
)    __HYPERCALL_2ARG(a1,a2) __arg3 = (unsigned long)(a3);

Definition at line 127 of file hypercall.h.

#define __HYPERCALL_3PARAM   __HYPERCALL_2PARAM, "+r" (__arg3)

Definition at line 118 of file hypercall.h.

#define __HYPERCALL_4ARG (   a1,
  a2,
  a3,
  a4 
)    __HYPERCALL_3ARG(a1,a2,a3) __arg4 = (unsigned long)(a4);

Definition at line 129 of file hypercall.h.

#define __HYPERCALL_4PARAM   __HYPERCALL_3PARAM, "+r" (__arg4)

Definition at line 119 of file hypercall.h.

#define __HYPERCALL_5ARG (   a1,
  a2,
  a3,
  a4,
  a5 
)    __HYPERCALL_4ARG(a1,a2,a3,a4) __arg5 = (unsigned long)(a5);

Definition at line 131 of file hypercall.h.

#define __HYPERCALL_5PARAM   __HYPERCALL_4PARAM, "+r" (__arg5)

Definition at line 120 of file hypercall.h.

#define __HYPERCALL_ARG1REG   "rdi"

Definition at line 100 of file hypercall.h.

#define __HYPERCALL_ARG2REG   "rsi"

Definition at line 101 of file hypercall.h.

#define __HYPERCALL_ARG3REG   "rdx"

Definition at line 102 of file hypercall.h.

#define __HYPERCALL_ARG4REG   "r10"

Definition at line 103 of file hypercall.h.

#define __HYPERCALL_ARG5REG   "r8"

Definition at line 104 of file hypercall.h.

#define __HYPERCALL_CLOBBER0   __HYPERCALL_CLOBBER1, __HYPERCALL_ARG1REG

Definition at line 139 of file hypercall.h.

#define __HYPERCALL_CLOBBER1   __HYPERCALL_CLOBBER2, __HYPERCALL_ARG2REG

Definition at line 138 of file hypercall.h.

#define __HYPERCALL_CLOBBER2   __HYPERCALL_CLOBBER3, __HYPERCALL_ARG3REG

Definition at line 137 of file hypercall.h.

#define __HYPERCALL_CLOBBER3   __HYPERCALL_CLOBBER4, __HYPERCALL_ARG4REG

Definition at line 136 of file hypercall.h.

#define __HYPERCALL_CLOBBER4   __HYPERCALL_CLOBBER5, __HYPERCALL_ARG5REG

Definition at line 135 of file hypercall.h.

#define __HYPERCALL_CLOBBER5   "memory"

Definition at line 134 of file hypercall.h.

#define __HYPERCALL_DECLS
Value:
register unsigned long __res asm(__HYPERCALL_RETREG); \
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
register unsigned long __arg2 asm(__HYPERCALL_ARG2REG) = __arg2; \
register unsigned long __arg3 asm(__HYPERCALL_ARG3REG) = __arg3; \
register unsigned long __arg4 asm(__HYPERCALL_ARG4REG) = __arg4; \
register unsigned long __arg5 asm(__HYPERCALL_ARG5REG) = __arg5;

Definition at line 107 of file hypercall.h.

#define __HYPERCALL_ENTRY (   x)    [offset] "i" (__HYPERVISOR_##x * sizeof(hypercall_page[0]))

Definition at line 88 of file hypercall.h.

#define __HYPERCALL_RETREG   "rax"

Definition at line 99 of file hypercall.h.

#define _hypercall0 (   type,
  name 
)
Value:
({ \
__HYPERCALL_DECLS; \
__HYPERCALL_0ARG(); \
asm volatile (__HYPERCALL \
(type)__res; \
})

Definition at line 141 of file hypercall.h.

#define _hypercall1 (   type,
  name,
  a1 
)
Value:
({ \
__HYPERCALL_DECLS; \
__HYPERCALL_1ARG(a1); \
asm volatile (__HYPERCALL \
(type)__res; \
})

Definition at line 152 of file hypercall.h.

#define _hypercall2 (   type,
  name,
  a1,
  a2 
)
Value:
({ \
__HYPERCALL_DECLS; \
__HYPERCALL_2ARG(a1, a2); \
asm volatile (__HYPERCALL \
(type)__res; \
})

Definition at line 163 of file hypercall.h.

#define _hypercall3 (   type,
  name,
  a1,
  a2,
  a3 
)
Value:
({ \
__HYPERCALL_DECLS; \
__HYPERCALL_3ARG(a1, a2, a3); \
asm volatile (__HYPERCALL \
(type)__res; \
})

Definition at line 174 of file hypercall.h.

#define _hypercall4 (   type,
  name,
  a1,
  a2,
  a3,
  a4 
)
Value:
({ \
__HYPERCALL_DECLS; \
__HYPERCALL_4ARG(a1, a2, a3, a4); \
asm volatile (__HYPERCALL \
(type)__res; \
})

Definition at line 185 of file hypercall.h.

#define _hypercall5 (   type,
  name,
  a1,
  a2,
  a3,
  a4,
  a5 
)
Value:
({ \
__HYPERCALL_DECLS; \
__HYPERCALL_5ARG(a1, a2, a3, a4, a5); \
asm volatile (__HYPERCALL \
(type)__res; \
})

Definition at line 196 of file hypercall.h.

Function Documentation

int __must_check HYPERVISOR_physdev_op_compat ( int  ,
void  
)

Definition at line 47 of file fallback.c.

int __must_check xen_event_channel_op_compat ( int  ,
void  
)

Definition at line 8 of file fallback.c.

Variable Documentation

char _entry[32]

Definition at line 85 of file hypercall.h.

struct { ... } hypercall_page[]