#include <palacios/vmm_mem.h>
#include <palacios/vmm.h>
#include <palacios/vmm_util.h>
-#include <palacios/vmm_emulate.h>
+#include <palacios/vmm_decoder.h>
int mem_hook_dispatch(struct guest_info * info, addr_t mem_addr, pf_error_t access_info, struct vmm_mem_hook * hook) {
+ // emulate and then dispatch
+ // or dispatch and emulate
+
+
if (access_info.write == 1) {
void * src = NULL;
uint_t length = 0;
-void init_shadow_map(struct shadow_map * map) {
+void init_shadow_map(struct guest_info * info) {
+ struct shadow_map * map = &(info->mem_map);
+
map->num_regions = 0;
map->head = NULL;
} else if (cursor->next->guest_end <= region->guest_start) {
cursor = cursor->next;
} else {
- PrintDebug("WTF?\n");
// This cannot happen!
// we should panic here
return -1;