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.


Prefaced output from V3_Print on linux module
[palacios.git] / linux_module / palacios-stubs.c
index a8f2923..de6dddd 100644 (file)
@@ -40,16 +40,48 @@ extern int cpu_list[NR_CPUS];
 extern int cpu_list_len;
 
 
+
+
 /**
  * Prints a message to the console.
  */
 static void palacios_print(const char *        fmt, ...) {
+
+#if V3_PRINTK_OLD_STYLE_OUTPUT
+
   va_list ap;
+
   va_start(ap, fmt);
   vprintk(fmt, ap);
   va_end(ap);
-  
+
+  return
+
+#else 
+
+  va_list ap;
+  char *buf;
+
+  // Allocate space atomically, in case we are called
+  // with a lock held
+  buf = kmalloc(V3_PRINTK_BUF_SIZE, GFP_ATOMIC);
+  if (!buf) { 
+      printk("palacios: output skipped - unable to allocate\n");
+      return;
+  } 
+
+  va_start(ap, fmt);
+  vsnprintf(buf,V3_PRINTK_BUF_SIZE, fmt, ap);
+  va_end(ap);
+
+  printk(KERN_INFO "palacios: %s",buf);
+
+  kfree(buf);
+
   return;
+
+#endif
+
 }