summaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-06 22:21:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-06 22:21:41 -0400
commit016c6f25d11af187f93324d5c591f5d6f63dfb75 (patch)
tree1aa7de88df37d876269aa80a45aa2a92f5752ae5 /drivers/vhost
parent3c0d551e02b2590fa71a1354f2f1994551a33315 (diff)
parentdc32bb678e103afbcfa4d814489af0566307f528 (diff)
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull fw_cfg, vhost updates from Michael Tsirkin: "This cleans up the qemu fw cfg device driver. On top of this, vmcore is dumped there on crash to help debugging with kASLR enabled. Also included are some fixes in vhost" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: add vsock compat ioctl vhost: fix vhost ioctl signature to build with clang fw_cfg: write vmcoreinfo details crash: export paddr_vmcoreinfo_note() fw_cfg: add DMA register fw_cfg: add a public uapi header fw_cfg: handle fw_cfg_read_blob() error fw_cfg: remove inline from fw_cfg_read_blob() fw_cfg: fix sparse warnings around FW_CFG_FILE_DIR read fw_cfg: fix sparse warning reading FW_CFG_ID fw_cfg: fix sparse warnings with fw_cfg_file fw_cfg: fix sparse warnings in fw_cfg_sel_endianness() ptr_ring: fix build
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vhost.c2
-rw-r--r--drivers/vhost/vhost.h4
-rw-r--r--drivers/vhost/vsock.c11
3 files changed, 14 insertions, 3 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 5320039671b7..bec722e41f58 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1334,7 +1334,7 @@ err:
1334 return -EFAULT; 1334 return -EFAULT;
1335} 1335}
1336 1336
1337long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) 1337long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
1338{ 1338{
1339 struct file *eventfp, *filep = NULL; 1339 struct file *eventfp, *filep = NULL;
1340 bool pollstart = false, pollstop = false; 1340 bool pollstart = false, pollstop = false;
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index ac4b6056f19a..d8ee85ae8fdc 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -45,7 +45,7 @@ void vhost_poll_stop(struct vhost_poll *poll);
45void vhost_poll_flush(struct vhost_poll *poll); 45void vhost_poll_flush(struct vhost_poll *poll);
46void vhost_poll_queue(struct vhost_poll *poll); 46void vhost_poll_queue(struct vhost_poll *poll);
47void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work); 47void vhost_work_flush(struct vhost_dev *dev, struct vhost_work *work);
48long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); 48long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp);
49 49
50struct vhost_log { 50struct vhost_log {
51 u64 addr; 51 u64 addr;
@@ -177,7 +177,7 @@ void vhost_dev_reset_owner(struct vhost_dev *, struct vhost_umem *);
177void vhost_dev_cleanup(struct vhost_dev *); 177void vhost_dev_cleanup(struct vhost_dev *);
178void vhost_dev_stop(struct vhost_dev *); 178void vhost_dev_stop(struct vhost_dev *);
179long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, void __user *argp); 179long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, void __user *argp);
180long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); 180long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp);
181int vhost_vq_access_ok(struct vhost_virtqueue *vq); 181int vhost_vq_access_ok(struct vhost_virtqueue *vq);
182int vhost_log_access_ok(struct vhost_dev *); 182int vhost_log_access_ok(struct vhost_dev *);
183 183
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index 0898dbdbf955..34bc3ab40c6d 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -699,12 +699,23 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
699 } 699 }
700} 700}
701 701
702#ifdef CONFIG_COMPAT
703static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
704 unsigned long arg)
705{
706 return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
707}
708#endif
709
702static const struct file_operations vhost_vsock_fops = { 710static const struct file_operations vhost_vsock_fops = {
703 .owner = THIS_MODULE, 711 .owner = THIS_MODULE,
704 .open = vhost_vsock_dev_open, 712 .open = vhost_vsock_dev_open,
705 .release = vhost_vsock_dev_release, 713 .release = vhost_vsock_dev_release,
706 .llseek = noop_llseek, 714 .llseek = noop_llseek,
707 .unlocked_ioctl = vhost_vsock_dev_ioctl, 715 .unlocked_ioctl = vhost_vsock_dev_ioctl,
716#ifdef CONFIG_COMPAT
717 .compat_ioctl = vhost_vsock_dev_compat_ioctl,
718#endif
708}; 719};
709 720
710static struct miscdevice vhost_vsock_misc = { 721static struct miscdevice vhost_vsock_misc = {