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.


updated linux module to new build framework
[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 #ifdef V3_CONFIG_CONSOLE
10 #include "palacios-console.h"
11 #endif
12
13 /* Global Control IOCTLs */
14 #define V3_START_GUEST 10
15 #define V3_ADD_MEMORY 50
16 #define V3_START_NETWORK 60
17
18 /* VM Specific IOCTLs */
19 #define V3_VM_CONSOLE_CONNECT 20
20 #define V3_VM_STREAM_CONNECT 21
21 #define V3_VM_STOP 22
22
23 struct v3_guest_img {
24     unsigned long long size;
25     void * guest_data;
26     char name[128];
27 };
28
29 struct v3_mem_region {
30     unsigned long long base_addr;
31     unsigned long long num_pages;
32 };
33
34 struct v3_network {
35     unsigned char socket;
36     unsigned char packet;
37     unsigned char vnet;
38 };
39
40 void * trace_malloc(size_t size, gfp_t flags);
41 void trace_free(const void * objp);
42
43
44 struct v3_guest {
45     void * v3_ctx;
46
47     void * img; 
48     u32 img_size;
49
50     char name[128];
51
52     struct list_head files;
53     struct list_head streams;
54     struct list_head sockets;
55
56 #ifdef V3_CONFIG_CONSOLE
57     struct palacios_console console;
58 #endif
59
60     struct completion start_done;
61     struct completion thread_done;
62
63     dev_t vm_dev; 
64     struct cdev cdev;
65 };
66
67 // For now MAX_VMS must be a multiple of 8
68 // This is due to the minor number bitmap
69 #define MAX_VMS 32
70
71
72
73
74
75 extern void send_key_to_palacios(unsigned char status, unsigned char scan_code);
76
77
78 int palacios_vmm_init( void );
79 int palacios_vmm_exit( void );
80
81
82
83 #endif