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.


Disallow startup with shadow paging + memory region outside 4GB boundary
[palacios.git] / palacios / src / palacios / vmm_io.c
index 0e099e5..8ed88d8 100644 (file)
@@ -24,7 +24,7 @@
 
 
 
-#ifndef CONFIG_DEBUG_IO
+#ifndef V3_CONFIG_DEBUG_IO
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -128,6 +128,12 @@ int v3_hook_io_port(struct v3_vm_info * vm, uint16_t port,
                    void * priv_data) {
   struct v3_io_hook * io_hook = (struct v3_io_hook *)V3_Malloc(sizeof(struct v3_io_hook));
 
+  if (!io_hook) {
+      PrintError("Cannot allocate in hooking an I/O port\n");
+      return -1;
+  }
+
+
   io_hook->port = port;
 
   if (!read) {