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.


Cleaned up help messages for userspace utils
Peter Dinda [Wed, 20 Jun 2012 22:55:24 +0000 (17:55 -0500)]
Updated Makefile to build v3_debug

24 files changed:
linux_usr/Makefile
linux_usr/v3_cons.c
linux_usr/v3_cons_sc.c
linux_usr/v3_console [deleted file]
linux_usr/v3_continue.c
linux_usr/v3_core_move.c
linux_usr/v3_create.c
linux_usr/v3_ctrl.c
linux_usr/v3_debug.c
linux_usr/v3_env_inject.c
linux_usr/v3_free.c
linux_usr/v3_inject_ecc_scrubber_mce.c
linux_usr/v3_launch.c
linux_usr/v3_load.c
linux_usr/v3_mem.c
linux_usr/v3_monitor.c
linux_usr/v3_pause.c
linux_usr/v3_save.c
linux_usr/v3_simulate.c
linux_usr/v3_stop.c
linux_usr/v3_stream.c
linux_usr/v3_syscall.c
linux_usr/v3_top_inject.c
linux_usr/v3_user_keyed_stream_file.c

index 232ee09..1a0be11 100644 (file)
@@ -24,7 +24,8 @@ BASE_EXECS =  v3_mem \
                v3_cons_sc \
                v3_stream \
                v3_monitor \
-                v3_hypercall 
+                v3_hypercall \
+               v3_debug
 
 #
 # Examples
