aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost/vhost.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-12-06 07:03:34 -0500
committerMichael S. Tsirkin <mst@redhat.com>2012-12-06 10:09:18 -0500
commit935cdee7ee159569b0aaa10bd9244660f6672b08 (patch)
tree366e06bee572c2578fcce51926a8ae25e04ce66d /drivers/vhost/vhost.c
parent4a7d6455b07845d92e025da222f11de519f90def (diff)
vhost: avoid backend flush on vring ops
vring changes already do a flush internally where appropriate, so we do not need a second flush. It's currently not very expensive but a follow-up patch makes flush more heavy-weight, so remove the extra flush here to avoid regressing performance if call or kick fds are changed on data path. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r--drivers/vhost/vhost.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 5a3d0f1eaf94..34389f75fe65 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -607,7 +607,7 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
607 return 0; 607 return 0;
608} 608}
609 609
610static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp) 610long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
611{ 611{
612 struct file *eventfp, *filep = NULL; 612 struct file *eventfp, *filep = NULL;
613 bool pollstart = false, pollstop = false; 613 bool pollstart = false, pollstop = false;
@@ -802,9 +802,8 @@ static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp)
802} 802}
803 803
804/* Caller must have device mutex */ 804/* Caller must have device mutex */
805long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, unsigned long arg) 805long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
806{ 806{
807 void __user *argp = (void __user *)arg;
808 struct file *eventfp, *filep = NULL; 807 struct file *eventfp, *filep = NULL;
809 struct eventfd_ctx *ctx = NULL; 808 struct eventfd_ctx *ctx = NULL;
810 u64 p; 809 u64 p;
@@ -875,7 +874,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, unsigned long arg)
875 fput(filep); 874 fput(filep);
876 break; 875 break;
877 default: 876 default:
878 r = vhost_set_vring(d, ioctl, argp); 877 r = -ENOIOCTLCMD;
879 break; 878 break;
880 } 879 }
881done: 880done: