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.


Clear guest memory to 0 at init time.
[palacios.git] / palacios / src / palacios / vmm_mem.c
index 6bb9f5a..dd262c0 100644 (file)
@@ -72,6 +72,10 @@ int v3_init_mem_map(struct v3_vm_info * vm) {
     map->base_region.host_addr = (addr_t)V3_AllocPages(mem_pages);
 #endif
 
+    // Clear the memory...
+    memset(V3_VAddr((void *)map->base_region.host_addr), 0, mem_pages * PAGE_SIZE_4KB);
+
+
     map->base_region.flags.read = 1;
     map->base_region.flags.write = 1;
     map->base_region.flags.exec = 1;
@@ -302,6 +306,10 @@ static struct v3_mem_region * get_next_mem_region( struct v3_vm_info * vm, uint1
     struct v3_mem_region * reg = NULL;
     struct v3_mem_region * parent = NULL;
 
+    if (n == NULL) {
+       return NULL;
+    }
+
     while (n) {
 
        reg = rb_entry(n, struct v3_mem_region, tree_node);