static int unhandled_err(struct guest_info * core, addr_t guest_va, addr_t guest_pa,
struct v3_mem_region * reg, pf_error_t access_info) {
- PrintError("Unhandled memory access error\n");
+ PrintError("Unhandled memory access error (gpa=%p, gva=%p, error_code=%d)\n",
+ (void *)guest_pa, (void *)guest_va, *(uint32_t *)&access_info);
v3_print_mem_map(core->vm_info);
v3_rb_erase(&(reg->tree_node), &(vm->mem_map.mem_regions));
- V3_Free(reg);
// If the guest isn't running then there shouldn't be anything to invalidate.
// Page tables should __always__ be created on demand during execution
// NOTE: This is a sanity check, and can be removed if that assumption changes
if (vm->run_state != VM_RUNNING) {
+ V3_Free(reg);
return;
}
}
}
+ V3_Free(reg);
+
// flush virtual page tables
// 3 cases shadow, shadow passthrough, and nested