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 ssh://newskysaw.cs.northwestern.edu/home/palacios/palacios...
[palacios.git] / linux_module / palacios-vnet.c
index 4f3cbd5..a955379 100644 (file)
@@ -1,7 +1,8 @@
 /* 
-   Palacios VNET Host Hooks Implementations
-   (c) Lei Xia, 2011
+ * Palacios VNET Host Hooks Implementations 
+ * Lei Xia 2010
  */
+
 #include <linux/kernel.h>
 #include <linux/kthread.h>
 #include <linux/spinlock.h>
@@ -14,8 +15,9 @@
 #include <linux/timer.h>
 
 #include <vnet/vnet.h>
-#include "palacios-mm.h"
+#include "mm.h"
 #include "palacios-vnet.h"
+#include "linux-exts.h"
 
 static void host_print(const char *    fmt, ...) {
 
@@ -277,7 +279,7 @@ static struct vnet_host_hooks vnet_host_hooks = {
 
 
 
-int palacios_vnet_init( void ) {
+static int vnet_init( void ) {
     init_vnet(&vnet_host_hooks);
        
     vnet_bridge_init();
@@ -289,12 +291,23 @@ int palacios_vnet_init( void ) {
 }
 
 
-void palacios_vnet_deinit( void ) {
+static int vnet_deinit( void ) {
     deinit_vnet();
 
     vnet_bridge_deinit();
     vnet_ctrl_deinit();
 
     printk("V3 VNET Deinited\n");
+
+    return 0;
 }
 
+static struct linux_ext vnet_ext = {
+    .name = "VNET",
+    .init = vnet_init,
+    .deinit = vnet_deinit,
+    .guest_init = NULL,
+    .guest_deinit = NULL
+};
+
+register_extension(&vnet_ext);