1 #ifndef __VMM_EMULATOR_H__
2 #define __VMM_EMULATOR_H__
6 #include <palacios/vmm_list.h>
7 #include <palacios/vmm_shadow_paging.h>
8 #include <palacios/vmm_paging.h>
14 struct emulated_page {
18 struct list_head page_list;
24 struct list_head page_list;
32 int (*write)(addr_t write_addr, void * src, uint_t length, void * priv_data);
36 struct list_head write_list;
40 struct emulation_state {
41 uint_t num_emulated_pages;
42 struct list_head emulated_pages;
44 uint_t num_saved_pages;
45 struct list_head saved_pages;
47 uint_t num_write_regions;
48 struct list_head write_regions;
53 uint_t tf_enabled : 1;
57 int init_emulator(struct guest_info * info);
60 int v3_emulation_exit_handler(struct guest_info * info);
62 int v3_emulate_memory_write(struct guest_info * info, addr_t fault_gva,
63 int (*write)(addr_t write_addr, void * src, uint_t length, void * priv_data),
64 addr_t write_addr, void * private_data);
65 int v3_emulate_memory_read(struct guest_info * info, addr_t fault_gva,
66 int (*read)(addr_t read_addr, void * dst, uint_t length, void * priv_data),
67 addr_t read_addr, void * private_data);