v3_deinit_time_vm(vm);
- v3_deinit_shdw_impl(vm);
v3_deinit_mem_hooks(vm);
v3_delete_mem_map(vm);
+ v3_deinit_shdw_impl(vm);
v3_deinit_intr_routers(vm);
v3_deinit_host_events(vm);
return;
}
+
+ 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) {
+ return;
+ }
+
for (i = 0; i < vm->num_cores; i++) {
struct guest_info * info = &(vm->cores[i]);
}
}
- v3_rb_erase(&(reg->tree_node), &(vm->mem_map.mem_regions));
-
- V3_Free(reg);
-
// flush virtual page tables
// 3 cases shadow, shadow passthrough, and nested