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.


Cleanup and sanity-checking of explicit null derefs (Coverity static analysis)
[palacios.git] / palacios / src / palacios / vmm.c
index 89b0173..dbb1b8d 100644 (file)
@@ -750,6 +750,8 @@ int v3_move_vm_mem(struct v3_vm_info * vm, void *gpa, int target_cpu) {
     }
 
     // Note, assumes virtual contiguity in the host OS... 
+    // A null deref here can only happen if the host does not provide the
+    // physical_to_virtual functions or if they do not work
     memcpy(V3_VAddr((void*)new_hpa), V3_VAddr((void*)(reg->host_addr)), num_pages*PAGE_SIZE);
 
     old_hpa = (void*)(reg->host_addr);
@@ -1226,18 +1228,6 @@ v3_cpu_mode_t v3_get_host_cpu_mode() {
 
 #endif 
 
-void v3_print_cond(const char * fmt, ...) {
-    if (v3_dbg_enable == 1) {
-       char buf[2048];
-       va_list ap;
-
-       va_start(ap, fmt);
-       vsnprintf(buf, 2048, fmt, ap);
-       va_end(ap);
-
-       V3_Print(VM_NONE, VCORE_NONE,"%s", buf);
-    }    
-}