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.


split the vmm from the internal geekos
[palacios.git] / palacios / include / geekos / vmm.h
1 #ifndef __VMM_H
2 #define __VMM_H
3
4
5 #include <geekos/ktypes.h>
6 #include <geekos/string.h>
7
8
9
10 /* utility definitions */
11 #define PrintDebug(fmt, args...)                        \
12   do {                                                  \
13     extern struct vmm_os_hooks * os_hooks;              \
14     if ((os_hooks) && (os_hooks)->print_debug) {        \
15       (os_hooks)->print_debug((fmt), ##args);           \
16     }                                                   \
17   } while (0)                                           \
18     
19
20
21 #define PrintInfo(fmt, args...)                 \
22   do {                                          \
23     extern struct vmm_os_hooks * os_hooks;      \
24     if ((os_hooks) && (os_hooks)->print_info) { \
25       (os_hooks)->print_info((fmt), ##args);    \
26     }                                           \
27   } while (0)                                   \
28   
29
30 #define PrintTrace(fmt, args...)                        \
31   do {                                                  \
32     extern struct vmm_os_hooks * os_hooks;              \
33     if ((os_hooks) && (os_hooks)->print_trace) {        \
34       (os_hooks)->print_trace((fmt), ##args);           \
35     }                                                   \
36   } while (0)                                           \
37   
38
39 /* ** */
40
41
42
43
44 #define VMM_INVALID_CPU 0
45 #define VMM_VMX_CPU 1
46 #define VMM_SVM_CPU 2
47
48
49 /* This will contain function pointers that provide OS services */
50 struct vmm_os_hooks {
51   void (*print_info)(const char * format, ...);
52   void (*print_debug)(const char * format, ...);
53   void (*print_trace)(const char * format, ...);
54 };
55
56
57
58
59 /* This will contain Function pointers that control the VMs */
60 struct vmm_ctrl_ops {
61   
62
63 };
64
65
66
67 void Init_VMM(struct vmm_os_hooks * hooks);
68
69
70
71
72 #endif