X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vm.c;h=04b338a6e3c2f3d6104e5387fe33568fe2e49117;hb=3d2ae914c0dae420aa777ad0b298060b808434f1;hp=d3ae3159846903f01332a817e4429f234ca0461b;hpb=c94c9b19999f937b32627794c80e19c9be555822;p=palacios-OLD.git diff --git a/linux_module/palacios-vm.c b/linux_module/palacios-vm.c index d3ae315..04b338a 100644 --- a/linux_module/palacios-vm.c +++ b/linux_module/palacios-vm.c @@ -22,6 +22,7 @@ #include "palacios.h" #include "palacios-vm.h" +#include "linux-exts.h" struct vm_ctrl { @@ -111,26 +112,13 @@ static struct vm_ctrl * get_ctrl(struct v3_guest * guest, unsigned int cmd) { } -#ifdef V3_CONFIG_STREAM -#include "palacios-stream.h" -#endif -#ifdef V3_CONFIG_EXT_INSPECTOR -#include "palacios-inspector.h" -#endif -#ifdef V3_CONFIG_GRAPHICS_CONSOLE -#include "palacios-graphics-console.h" -#endif -#ifdef V3_CONFIG_HOST_DEVICE -#include "palacios-host-dev.h" -#define HOST_DEV_URL_LEN 256 -#endif extern struct class * v3_class; -#define STREAM_NAME_LEN 128 + static long v3_vm_ioctl(struct file * filp, unsigned int ioctl, unsigned long arg) { @@ -147,62 +135,6 @@ static long v3_vm_ioctl(struct file * filp, break; } - - case V3_VM_STREAM_CONNECT: { -#ifdef V3_CONFIG_STREAM - void __user * argp = (void __user *)arg; - char path_name[STREAM_NAME_LEN]; - - if (copy_from_user(path_name, argp, STREAM_NAME_LEN)) { - printk("%s(%d): copy from user error...\n", __FILE__, __LINE__); - return -EFAULT; - } - - return open_stream(path_name); -#else - printk("Stream support Not available\n"); - return -EFAULT; -#endif - break; - } - - case V3_VM_HOST_DEV_CONNECT: { -#ifdef V3_CONFIG_HOST_DEVICE - void __user * argp = (void __user *)arg; - char host_dev_url[HOST_DEV_URL_LEN]; - - if (copy_from_user(host_dev_url, argp, HOST_DEV_URL_LEN)) { - printk("copy from user error getting url for host device connect...\n"); - return -EFAULT; - } - - return connect_host_dev(guest,host_dev_url); -#else - printk("palacios: Host device support not available\n"); - return -EFAULT; -#endif - break; - } - - case V3_VM_FB_INPUT: -#ifdef V3_CONFIG_GRAPHICS_CONSOLE - return palacios_graphics_console_user_input(&(guest->graphics_console), - (struct v3_fb_input __user *) arg) ; -#else - return -EFAULT; -#endif - break; - - case V3_VM_FB_QUERY: -#ifdef V3_CONFIG_GRAPHICS_CONSOLE - return palacios_graphics_console_user_query(&(guest->graphics_console), - (struct v3_fb_query_response __user *) arg); -#else - return -EFAULT; -#endif - break; - - default: { struct vm_ctrl * ctrl = get_ctrl(guest, ioctl); @@ -262,6 +194,7 @@ int start_palacios_vm(void * arg) { // allow_signal(SIGKILL); unlock_kernel(); + init_vm_extensions(guest); guest->v3_ctx = v3_create_vm(guest->img, (void *)guest, guest->name); @@ -271,12 +204,6 @@ int start_palacios_vm(void * arg) { return -1; } - // init linux extensions - - -#ifdef V3_CONFIG_EXT_INSPECTOR - inspect_vm(guest); -#endif printk("Creating VM device: Major %d, Minor %d\n", MAJOR(guest->vm_dev), MINOR(guest->vm_dev));