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.


userspace changes to break apart VM lifecycle management
[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_CREATE_GUEST 12
12 #define V3_FREE_GUEST 13
13
14 #define V3_ADD_MEMORY 50
15
16 /* VM Specific IOCTLs */
17 #define V3_VM_CONSOLE_CONNECT 20
18
19
20 #define V3_VM_PAUSE 23
21 #define V3_VM_CONTINUE 24
22
23 #define V3_VM_LAUNCH 25
24 #define V3_VM_STOP 26
25 #define V3_VM_LOAD 27
26 #define V3_VM_SAVE 28
27
28 #define V3_VM_INSPECT 30
29
30 #define V3_VM_MOVE_CORE 33
31
32 #define V3_VM_FB_INPUT (256+1)
33 #define V3_VM_FB_QUERY (256+2)
34
35 #define V3_VM_HOST_DEV_CONNECT (10244+1)
36
37 #define V3_VM_KSTREAM_USER_CONNECT (11244+1)
38
39
40 struct v3_guest_img {
41     unsigned long long size;
42     void * guest_data;
43     char name[128];
44 } __attribute__((packed));
45
46 struct v3_mem_region {
47     unsigned long long base_addr;
48     unsigned long long num_pages;
49 } __attribute__((packed));
50
51 struct v3_core_move_cmd{
52     unsigned short vcore_id;
53     unsigned short pcore_id;
54 } __attribute__((packed));
55
56 struct v3_chkpt_info {
57     char store[128];
58     char url[256]; /* This might need to be bigger... */
59 } __attribute__((packed));
60
61
62
63 void * trace_malloc(size_t size, gfp_t flags);
64 void trace_free(const void * objp);
65
66
67 struct v3_guest {
68     void * v3_ctx;
69
70     void * img; 
71     u32 img_size;
72
73     char name[128];
74
75
76     struct rb_root vm_ctrls;
77     struct list_head exts;
78
79     dev_t vm_dev; 
80     struct cdev cdev;
81 };
82
83 // For now MAX_VMS must be a multiple of 8
84 // This is due to the minor number bitmap
85 #define MAX_VMS 32
86
87
88
89 int palacios_vmm_init( void );
90 int palacios_vmm_exit( void );
91
92
93
94 #endif