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.


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