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.


Copyrights for lock and memory checking
[palacios.git] / linux_module / vm.c
index 54d5efd..ac1b363 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/poll.h>
 #include <linux/anon_inodes.h>
 #include <linux/sched.h>
-#include <linux/vmalloc.h>
 #include <linux/file.h>
 #include <linux/spinlock.h>
 #include <linux/rbtree.h>
@@ -124,7 +123,7 @@ int remove_guest_ctrl(struct v3_guest * guest, unsigned int cmd) {
 
     rb_erase(&(ctrl->tree_node), &(guest->vm_ctrls));
 
-    kfree(ctrl);
+    palacios_free(ctrl);
 
     return 0;
 }
@@ -140,7 +139,7 @@ static void free_guest_ctrls(struct v3_guest * guest) {
        
        WARNING("Cleaning up guest ctrl that was not removed explicitly (%d)\n", ctrl->cmd);
 
-       kfree(ctrl);
+       palacios_free(ctrl);
     }
 }
 
@@ -212,7 +211,7 @@ static long v3_vm_ioctl(struct file * filp,
            
            NOTICE("Saving Guest to %s:%s\n", chkpt.store, chkpt.url);
 
-           if (v3_save_vm(guest->v3_ctx, chkpt.store, chkpt.url) == -1) {
+           if (v3_save_vm(guest->v3_ctx, chkpt.store, chkpt.url, chkpt.opts) == -1) {
                WARNING("Error checkpointing VM state\n");
                return -EFAULT;
            }
@@ -232,7 +231,7 @@ static long v3_vm_ioctl(struct file * filp,
            
            NOTICE("Loading Guest from %s:%s\n", chkpt.store, chkpt.url);
 
-           if (v3_load_vm(guest->v3_ctx, chkpt.store, chkpt.url) == -1) {
+           if (v3_load_vm(guest->v3_ctx, chkpt.store, chkpt.url, chkpt.opts) == -1) {
                WARNING("Error Loading VM state\n");
                return -EFAULT;
            }
@@ -256,7 +255,7 @@ static long v3_vm_ioctl(struct file * filp,
            
            NOTICE("Sending (live-migrating) Guest to %s:%s\n",chkpt_info.store, chkpt_info.url); 
            
-           if (v3_send_vm(guest->v3_ctx, chkpt_info.store, chkpt_info.url) == -1) {
+           if (v3_send_vm(guest->v3_ctx, chkpt_info.store, chkpt_info.url, chkpt_info.opts) == -1) {
                WARNING("Error sending VM\n");
                return -EFAULT;
            }
@@ -278,7 +277,7 @@ static long v3_vm_ioctl(struct file * filp,
            
            NOTICE("Receiving (live-migrating) Guest to %s:%s\n",chkpt_info.store, chkpt_info.url);
            
-           if (v3_receive_vm(guest->v3_ctx, chkpt_info.store, chkpt_info.url) == -1) {
+           if (v3_receive_vm(guest->v3_ctx, chkpt_info.store, chkpt_info.url, chkpt_info.opts) == -1) {
                WARNING("Error receiving VM\n");
                return -EFAULT;
            }
@@ -444,7 +443,7 @@ int free_palacios_vm(struct v3_guest * guest) {
     free_guest_ctrls(guest);
 
 
-    vfree(guest->img);
+    palacios_vfree(guest->img);
     palacios_free(guest);
 
     return 0;