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.


Dynamic migration of memory from node to node
[palacios.git] / linux_module / main.c
index 99ec9e8..932b739 100644 (file)
@@ -355,8 +355,9 @@ 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\n",
-                              j, mem->region[j].host_paddr, mem->region[j].host_paddr+mem->region[j].size);
+                   seq_printf(s,"   region %u has HPAs 0x%p-0x%p (node %d)\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)));
                }
            }
            seq_printf(s,
@@ -481,7 +482,7 @@ static int read_info(struct seq_file *s, void *v)
     if (!v3_lookup_option("mem_block_size")) { 
        mem_block_size = V3_CONFIG_MEM_BLOCK_SIZE;
     } else {
-       if (kstrtoull(v3_lookup_option("mem_block_size"), 0, &mem_block_size)) {
+       if (strict_strtoull(v3_lookup_option("mem_block_size"), 0, &mem_block_size)) {
            // huh?
            mem_block_size=-1;
        }
@@ -563,6 +564,10 @@ static int __init v3_init(void) {
       palacios_allow_devmem();
     }
 
+    // numa is now a required interface and we need it
+    // up before primary initiatilization
+    palacios_init_numa();
+
     // Initialize Palacios
     palacios_vmm_init(options);
 
@@ -695,6 +700,8 @@ static void __exit v3_exit(void) {
 
     palacios_vmm_exit();
 
+    palacios_deinit_numa();
+
     DEBUG("Palacios Mallocs = %d, Frees = %d\n", mallocs, frees);
     DEBUG("Palacios Vmallocs = %d, Vfrees = %d\n", vmallocs, vfrees);
     DEBUG("Palacios Page Allocs = %d, Page Frees = %d\n", pg_allocs, pg_frees);