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.


Additional error checking / output for failing memory region operations
Peter Dinda [Tue, 1 Jan 2013 00:11:16 +0000 (18:11 -0600)]
palacios/src/palacios/vmm_mem.c
palacios/src/palacios/vmm_mem_hook.c

index 0f208b4..6a4f5da 100644 (file)
@@ -192,6 +192,7 @@ struct v3_mem_region * __insert_mem_region(struct v3_vm_info * vm,
                PrintError(vm, VCORE_NONE, "Trying to map a partial overlapped core specific page...\n");
                return tmp_region; // This is ugly... 
            } else if (region->core_id == tmp_region->core_id) {
+               PrintError(vm, VCORE_NONE, "Trying to map a core-overlapping page\n");
                return tmp_region;
            } else if (region->core_id < tmp_region->core_id) {
                p = &(*p)->rb_left;
@@ -213,6 +214,7 @@ int v3_insert_mem_region(struct v3_vm_info * vm, struct v3_mem_region * region)
     int i = 0;
 
     if ((ret = __insert_mem_region(vm, region))) {
+       PrintError(vm, VCORE_NONE, "Internal insert failed returned region is from 0x%p to 0x%p on vcore %d\n", (void*)(ret->guest_start), (void*)(ret->guest_end), ret->core_id);
        return -1;
     }
 
index f4040ff..99730d5 100644 (file)
@@ -359,6 +359,12 @@ int v3_hook_write_mem(struct v3_vm_info * vm, uint16_t core_id,
 
     entry = v3_create_mem_region(vm, core_id, guest_addr_start, guest_addr_end);
 
+    if (!entry) { 
+       PrintError(vm, VCORE_NONE, "Cannot allocate a memory region\n");
+       V3_Free(hook);
+       return -1;
+    }
+
     hook->region = entry;
 
     entry->host_addr = host_addr;
@@ -370,6 +376,7 @@ int v3_hook_write_mem(struct v3_vm_info * vm, uint16_t core_id,
     entry->flags.alloced = 1;
 
     if (v3_insert_mem_region(vm, entry) == -1) {
+        PrintError(vm, VCORE_NONE, "Cannot insert memory region\n");
        V3_Free(entry);
        V3_Free(hook);
        return -1;