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.


added irq queueing to APIC
[palacios.releases.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 #ifdef V3_CONFIG_GRAPHICS_CONSOLE
14 #include "palacios-graphics-console.h"
15 #endif
16
17 #ifdef V3_CONFIG_HOST_DEVICE
18 #include "palacios-host-dev.h"
19 #endif
20
21
22 /* Global Control IOCTLs */
23 #define V3_START_GUEST 10
24 #define V3_ADD_MEMORY 50
25 #define V3_START_NETWORK 60
26
27 /* VM Specific IOCTLs */
28 #define V3_VM_CONSOLE_CONNECT 20
29 #define V3_VM_STREAM_CONNECT 21
30 #define V3_VM_STOP 22
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 512+1
36
37
38 struct v3_guest_img {
39     unsigned long long size;
40     void * guest_data;
41     char name[128];
42 };
43
44 struct v3_mem_region {
45     unsigned long long base_addr;
46     unsigned long long num_pages;
47 };
48
49 struct v3_network {
50     unsigned char socket;
51     unsigned char packet;
52     unsigned char vnet;
53 };
54
55 void * trace_malloc(size_t size, gfp_t flags);
56 void trace_free(const void * objp);
57
58
59 struct v3_guest {
60     void * v3_ctx;
61
62     void * img; 
63     u32 img_size;
64
65     char name[128];
66
67     struct list_head files;
68     struct list_head streams;
69     struct list_head sockets;
70
71 #ifdef V3_CONFIG_CONSOLE
72     struct palacios_console console;
73 #endif
74
75 #ifdef V3_CONFIG_CONSOLE
76     struct palacios_graphics_console graphics_console;
77 #endif
78
79 #ifdef V3_CONFIG_HOST_DEVICE
80     struct palacios_host_dev hostdev;
81 #endif
82
83
84     struct completion start_done;
85     struct completion thread_done;
86
87     dev_t vm_dev; 
88     struct cdev cdev;
89 };
90
91 // For now MAX_VMS must be a multiple of 8
92 // This is due to the minor number bitmap
93 #define MAX_VMS 32
94
95
96
97
98
99 extern void send_key_to_palacios(unsigned char status, unsigned char scan_code);
100
101
102 int palacios_vmm_init( void );
103 int palacios_vmm_exit( void );
104
105
106
107 #endif