/*
- 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>
#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, ...) {
-int palacios_vnet_init( void ) {
+static int vnet_init( void ) {
init_vnet(&vnet_host_hooks);
+
+ vnet_bridge_init();
+ vnet_ctrl_init();
- palacios_init_vnet_bridge();
printk("V3 VNET Inited\n");
return 0;
}
+
+
+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);