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.


added missing pause/continue utilities
Jack Lange [Tue, 20 Sep 2011 20:57:35 +0000 (16:57 -0400)]
linux_usr/Makefile
linux_usr/v3_continue.c [new file with mode: 0644]
linux_usr/v3_pause.c [new file with mode: 0644]

index c74b4cc..c36a212 100644 (file)
@@ -2,8 +2,10 @@ all: v3_ctrl v3_stop v3_cons v3_mem v3_monitor v3_stream v3_user_host_dev_exampl
 
 
 
-v3_ctrl : v3_ctrl.c v3_ctrl.h
+v3_ctrl : v3_ctrl.c v3_pause.c v3_continue.c v3_ctrl.h
        gcc -static v3_ctrl.c -o v3_ctrl 
+       gcc -static v3_pause.c -o v3_pause
+       gcc -static v3_continue.c -o v3_continue
 
 v3_stop : v3_stop.c v3_ctrl.h
        gcc -static v3_stop.c -o v3_stop 
@@ -16,7 +18,6 @@ v3_load : v3_load.c v3_ctrl.h
 v3_mem : v3_mem.c v3_ctrl.h
        gcc -static v3_mem.c -o v3_mem 
 
-
 v3_cons : v3_cons.c v3_cons_sc.c v3_ctrl.h
        gcc  v3_cons.c -o v3_cons -lcurses
        gcc  v3_cons_sc.c -o v3_cons_sc -lcurses
diff --git a/linux_usr/v3_continue.c b/linux_usr/v3_continue.c
new file mode 100644 (file)
index 0000000..5165a6e
--- /dev/null
@@ -0,0 +1,51 @@
+/* 
+ * V3 Control utility
+ * (c) Jack lange, 2010
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h> 
+#include <sys/ioctl.h> 
+#include <sys/stat.h> 
+#include <sys/types.h> 
+#include <unistd.h> 
+#include <string.h>
+#include "v3_ctrl.h"
+
+int read_file(int fd, int size, unsigned char * buf);
+
+int main(int argc, char* argv[]) {
+    char * filename = argv[1];
+    int vm_fd = 0;
+
+    if (argc <= 1) {
+       printf("Usage: ./v3_stop <vm-dev>\n");
+       return -1;
+    }
+
+    printf("Stopping VM\n");
+    
+    vm_fd = open(filename, O_RDONLY);
+
+    if (vm_fd == -1) {
+       printf("Error opening V3Vee VM device\n");
+       return -1;
+    }
+
+    ioctl(vm_fd, 24, NULL); 
+
+
+
+    /* Close the file descriptor.  */ 
+    close(vm_fd); 
+
+
+    return 0; 
+} 
+
+
diff --git a/linux_usr/v3_pause.c b/linux_usr/v3_pause.c
new file mode 100644 (file)
index 0000000..ddf7c47
--- /dev/null
@@ -0,0 +1,51 @@
+/* 
+ * V3 Control utility
+ * (c) Jack lange, 2010
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h> 
+#include <sys/ioctl.h> 
+#include <sys/stat.h> 
+#include <sys/types.h> 
+#include <unistd.h> 
+#include <string.h>
+#include "v3_ctrl.h"
+
+int read_file(int fd, int size, unsigned char * buf);
+
+int main(int argc, char* argv[]) {
+    char * filename = argv[1];
+    int vm_fd = 0;
+
+    if (argc <= 1) {
+       printf("Usage: ./v3_stop <vm-dev>\n");
+       return -1;
+    }
+
+    printf("Stopping VM\n");
+    
+    vm_fd = open(filename, O_RDONLY);
+
+    if (vm_fd == -1) {
+       printf("Error opening V3Vee VM device\n");
+       return -1;
+    }
+
+    ioctl(vm_fd, 23, NULL); 
+
+
+
+    /* Close the file descriptor.  */ 
+    close(vm_fd); 
+
+
+    return 0; 
+} 
+
+