X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvm_guest.c;h=a12c76497fb8279e35c81e34eba77b1f4ab602da;hb=a4fd5bcc79e7cdf9a3bd879294566bff0666ced7;hp=5c9884841f3586e998bcdbb68fc22c22f291194a;hpb=d3d6d09894dba66f4e2361bb2f903139a2d83684;p=palacios.git diff --git a/palacios/src/palacios/vm_guest.c b/palacios/src/palacios/vm_guest.c index 5c98848..a12c764 100644 --- a/palacios/src/palacios/vm_guest.c +++ b/palacios/src/palacios/vm_guest.c @@ -250,6 +250,15 @@ int v3_init_vm(struct v3_vm_info * vm) { return -1; } + if (v3_init_passthrough_paging(vm) == -1) { + PrintError(vm, VCORE_NONE, "VM initialization error in passthrough paging\n"); + return -1; + } + + if (v3_init_nested_paging(vm) == -1) { + PrintError(vm, VCORE_NONE, "VM initialization error in nested paging\n"); + return -1; + } v3_init_time_vm(vm); @@ -335,6 +344,8 @@ int v3_free_vm_internal(struct v3_vm_info * vm) { v3_deinit_mem_hooks(vm); v3_delete_mem_map(vm); v3_deinit_shdw_impl(vm); + v3_deinit_passthrough_paging(vm); + v3_deinit_nested_paging(vm); v3_deinit_ext_manager(vm); v3_deinit_intr_routers(vm); @@ -376,7 +387,11 @@ int v3_init_core(struct guest_info * core) { #endif if (core->shdw_pg_mode == SHADOW_PAGING) { + v3_init_passthrough_paging_core(core); v3_init_shdw_pg_state(core); + } else { + //done later due to SVM/VMX differences + //v3_init_nested_paging_core(core); } v3_init_time_core(core); @@ -441,6 +456,9 @@ int v3_free_core(struct guest_info * core) { if (core->shdw_pg_mode == SHADOW_PAGING) { v3_deinit_shdw_pg_state(core); + v3_deinit_passthrough_paging_core(core); + } else { + v3_deinit_nested_paging_core(core); } v3_free_passthrough_pts(core);