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 initial extension framework
[palacios.git] / linux_module / palacios-graphics-console.h
1 /*
2  * Palacios VM Graphics Console Interface (shared framebuffer between palacios and host)
3  * Copyright (c) 2011 Peter Dinda <pdinda@northwestern.edu>
4  */
5
6 #ifndef __PALACIOS_GRAPHICS_CONSOLE_H__
7 #define __PALACIOS_GRAPHICS_CONSOLE_H__
8
9 #include <interfaces/vmm_graphics_console.h>
10
11 struct palacios_graphics_console {
12     // descriptor for the data in the shared frame buffer
13     struct v3_frame_buffer_spec spec;
14     // the actual shared frame buffer
15     // Note that "shared" here means shared between palacios and us
16     // This data could of course also be shared with userland
17     void *data;
18
19     struct v3_guest * guest;
20
21     int cons_refcount;
22     int data_refcount;
23
24     uint32_t num_updates;
25
26     // Currently keystrokes and mouse movements are ignored
27
28     // currently, we will not worry about locking this
29     // lock_t ...
30 };
31
32
33 // This is the data structure that is passed back and forth with user-land
34 // ioctl
35 struct v3_fb_query_response {
36     enum { V3_FB_DATA_ALL, V3_FB_DATA_BOX, V3_FB_UPDATE, V3_FB_SPEC } request_type;
37     struct v3_frame_buffer_spec spec;    // in: desired spec; out: actual spec
38     uint32_t x, y, w, h;                 // region to copy (0s = all) in/out args
39     int updated;                         // whether this region has been updated or not
40     void __user *data;                   // user space pointer to copy data to
41 };
42
43 // This is what userland sends down for input events
44 struct v3_fb_input {
45     enum { V3_FB_KEY, V3_FB_MOUSE, V3_FB_BOTH}             data_type;
46     uint8_t                              scan_code;
47     uint8_t                              mouse_data[3];
48 };
49
50
51 int palacios_init_graphics_console(void);
52
53 int palacios_graphics_console_user_query(struct palacios_graphics_console *cons, 
54                                          struct v3_fb_query_response __user *fb);
55
56 int palacios_graphics_console_user_input(struct palacios_graphics_console *cons,
57                                          struct v3_fb_input __user  *in);
58
59
60 #endif