4 #include <linux/cdev.h>
5 #include <linux/list.h>
6 #include <linux/sched.h>
7 #include <linux/slab.h>
9 #ifdef V3_CONFIG_CONSOLE
10 #include "palacios-console.h"
13 #ifdef V3_CONFIG_GRAPHICS_CONSOLE
14 #include "palacios-graphics-console.h"
17 #ifdef V3_CONFIG_HOST_DEVICE
18 #include "palacios-host-dev.h"
22 /* Global Control IOCTLs */
23 #define V3_START_GUEST 10
24 #define V3_ADD_MEMORY 50
25 #define V3_START_NETWORK 60
27 /* VM Specific IOCTLs */
28 #define V3_VM_CONSOLE_CONNECT 20
29 #define V3_VM_STREAM_CONNECT 21
32 #define V3_VM_FB_INPUT (256+1)
33 #define V3_VM_FB_QUERY (256+2)
35 #define V3_VM_HOST_DEV_CONNECT (10244+1)
39 unsigned long long size;
44 struct v3_mem_region {
45 unsigned long long base_addr;
46 unsigned long long num_pages;
55 void * trace_malloc(size_t size, gfp_t flags);
56 void trace_free(const void * objp);
68 struct rb_root vm_ctrls;
69 struct list_head exts;
71 struct list_head files;
72 struct list_head streams;
73 struct list_head sockets;
75 #ifdef V3_CONFIG_CONSOLE
76 struct palacios_console console;
79 #ifdef V3_CONFIG_GRAPHICS_CONSOLE
80 struct palacios_graphics_console graphics_console;
83 #ifdef V3_CONFIG_HOST_DEVICE
84 struct palacios_host_dev hostdev;
88 struct completion start_done;
89 struct completion thread_done;
95 // For now MAX_VMS must be a multiple of 8
96 // This is due to the minor number bitmap
103 extern void send_key_to_palacios(unsigned char status, unsigned char scan_code);
106 int palacios_vmm_init( void );
107 int palacios_vmm_exit( void );