Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Correct VM deallocation on fail before nested paging init
[palacios.git] / palacios / src / palacios / vmm_direct_paging.c
index b747ef1..716e029 100644 (file)
@@ -624,6 +624,7 @@ int v3_init_nested_paging(struct v3_vm_info *vm)
 {
   INIT_LIST_HEAD(&(vm->nested_impl.event_callback_list));
   v3_rw_lock_init(&(vm->nested_impl.event_callback_lock));
+  vm->nested_impl.inited=1;
   return 0;
 }
 
@@ -644,6 +645,10 @@ int v3_deinit_nested_paging(struct v3_vm_info *vm)
   struct nested_event_callback *cb,*temp;
   addr_t flags;
   
+  if (!vm->nested_impl.inited) { 
+      return 0;
+  }
+
   flags=v3_write_lock_irqsave(&(vm->nested_impl.event_callback_lock));
     
   list_for_each_entry_safe(cb,