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.


hooked checkpoint code up to the linux module and added user space tools
[palacios.git] / linux_module / palacios.h
1 #ifndef _PALACIOS_H
2 #define _PALACIOS_H
3
4 #include <linux/cdev.h>
5 #include <linux/list.h>
6 #include <linux/sched.h>
7 #include <linux/slab.h>
8
9
10 /* Global Control IOCTLs */
11 #define V3_START_GUEST 10
12 #define V3_STOP_GUEST 11
13 #define V3_CREATE_GUEST 12
14 #define V3_FREE_GUEST 13
15
16 #define V3_ADD_MEMORY 50
17
18 /* VM Specific IOCTLs */
19 #define V3_VM_CONSOLE_CONNECT 20
20
21
22 #define V3_VM_PAUSE 23
23 #define V3_VM_CONTINUE 24
24
25 #define V3_VM_LAUNCH 25
26 #define V3_VM_STOP 26
27 #define V3_VM_LOAD 27
28 #define V3_VM_SAVE 28
29
30 #define V3_VM_INSPECT 30
31
32 #define V3_VM_MOVE_CORE 33
33
34 #define V3_VM_FB_INPUT (256+1)
35 #define V3_VM_FB_QUERY (256+2)
36
37 #define V3_VM_HOST_DEV_CONNECT (10244+1)
38
39 #define V3_VM_KSTREAM_USER_CONNECT (11244+1)
40
41
42 struct v3_guest_img {
43     unsigned long long size;
44     void * guest_data;
45     char name[128];
46 } __attribute__((packed));
47
48 struct v3_mem_region {
49     unsigned long long base_addr;
50     unsigned long long num_pages;
51 } __attribute__((packed));
52
53 struct v3_core_move_cmd{
54     unsigned short vcore_id;
55     unsigned short pcore_id;
56 } __attribute__((packed));
57
58 struct v3_chkpt_info {
59     char store[128];
60     char url[256]; /* This might need to be bigger... */
61 } __attribute__((packed));
62
63
64
65 void * trace_malloc(size_t size, gfp_t flags);
66 void trace_free(const void * objp);
67
68
69 struct v3_guest {
70     void * v3_ctx;
71
72     void * img; 
73     u32 img_size;
74
75     char name[128];
76
77
78     struct rb_root vm_ctrls;
79     struct list_head exts;
80
81     struct completion start_done;
82     struct completion thread_done;
83
84     dev_t vm_dev; 
85     struct cdev cdev;
86 };
87
88 // For now MAX_VMS must be a multiple of 8
89 // This is due to the minor number bitmap
90 #define MAX_VMS 32
91
92
93
94 int palacios_vmm_init( void );
95 int palacios_vmm_exit( void );
96
97
98
99 #endif