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.


Fixes to allocation order and functions
Peter Dinda [Sat, 7 Jul 2012 21:28:14 +0000 (16:28 -0500)]
linux_module/main.c
palacios/src/palacios/vmm_mem.c

index e37f207..c432e3c 100644 (file)
@@ -124,7 +124,7 @@ static long v3_dev_ioctl(struct file * filp,
 
            if (create_palacios_vm(guest) == -1) {
                ERROR("Palacios: Error creating guest\n");
-               palacios_free(guest->img);
+                vfree(guest->img);
                palacios_free(guest);
                return -EFAULT;
            }
index ee99811..7c11414 100644 (file)
@@ -73,6 +73,11 @@ int v3_init_mem_map(struct v3_vm_info * vm) {
     map->base_region.host_addr = (addr_t)V3_AllocPages(mem_pages);
 #endif
 
+    if ((void*)map->base_region.host_addr == NULL) { 
+       PrintError("Could not allocate guest memory\n");
+       return -1;
+    }
+
     // Clear the memory...
     memset(V3_VAddr((void *)map->base_region.host_addr), 0, mem_pages * PAGE_SIZE_4KB);
 
@@ -85,13 +90,6 @@ int v3_init_mem_map(struct v3_vm_info * vm) {
     
     map->base_region.unhandled = unhandled_err;
 
-    if ((void *)map->base_region.host_addr == NULL) {
-       PrintError("Could not allocate Guest memory\n");
-       return -1;
-    }
-       
-    //memset(V3_VAddr((void *)map->base_region.host_addr), 0xffffffff, map->base_region.guest_end);
-
     v3_register_hypercall(vm, MEM_OFFSET_HCALL, mem_offset_hypercall, NULL);
 
     return 0;