Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Gears Fast System Call Exiting Utility Service
[palacios.git] / gears / services / fsceu / syscall_decode.h
1 #ifndef __SYSCALL_DECODE__
2 #define __SYSCALL_DECODE__
3
4 // hypercall numbers
5 #define SYSCALL_DISPATCH_HCALL 0x5CA11
6 #define SYSCALL_SETUP_HCALL    0x5CA12
7 #define SYSCALL_CLEANUP_HCALL  0x5CA13
8
9 #define NUM_SYSCALLS 256
10
11 #define NUM_SAVE_REGS 16
12 #define SYSCALL_ENTRY_OFFSET   (NUM_SAVE_REGS*8)
13
14 #ifdef __ASSEMBLY__
15
16 #define SAVE_ALL            \
17     movq %rsi, 8(%rdi);     \
18     movq %rbp, 16(%rdi);    \
19     movq %rsp, 24(%rdi);    \
20     movq %rbx, 32(%rdi);    \
21     movq %rdx, 40(%rdi);    \
22     movq %rcx, 48(%rdi);    \
23     movq %rax, 56(%rdi);    \
24     movq %r8,  64(%rdi);    \
25     movq %r9,  72(%rdi);    \
26     movq %r10, 80(%rdi);    \
27     movq %r11, 88(%rdi);    \
28     movq %r12, 96(%rdi);    \
29     movq %r13, 104(%rdi);   \
30     movq %r14, 112(%rdi);   \
31     movq %r15, 120(%rdi);   \
32
33 #define RESTORE_ALL         \
34     movq 8(%rdi),  %rsi;    \
35     movq 16(%rdi), %rbp;    \
36     movq 24(%rdi), %rsp;    \
37     movq 32(%rdi), %rbx;    \
38     movq 40(%rdi), %rdx;    \
39     movq 48(%rdi), %rcx;    \
40     movq 56(%rdi), %rax;    \
41     movq 64(%rdi), %r8;     \
42     movq 72(%rdi), %r9;     \
43     movq 80(%rdi), %r10;    \
44     movq 88(%rdi), %r11;    \
45     movq 96(%rdi), %r12;    \
46     movq 104(%rdi),%r13;    \
47     movq 112(%rdi),%r14;    \
48     movq 120(%rdi),%r15;    \
49
50
51 /* align on word boundary with nops */
52 #define ALIGN  .align 8, 0x90
53
54 #ifndef ENTRY
55
56 #define ENTRY(name) \
57     .global name;   \
58     ALIGN;          \
59     name:           \
60
61 #endif
62
63
64 #else
65
66 #include <linux/types.h>
67
68 #endif 
69 #endif