-/*
- 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>
#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);