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.


Lots of pedantic error checking in Palacios proper, especially for memory
[palacios.git] / palacios / src / palacios / vmx_io.c
index 1dbe95e..1c33f11 100644 (file)
@@ -47,9 +47,17 @@ static int update_map(struct v3_vm_info * vm, uint16_t port, int hook_read, int
 }
 
 int v3_init_vmx_io_map(struct v3_vm_info * vm) {
+    void *temp;
+
     vm->io_map.update_map = update_map;
-    
-    vm->io_map.arch_data = V3_VAddr(V3_AllocPages(2));
+
+    temp = V3_AllocPages(2);
+    if (!temp) {
+       PrintError("Cannot allocate io bitmap\n");
+       return -1;
+    }
+                  
+    vm->io_map.arch_data = V3_VAddr(temp);
     memset(vm->io_map.arch_data, 0xff, PAGE_SIZE_4KB * 2);
 
     v3_refresh_io_map(vm);