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.


Add interface for power monitoring and telemetry option for power-related statistics
[palacios.git] / linux_module / iface-host-dev.c
index 6edc26b..86b0e0c 100644 (file)
@@ -839,6 +839,8 @@ static int palacios_host_dev_close(v3_host_dev_t hostdev)
     palacios_spinlock_unlock_irqrestore(&(dev->lock),f2);
     palacios_spinlock_unlock_irqrestore(&(host_dev->lock),f1);
     
+    palacios_spinlock_deinit(&(dev->lock));
+
     palacios_host_dev_user_free(dev);
 
     return 0;
@@ -1343,7 +1345,9 @@ static int host_dev_guest_init(struct v3_guest * guest, void ** vm_data ) {
 
 static int host_dev_guest_deinit(struct v3_guest * guest, void * vm_data) {
 
-    palacios_free(vm_data);
+    struct palacios_host_dev * host_dev = (struct palacios_host_dev *) vm_data;
+    palacios_spinlock_deinit(&(host_dev->lock));
+    palacios_free(host_dev);
     return 0;
 }