X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-host-dev.c;h=cfcf4c09b1e101997fafcfa68e93aa3b46fe649d;hb=fd1de839d257d3ed2f0a8f27d231432b166b2cc1;hp=c7c2567dff58f26451335fc85698a8d4c4b5cba6;hpb=59a2f6308c5077481e184c4cb5792c082cf2ca3a;p=palacios.git diff --git a/linux_module/iface-host-dev.c b/linux_module/iface-host-dev.c index c7c2567..cfcf4c0 100644 --- a/linux_module/iface-host-dev.c +++ b/linux_module/iface-host-dev.c @@ -342,7 +342,7 @@ static int host_dev_release(struct inode * i, struct file * filp) return 0; } -static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, unsigned long arg) +static long host_dev_ioctl(struct file * fp, unsigned int val, unsigned long arg) { void __user *argp = (void __user *)arg; @@ -379,8 +379,8 @@ static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, u return -EFAULT; } - if (v3_host_dev_read_guest_mem(dev->guestdev, - dev, + if (v3_host_dev_read_guest_mem(dev, + dev->guestdev, op.gpa, temp, op.len) != op.len) { @@ -420,8 +420,8 @@ static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, u return -EFAULT; } - if (v3_host_dev_write_guest_mem(dev->guestdev, - dev, + if (v3_host_dev_write_guest_mem(dev, + dev->guestdev, op.gpa, temp, op.len) != op.len) { @@ -440,7 +440,7 @@ static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, u DEEP_DEBUG_PRINT("palacios: hostdev: irq guest\n"); - return v3_host_dev_raise_irq(dev->guestdev, dev, op.irq); + return v3_host_dev_raise_irq(dev, dev->guestdev, op.irq); } break; @@ -595,19 +595,11 @@ static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, u } -static long host_dev_compat_ioctl(struct file * filp, unsigned int ioctl, unsigned long arg) -{ - return host_dev_ioctl(NULL, filp, ioctl, arg); -} - static struct file_operations host_dev_fops = { .poll = host_dev_poll, .release = host_dev_release, -#ifdef HAVE_COMPAT_IOCTL - .compat_ioctl = host_dev_compat_ioctl, -#else - .ioctl = host_dev_ioctl, -#endif + .compat_ioctl = host_dev_ioctl, + .unlocked_ioctl = host_dev_ioctl, };