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_time.h>
14 #include <palacios/vmm_emulator.h>
16 typedef ullong_t v3_reg_t;
54 uint_t granularity : 1;
65 struct v3_segment ldtr;
66 struct v3_segment gdtr;
67 struct v3_segment idtr;
71 struct shadow_page_state;
74 struct emulation_state;
78 int (*raise_irq)(struct guest_info * info, int irq);
85 typedef enum {SHADOW_PAGING, NESTED_PAGING} vmm_paging_mode_t;
86 typedef enum {VM_RUNNING, VM_STOPPED, VM_SUSPENDED, VM_ERROR, VM_EMULATING} vm_operating_mode_t;
89 typedef enum {REAL, /*UNREAL,*/ PROTECTED, PROTECTED_PAE, LONG, LONG_32_COMPAT, LONG_16_COMPAT} vm_cpu_mode_t;
90 typedef enum {PHYSICAL_MEM, VIRTUAL_MEM} vm_mem_mode_t;
99 struct shadow_map mem_map;
101 struct vm_time time_state;
103 vmm_paging_mode_t shdw_pg_mode;
104 struct shadow_page_state shdw_pg_state;
105 addr_t direct_map_pt;
106 // nested_paging_t nested_page_state;
109 // This structure is how we get interrupts for the guest
110 struct vm_intr intr_state;
112 struct vmm_io_map io_map;
115 struct vmm_dev_mgr dev_mgr;
117 vm_cpu_mode_t cpu_mode;
118 vm_mem_mode_t mem_mode;
121 struct v3_gprs vm_regs;
122 struct v3_ctrl_regs ctrl_regs;
123 struct v3_segments segments;
125 struct vm_ctrl_ops vm_ops;
127 struct emulation_state emulator;
129 vm_operating_mode_t run_state;
134 vm_cpu_mode_t get_cpu_mode(struct guest_info * info);
135 vm_mem_mode_t get_mem_mode(struct guest_info * info);
138 void PrintV3Segments(struct guest_info * info);
139 void PrintV3CtrlRegs(struct guest_info * info);
140 void PrintV3GPRs(struct guest_info * info);