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
Peter Dinda [Sun, 20 Sep 2015 20:51:07 +0000 (15:51 -0500)]
palacios/include/palacios/vmm_direct_paging.h
palacios/src/palacios/vmm_direct_paging.c

index fc9d924..6e1a3b5 100644 (file)
@@ -111,6 +111,7 @@ struct v3_nested_impl_state {
     // The externally visible state is just the callbacks
     v3_rw_lock_t     event_callback_lock;
     struct list_head event_callback_list;
+    int              inited; 
 };
 
 int v3_init_nested_paging(struct v3_vm_info *vm);
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,