X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vm.c;h=dd422c318df999e0b5d39b9b43ff044ed4a85e4e;hb=96e04ca726d8379bfc43bb2e0ce7a142c8e80dc2;hp=738028513c8bfd33bb9d580dce080e05f7a36f02;hpb=5a7f58ba22d1f437a859e54ef710cf475b5087a5;p=palacios-OLD.git diff --git a/linux_module/palacios-vm.c b/linux_module/palacios-vm.c index 7380285..dd422c3 100644 --- a/linux_module/palacios-vm.c +++ b/linux_module/palacios-vm.c @@ -35,6 +35,13 @@ #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" +#endif extern struct class * v3_class; #define STREAM_NAME_LEN 128 @@ -82,6 +89,40 @@ static long v3_vm_ioctl(struct file * filp, break; } + case V3_VM_HOST_DEV_CONNECT: { +#ifdef V3_CONFIG_HOST_DEV + 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: printk("\tUnhandled\n"); return -EINVAL; @@ -174,7 +215,7 @@ int start_palacios_vm(void * arg) { printk("palacios: launching vm\n"); -#if V3_CONFIG_EXT_INSPECTOR +#ifdef V3_CONFIG_EXT_INSPECTOR inspect_vm(guest); #endif