X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-host-dev.c;h=cfcf4c09b1e101997fafcfa68e93aa3b46fe649d;hb=002d46c777ac52048d0a3e82c80821ad3c8fef46;hp=6744d66d15f95557c4a0ea1e5049471b689f861f;hpb=276cfa264720edddc1677e35c6a300596965de7d;p=palacios.git diff --git a/linux_module/iface-host-dev.c b/linux_module/iface-host-dev.c index 6744d66..cfcf4c0 100644 --- a/linux_module/iface-host-dev.c +++ b/linux_module/iface-host-dev.c @@ -342,8 +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; @@ -380,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) { @@ -421,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) { @@ -441,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; @@ -596,13 +595,11 @@ static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, u } - - - static struct file_operations host_dev_fops = { .poll = host_dev_poll, .release = host_dev_release, - .ioctl = host_dev_ioctl, + .compat_ioctl = host_dev_ioctl, + .unlocked_ioctl = host_dev_ioctl, }; @@ -789,9 +786,9 @@ static v3_host_dev_t palacios_host_dev_open_deferred(char *url, strncpy(dev->url,url,MAX_URL); - dev->guestdev=gdev; + dev->guestdev = gdev; - dev->guest=guest; + dev->guest = guest; spin_lock_init(&(dev->lock));