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.


Merge branch 'devel' of palacios@newskysaw.cs.northwestern.edu:/home/palacios/palacio...
Lei Xia [Thu, 30 Jun 2011 21:27:12 +0000 (16:27 -0500)]
14 files changed:
linux_module/iface-packet.c
linux_module/iface-socket.c
linux_module/iface-stream.c
linux_module/iface-stream.h
linux_module/palacios-vnet-brg.c
linux_module/palacios-vnet-ctrl.c
linux_module/palacios-vnet.c
linux_module/palacios-vnet.h
linux_module/util-hashtable.c
linux_module/util-hashtable.h
linux_module/util-ringbuffer.c
linux_module/util-ringbuffer.h
palacios/include/palacios/vmm_ethernet.h
palacios/src/devices/lnx_virtio_nic.c

index d72306e..d83ec61 100644 (file)
@@ -1,6 +1,23 @@
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
+ */
 /* 
- * Palacios Raw Packet 
- * (c) Lei Xia, 2010
+ * Palacios Raw Packet Interface Implementation
  */
 #include <asm/uaccess.h>
 #include <linux/inet.h>
index e572ec9..7407f5f 100644 (file)
@@ -16,6 +16,9 @@
  * Version 2 (GPLv2).  The accompanying COPYING file contains the
  * full text of the license.
  */
+ /* 
+ * Palacios Socket Interface Implementation
+ */
 
 #include <interfaces/vmm_socket.h>
 
index 5c08204..1a59052 100644 (file)
@@ -1,8 +1,22 @@
-
-/* 
- * VM specific Controls
- * (c) Lei Xia, 2010
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2010, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2010, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
  */
 #include <linux/errno.h>
 #include <linux/percpu.h>
 #include <linux/sched.h>
@@ -47,37 +61,12 @@ struct vm_stream_state {
     struct list_head open_streams;
 };
 