index 0c991a5..1dacefe 100644 (file)
@@ -277,7 +277,7 @@ int main(int argc, char* argv[]) {
     use_curses = 1;
 
     if (argc < 2) {
-       printf("Usage: ./v3_cons <vm_device>\n");
+       printf("usage: v3_cons <vm_device>\nThis will only work when run from a real PC console!\n");
        return -1;
     }
 
index 0986a92..a8e7046 100644 (file)
@@ -381,7 +381,7 @@ int main(int argc, char* argv[]) {
     use_curses = 1;
 
     if (argc < 2) {
-       printf("Usage: ./v3_cons_sc <vm_device>\n");
+       printf("usage: v3_cons_sc <vm_device>\n");
        return -1;
     }
 
diff --git a/linux_usr/v3_console b/linux_usr/v3_console
deleted file mode 100755 (executable)
index 0718179..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/perl -w
-
-if ($#ARGV!=0) { 
-       print "v3_console /dev/v3-vmXXX\n";
-       print "Use '\\' to escape terminal\n\n";
-       print "Use v3_cons if you are on a raw PC console\n";
-       print "Use vncviewer if you are trying to connect to a v3_vncserver\n";
-       exit;
-}
-
-
-$vm=shift;
-
-system "v3_cons_sc $vm 2>/dev/null";
-
index 5165a6e..0b2c411 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
  
 
     if (argc <= 1) {
-       printf("Usage: ./v3_stop <vm-dev>\n");
+       printf("usage: v3_continue <vm_device>\n");
        return -1;
     }
 
index 29bea35..80e8847 100644 (file)
@@ -22,7 +22,7 @@ int main(int argc, char* argv[]) {
     struct v3_core_move_cmd cmd; 
 
     if (argc < 4) {
-       printf("Usage: v3_core_migrate <vm_device> <vcore id> <target physical CPU id>\n");
+       printf("usage: v3_core_move <vm_device> <vcore id> <target physical CPU id>\n");
        return -1;
     }
 
index 26efeb1..4bc5ab5 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char* argv[]) {
     memset(&guest_img, 0, sizeof(struct v3_guest_img));
 
     if (argc <= 2) {
-       printf("Usage: ./v3_ctrl <guest_img> <vm name>\n");
+       printf("usage: v3_create <guest_img> <vm name>\n");
        return -1;
     }
 
index c8bf216..fc8aaae 100644 (file)
@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) {
     memset(&guest_img, 0, sizeof(struct v3_guest_img));
 
     if (argc <= 2) {
-       printf("Usage: ./v3_ctrl <guest_img> <vm name>\n");
+       printf("usage: v3_ctrl <guest_img> <vm name>\n");
        return -1;
     }
 
index b609646..e322d29 100644 (file)
@@ -22,7 +22,7 @@ int main(int argc, char* argv[]) {
     struct v3_debug_cmd cmd; 
 
     if (argc < 4) {
-       printf("Usage: v3_core_migrate <vm_device> <vm core> <cmd>\n");
+       printf("usage: v3_debug <vm_device> <vm core> <cmd>\n");
        return -1;
     }
 
index 466e8a5..a541427 100644 (file)
@@ -18,7 +18,7 @@
 
 
 static void usage (char* bin) {
-       fprintf(stderr, "Usage: %s /dev/v3-vm<N> env-file inject-point-exe\n", bin);
+       fprintf(stderr, "usage: %s /dev/v3-vm<N> env-file inject-point-exe\n", bin);
 }
 
 int main (int argc, char **argv) {
index 8e3c41f..c9c7276 100644 (file)
@@ -21,7 +21,7 @@ int main(int argc, char* argv[]) {
 
 
     if (argc <= 1) {
-       printf("Usage: ./v3_free <vm-dev-idx>\n");
+       printf("usage: v3_free <vm-dev-idx>\n");
        return -1;
     }
 
index ec98ba8..cc01431 100644 (file)
@@ -17,7 +17,7 @@ int main(int argc, char * argv[]) {
     int v3_fd = 0;
 
     if (argc <= 3) {
-        fprintf(stderr, "Usage: v3_inject_ecc_scrubber_mce <vm_device> <cpu> <hex address>\n");
+        fprintf(stderr, "usage: v3_inject_ecc_scrubber_mce <vm_device> <cpu> <hex address>\n");
         return -1;
     }
 
index 6eb4dde..cab335f 100644 (file)
@@ -20,7 +20,7 @@ int main(int argc, char* argv[]) {
     char * filename = argv[1];
 
     if (argc <= 1) {
-       printf("Usage: ./v3_launch <vm-device>\n");
+       printf("usage: v3_launch <vm-device>\n");
        return -1;
     }
 
index 019c8fa..a409a2d 100644 (file)
@@ -32,7 +32,7 @@ int main(int argc, char* argv[]) {
     char * vm_dev = NULL;
 
     if (argc < 4) {
-       printf("Usage: ./v3_load <vm_device> <store> <url>\n");
+       printf("usage: v3_load <vm_device> <store> <url>\n");
        return -1;
     }
 
index cda781d..9f7ac00 100644 (file)
@@ -51,7 +51,7 @@ int main(int argc, char * argv[]) {
     int mem_ready = 0;
 
     if (argc != 2) {
-       printf("Usage: v3_mem <memory size (MB)>\n");
+       printf("usage: v3_mem <memory size (MB)>\n");
        return -1;
     }
 
index e2c084c..934f3c7 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
     char *stream;
 
     if (argc <= 3) {
-       printf("Usage: ./v3_cons vm_device stream_name\n");
+       printf("usage: v3_monitor <vm_device> <stream_name>\n");
        return -1;
     }
 
index ddf7c47..193ba57 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
  
 
     if (argc <= 1) {
-       printf("Usage: ./v3_stop <vm-dev>\n");
+       printf("usage: v3_pause <vm_device>\n");
        return -1;
     }
 
index 009e0f2..46ae513 100644 (file)
@@ -32,7 +32,7 @@ int main(int argc, char* argv[]) {
     char * vm_dev = NULL;
 
     if (argc < 4) {
-       printf("Usage: ./v3_save <vm_device> <store> <url>\n");
+       printf("usage: v3_save <vm_device> <store> <url>\n");
        return -1;
     }
 
index aeaddaa..79f3f23 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
     
 
     if (argc <= 2) {
-       printf("Usage: ./v3_simulate <vm-dev> <msecs>\n");
+       printf("usage: v3_simulate <vm-dev> <msecs>\n");
        return -1;
     }
 
index a5f3249..adb69b1 100644 (file)
@@ -20,7 +20,7 @@ int main(int argc, char* argv[]) {
     char * filename = argv[1];
 
     if (argc <= 1) {
-       printf("Usage: ./v3_stop <vm-device>\n");
+       printf("usage: v3_stop <vm-device>\n");
        return -1;
     }
 
index 0a1f46a..45d5eb2 100644 (file)
@@ -33,7 +33,7 @@ int main(int argc, char* argv[]) {
     int stream_fd = 0;
 
     if (argc < 2) {
-       printf("Usage: ./v3_cons vm_device serial_number\n");
+       printf("usage: v3_stream <vm_device> <stream_name>\n");
        return -1;
     }
 
index 5127219..feead06 100644 (file)
@@ -19,7 +19,7 @@
 #define SYSCALL_MAX 256
 
 static void usage () {
-       fprintf(stderr, "\nUsage: v3_syscall <vm device> <syscall_nr> <on|off|status>\n");
+       fprintf(stderr, "\nusage: v3_syscall <vm device> <syscall_nr> <on|off|status>\n");
        exit(0);
 }
 
index 2e59202..5758cc8 100644 (file)
@@ -26,7 +26,7 @@
 
 
 static void usage (char* bin) {
-       fprintf(stderr, "Usage: %s /dev/v3-vm<N> <inject-code> <code-entry-offset> [inject-point-exe]\n", bin);
+       fprintf(stderr, "usage: %s /dev/v3-vm<N> <inject-code> <code-entry-offset> [inject-point-exe]\n", bin);
 }
 
 
index 275983c..21f1bf8 100644 (file)
@@ -92,7 +92,7 @@ int handle_open_key(struct palacios_user_keyed_stream_op *req,
     (*resp)->len=sizeof(struct palacios_user_keyed_stream_op);
     (*resp)->type=req->type;
     (*resp)->xfer=0;
-    (*resp)->user_key=(void*)fd;
+    (*resp)->user_key=(void*)(uint64_t)fd;
     (*resp)->buf_len=0;
     
     return 0;
@@ -106,7 +106,7 @@ int handle_close_key(struct palacios_user_keyed_stream_op *req,
     int fd;
     int rc;
  
-    fd = (int) (req->user_key);
+    fd = (int) (uint64_t) (req->user_key);
 
     rc = close(fd);
 
@@ -119,7 +119,7 @@ int handle_close_key(struct palacios_user_keyed_stream_op *req,
     (*resp)->len=sizeof(struct palacios_user_keyed_stream_op);
     (*resp)->type=req->type;
     (*resp)->xfer=rc;
-    (*resp)->user_key=(void*)fd;
+    (*resp)->user_key=(void*)(uint64_t)fd;
     (*resp)->buf_len=0;
     
     return 0;
@@ -172,7 +172,7 @@ int handle_write_key(struct palacios_user_keyed_stream_op *req,
     int fd;
     int rc;
  
-    fd = (int) (req->user_key);
+    fd = (int) (uint64_t) (req->user_key);
 
     rc = write_all(fd,req->buf,req->xfer);
 
@@ -185,7 +185,7 @@ int handle_write_key(struct palacios_user_keyed_stream_op *req,
     (*resp)->len=sizeof(struct palacios_user_keyed_stream_op);
     (*resp)->type=req->type;
     (*resp)->xfer=rc;
-    (*resp)->user_key=(void*)fd;
+    (*resp)->user_key=(void*)(uint64_t)fd;
     (*resp)->buf_len=0;
     
 
@@ -200,7 +200,7 @@ int handle_read_key(struct palacios_user_keyed_stream_op *req,
     int fd;
     int rc;
  
-    fd = (int) (req->user_key);
+    fd = (int) (uint64_t) (req->user_key);
 
     (*resp) = malloc(sizeof(struct palacios_user_keyed_stream_op)+req->xfer);
     
@@ -213,7 +213,7 @@ int handle_read_key(struct palacios_user_keyed_stream_op *req,
     (*resp)->len=sizeof(struct palacios_user_keyed_stream_op) + (rc>0 ? rc : 0);
     (*resp)->type=req->type;
     (*resp)->xfer=rc;
-    (*resp)->user_key=(void*)fd;
+    (*resp)->user_key=(void*)(uint64_t)fd;
     (*resp)->buf_len=rc>0 ? rc : 0;