From: Jack Lange Date: Thu, 9 Jun 2011 17:45:20 +0000 (-0500) Subject: moved vnet to extension framework X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=176c87563accd1bddbd195fa830d1d0156030ffc;hp=3d2ae914c0dae420aa777ad0b298060b808434f1;p=palacios.git moved vnet to extension framework --- diff --git a/linux_module/palacios-dev.c b/linux_module/palacios-dev.c index f06f166..f640403 100644 --- a/linux_module/palacios-dev.c +++ b/linux_module/palacios-dev.c @@ -21,7 +21,6 @@ #include "palacios.h" #include "palacios-mm.h" #include "palacios-vm.h" -#include "palacios-vnet.h" #include "linux-exts.h" @@ -244,13 +243,6 @@ static int __init v3_init(void) { - - - -#ifdef V3_CONFIG_VNET - palacios_vnet_init(); -#endif - return 0; failure1: @@ -293,12 +285,6 @@ static void __exit v3_exit(void) { deinit_lnx_extensions(); - - -#ifdef V3_CONFIG_VNET - palacios_vnet_deinit(); -#endif - palacios_deinit_mm(); printk("Palacios Module Mallocs = %d, Frees = %d\n", mod_allocs, mod_frees); diff --git a/linux_module/palacios-vnet.c b/linux_module/palacios-vnet.c index 4f3cbd5..d81fb80 100644 --- a/linux_module/palacios-vnet.c +++ b/linux_module/palacios-vnet.c @@ -277,7 +277,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,7 +289,7 @@ int palacios_vnet_init( void ) { } -void palacios_vnet_deinit( void ) { +static void vnet_deinit( void ) { deinit_vnet(); vnet_bridge_deinit(); @@ -298,3 +298,12 @@ void palacios_vnet_deinit( void ) { printk("V3 VNET Deinited\n"); } +static struct linux_ext vnet_ext = { + .name = "VNET", + .init = vnet_init, + .deinit = vnet_deinit, + .guest_init = NULL, + .guest_deinit = NULL +}; + +register_extension(&vnet_ext);