-static int stream_enqueue(struct stream_buffer * stream, char * buf, int len) {
-    int bytes = 0;
-
-    bytes = ringbuf_write(stream->buf, buf, len);
-
-    return bytes;
-}
-
-
-static int stream_dequeue(struct stream_buffer * stream, char * buf, int len) {
-    int bytes = 0;
-
-    bytes = ringbuf_read(stream->buf, buf, len);
-
-    return bytes;
-}
-
-static int stream_datalen(struct stream_buffer * stream){
-    return ringbuf_data_len(stream->buf);
-}
-
-
-
-
 
 static struct stream_buffer * find_stream_by_name(struct v3_guest * guest, const char * name) {
     struct stream_buffer * stream = NULL;
     struct list_head * stream_list = NULL;
     struct vm_stream_state * vm_state = NULL;
 
-
     if (guest == NULL) {
        stream_list = &global_streams;
     } else {
@@ -107,8 +96,7 @@ static ssize_t stream_read(struct file * filp, char __user * buf, size_t size, l
     
     wait_event_interruptible(stream->intr_queue, (ringbuf_data_len(stream->buf) != 0));
 
-
-    return 0;
+    return ringbuf_read(stream->buf, buf, size);
 }
 
 
@@ -164,7 +152,7 @@ static int palacios_stream_write(void * stream_ptr, char * buf, int len) {
     struct stream_buffer * stream = (struct stream_buffer *)stream_ptr;
     int ret = 0;
 
-    ret = stream_enqueue(stream, buf, len);
+    ret = ringbuf_write(stream->buf, buf, len);
 
     if (ret > 0) {
        wake_up_interruptible(&(stream->intr_queue));
index 10a3353..6e42963 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2010, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2010, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
+ */
 #ifndef __IFACE_STREAM_H__
 #define __IFACE_STREAM_H__
 
index e87d422..a45ead0 100644 (file)
@@ -1,7 +1,23 @@
-/* 
-   Palacios VNET Host Bridge
-   (c) Lei Xia, 2010
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
  */
+/* Palacios VNET Host Bridge */
+
 #include <linux/spinlock.h>
 #include <linux/seq_file.h>
 #include <linux/proc_fs.h>
index 4cd1c15..74e14c4 100644 (file)
@@ -1,7 +1,23 @@
-/* 
-   Palacios VNET Control Module
-   (c) Lei Xia, 2010
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
  */
+/* Palacios VNET Control Module */
+
 #include <linux/spinlock.h>
 #include <linux/seq_file.h>
 #include <linux/proc_fs.h>
index 7070c6d..7da8863 100644 (file)
@@ -1,7 +1,23 @@
-/* 
-   Palacios VNET Host Hooks Implementations
-   (c) Lei Xia, 2011
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
  */
+/* Palacios VNET Host Hooks Implementations */
+
 #include <linux/kernel.h>
 #include <linux/kthread.h>
 #include <linux/spinlock.h>
index 6acf6c9..47d8ed9 100644 (file)
@@ -1,6 +1,20 @@
 /*
- * Palacios VNET Host Header
- * (c) Lei Xia, 2010
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
  */
 
 #ifndef __PALACIOS_VNET_H__
index 52fc594..e5ac64a 100644 (file)
@@ -1,6 +1,20 @@
 /*
- * Palacios Hash Table 
- * (c) Lei Xia, 2011
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
  */
  
 #include <linux/string.h>
index 3d46202..72a6cbb 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2010, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2010, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
+ */
 #ifndef __PALACIOS_HASHTABLE_H__
 #define __PALACIOS_HASHTABLE_H__
 
index 53071e8..0902acc 100644 (file)
@@ -1,7 +1,22 @@
-/* \r
- * Ringbuffer Routines for VM\r
- * (c) Lei Xia, 2010\r
+/*\r
+ * This file is part of the Palacios Virtual Machine Monitor developed\r
+ * by the V3VEE Project with funding from the United States National\r
+ * Science Foundation and the Department of Energy.\r
+ *\r
+ * The V3VEE Project is a joint project between Northwestern University\r
+ * and the University of New Mexico.  You can find out more at\r
+ * http://www.v3vee.org\r
+ *\r
+ * Copyright (c) 2010, Lei Xia <lxia@northwestern.edu>\r
+ * Copyright (c) 2010, The V3VEE Project <http://www.v3vee.org>\r
+ * All rights reserved.\r
+ *\r
+ * This is free software.  You are permitted to use, redistribute,\r
+ * and modify it under the terms of the GNU General Public License\r
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the\r
+ * full text of the license.\r
  */\r
+\r
 #include <linux/errno.h>\r
 #include <linux/percpu.h>\r
 #include <linux/sched.h>\r
index eb39025..11eb8a1 100644 (file)
@@ -1,26 +1,40 @@
-/* 
- * Ringbuffer Routines for VM\r
- * (c) Lei Xia, 2010
- */\r
+/*
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National
+ * Science Foundation and the Department of Energy.
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2010, Lei Xia <lxia@northwestern.edu>
+ * Copyright (c) 2010, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * This is free software.  You are permitted to use, redistribute,
+ * and modify it under the terms of the GNU General Public License
+ * Version 2 (GPLv2).  The accompanying COPYING file contains the
+ * full text of the license.
+ */
 
-#ifndef __PALACIOS_RING_BUFFER_H__\r
-#define __PALACIOS_RING_BUFFER_H__\r
-\r
-struct ringbuf {\r
-    unsigned char * buf;\r
-    unsigned int size;\r
+#ifndef __PALACIOS_RING_BUFFER_H__
+#define __PALACIOS_RING_BUFFER_H__
 
-    unsigned int start;\r
-    unsigned int end;\r
-    unsigned int current_len;\r
+struct ringbuf {
+    unsigned char * buf;
+    unsigned int size;
+
+    unsigned int start;
+    unsigned int end;
+    unsigned int current_len;
 };
-\r
-\r
-struct ringbuf * create_ringbuf(unsigned int size);\r
-void free_ringbuf(struct ringbuf * ring);\r
-int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len);\r
-int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len);\r
-int ringbuf_data_len(struct ringbuf * ring);\r
 
-#endif\r
-\r
+
+struct ringbuf * create_ringbuf(unsigned int size);
+void free_ringbuf(struct ringbuf * ring);
+int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len);
+int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len);
+int ringbuf_data_len(struct ringbuf * ring);
+
+#endif
+
index 1fd00ac..dadb775 100644 (file)
 #define ETH_ALEN 6
 
 #define MIN_MTU 68
-//#define MAX_MTU 65535
-#define MAX_MTU 9000
+#define MAX_MTU 65535
 
-#define MAX_PACKET_LEN (ETHERNET_HEADER_LEN + MAX_MTU)
+#define MAX_PACKET_LEN (MAX_MTU)
 
 #ifdef V3_CONFIG_VNET
 extern int net_debug;
index 7a4eb4a..952cc52 100644 (file)
@@ -595,7 +595,7 @@ static int virtio_rx(uint8_t * buf, uint32_t size, void * private_data) {
        uint16_t buf_idx;
        struct vring_desc * buf_desc;
        uint32_t hdr_len, len;
-       uint32_t offset = 0;
+       uint32_t offset = 0;
 
        hdr_len = (virtio->mergeable_rx_bufs)?
            sizeof(struct virtio_net_hdr_mrg_rxbuf):
@@ -935,8 +935,6 @@ static int connect_fn(struct v3_vm_info * info,
     net_state->timer = v3_add_timer(&(info->cores[0]),
                                    &timer_ops,net_state);
 
-    PrintError("net_state 0x%p\n", (void *)net_state);
-
     ops->recv = virtio_rx;
     ops->frontend_data = net_state;
     memcpy(ops->fnt_mac, virtio->mac, ETH_ALEN);