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.


Expose swapping and pinning to host + add visibility to linux module
Peter Dinda [Sun, 22 Jun 2014 23:05:39 +0000 (18:05 -0500)]
/proc/v3vee/v3-guests-details will now show the swapped or pinned state
of regions

linux_module/main.c
palacios/include/palacios/vmm.h
palacios/src/palacios/vmm.c

index 34c24f7..2da1b22 100644 (file)
@@ -355,9 +355,11 @@ static int read_guests_details(struct seq_file *s, void *v)
 
                seq_printf(s, "\nMemory Regions\n");
                for (j=0;j<mem->num_regions;j++) { 
-                   seq_printf(s,"   region %u has HPAs 0x%p-0x%p (node %d)\n",
+                   seq_printf(s,"   region %u has HPAs 0x%p-0x%p (node %d) %s %s\n",
                               j, mem->region[j].host_paddr, mem->region[j].host_paddr+mem->region[j].size,
-                              numa_addr_to_node((uintptr_t)(mem->region[j].host_paddr)));
+                              numa_addr_to_node((uintptr_t)(mem->region[j].host_paddr)),
+                              mem->region[j].swapped ? "swapped" : "",
+                              mem->region[j].pinned ? "pinned" : "");
                }
            }
            seq_printf(s,
index 78373bc..7aba5de 100644 (file)
@@ -402,6 +402,8 @@ struct v3_vm_core_state {
 struct v3_vm_mem_region {
     void               *host_paddr;
     unsigned long long  size;
+    int                 swapped;
+    int                 pinned;
 };
 
 struct v3_vm_mem_state {
index 2f1a7bb..e16e2fa 100644 (file)
@@ -862,6 +862,14 @@ int v3_get_state_vm(struct v3_vm_info        *vm,
     for (i=0;i<vm->mem_map.num_base_regions;i++) {
        mem->region[i].host_paddr =  (void*)(vm->mem_map.base_regions[i].host_addr);
        mem->region[i].size = v3_mem_block_size;
+#ifdef V3_CONFIG_SWAPPING
+       mem->region[i].swapped = vm->mem_map.base_regions[i].flags.swapped;
+       mem->region[i].pinned = vm->mem_map.base_regions[i].flags.pinned;
+#else
+       mem->region[i].swapped = 0;
+       mem->region[i].pinned = 0;
+#endif
+
     }
 
     mem->num_regions=numregions;