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.


lots of changes...
[palacios.git] / palacios / include / palacios / vm_guest.h
1 #ifndef __VM_GUEST_H
2 #define __VM_GUEST_H
3
4
5
6
7 #include <palacios/vmm_mem.h>
8 #include <palacios/vmm_types.h>
9 #include <palacios/vmm_io.h>
10 #include <palacios/vmm_shadow_paging.h>
11 #include <palacios/vmm_intr.h>
12 #include <palacios/vmm_dev_mgr.h>
13 #include <palacios/vmm_irq.h>
14
15
16 typedef ullong_t gpr_t;
17
18 /*
19   struct guest_gprs {
20   addr_t rax;
21   addr_t rbx;
22   addr_t rcx;
23   addr_t rdx;
24   addr_t rsi;
25   addr_t rdi;
26   addr_t rbp;
27   };
28 */
29
30 struct guest_gprs {
31   gpr_t rdi;
32   gpr_t rsi;
33   gpr_t rbp;
34   gpr_t rsp;
35   gpr_t rbx;
36   gpr_t rdx;
37   gpr_t rcx;
38   gpr_t rax;
39 };
40
41
42 struct shadow_page_state;
43 struct shadow_map;
44
45
46 struct vm_ctrl_ops {
47   int (*raise_irq)(struct guest_info * info, int irq, int error_code);
48 };
49
50
51
52
53
54 typedef enum {SHADOW_PAGING, NESTED_PAGING} vm_page_mode_t;
55 typedef enum {REAL, PROTECTED, PROTECTED_PG, PROTECTED_PAE, PROTECTED_PAE_PG, LONG, LONG_PG} vm_cpu_mode_t;
56
57 struct guest_info {
58   ullong_t rip;
59
60
61   struct shadow_map mem_map;
62
63   
64   vm_page_mode_t page_mode;
65   struct shadow_page_state shdw_pg_state;
66   // nested_paging_t nested_page_state;
67
68
69   // This structure is how we get interrupts for the guest
70   struct vm_intr intr_state;
71
72
73   // struct vmm_irq_map irq_map;
74   vmm_io_map_t io_map;
75   // device_map
76
77   struct vmm_dev_mgr  dev_mgr;
78
79   vm_cpu_mode_t cpu_mode;
80
81
82   struct guest_gprs vm_regs;
83
84   struct vm_ctrl_ops vm_ops;
85
86   void * vmm_data;
87 };
88
89
90
91
92
93 #endif