return 0;
}
-
static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, unsigned long arg)
{
void __user *argp = (void __user *)arg;
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) {
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) {
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;
}
-
-
+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,
- .ioctl = host_dev_ioctl,
+#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = host_dev_compat_ioctl,
+#else
+ .ioctl = host_dev_ioctl,
+#endif
};