1 /* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
2 /* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
4 #ifndef __VMM_EMULATOR_H__
5 #define __VMM_EMULATOR_H__
9 #include <palacios/vmm_list.h>
10 #include <palacios/vmm_shadow_paging.h>
11 #include <palacios/vmm_paging.h>
17 struct emulated_page {
21 struct list_head page_list;
27 struct list_head page_list;
35 int (*write)(addr_t write_addr, void * src, uint_t length, void * priv_data);
39 struct list_head write_list;
43 struct emulation_state {
44 uint_t num_emulated_pages;
45 struct list_head emulated_pages;
47 uint_t num_saved_pages;
48 struct list_head saved_pages;
50 uint_t num_write_regions;
51 struct list_head write_regions;
56 uint_t tf_enabled : 1;
60 int init_emulator(struct guest_info * info);
63 int v3_emulation_exit_handler(struct guest_info * info);
65 int v3_emulate_memory_write(struct guest_info * info, addr_t fault_gva,
66 int (*write)(addr_t write_addr, void * src, uint_t length, void * priv_data),
67 addr_t write_addr, void * private_data);
68 int v3_emulate_memory_read(struct guest_info * info, addr_t fault_gva,
69 int (*read)(addr_t read_addr, void * dst, uint_t length, void * priv_data),
70 addr_t read_addr, void * private_data);