search for: enoioctlcmd

Displaying 20 results from an estimated 210 matches for "enoioctlcmd".

2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...;mdev; + const struct virtio_mdev_device_ops *ops = mdev_get_vhost_ops(mdev); + + switch (m->virtio_id) { + case VIRTIO_ID_NET: + switch (cmd) { + case VHOST_MDEV_NET_CTRL: + if (!ops->net.ctrl) + return -ENOTSUPP; + return ops->net.ctrl(mdev, argp); + } + break; + } + + return -ENOIOCTLCMD; +} + static int vhost_mdev_open(void *device_data) { struct vhost_mdev *m = device_data; @@ -460,8 +490,11 @@ static long vhost_mdev_unlocked_ioctl(void *device_data, * VHOST_SET_LOG_FD are not used yet. */ r = vhost_dev_ioctl(&m->dev, cmd, argp); - if (r == -ENOIOCTLCMD) -...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...;mdev; + const struct virtio_mdev_device_ops *ops = mdev_get_vhost_ops(mdev); + + switch (m->virtio_id) { + case VIRTIO_ID_NET: + switch (cmd) { + case VHOST_MDEV_NET_CTRL: + if (!ops->net.ctrl) + return -ENOTSUPP; + return ops->net.ctrl(mdev, argp); + } + break; + } + + return -ENOIOCTLCMD; +} + static int vhost_mdev_open(void *device_data) { struct vhost_mdev *m = device_data; @@ -460,8 +490,11 @@ static long vhost_mdev_unlocked_ioctl(void *device_data, * VHOST_SET_LOG_FD are not used yet. */ r = vhost_dev_ioctl(&m->dev, cmd, argp); - if (r == -ENOIOCTLCMD) -...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...changed, 103 insertions(+), 4 deletions(-) > > Changes since v3: > - VHOST_SET_VRING_ENDIAN_LEGACY ioctl renamed to VHOST_SET_VRING_BIG_ENDIAN > - ioctl API is now: 0 for le, 1 for be, other values are EINVAL > - ioctl doesn't filter out modern devices > - ioctl stubs return ENOIOCTLCMD > - forbid endianness changes when vring is active > - logic now handled with vq->is_le and vq->user_be according to device > start/stop as suggested by Michael > > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig > index 017a1e8..0aec88c 100644 > --- a/drive...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...changed, 103 insertions(+), 4 deletions(-) > > Changes since v3: > - VHOST_SET_VRING_ENDIAN_LEGACY ioctl renamed to VHOST_SET_VRING_BIG_ENDIAN > - ioctl API is now: 0 for le, 1 for be, other values are EINVAL > - ioctl doesn't filter out modern devices > - ioctl stubs return ENOIOCTLCMD > - forbid endianness changes when vring is active > - logic now handled with vq->is_le and vq->user_be according to device > start/stop as suggested by Michael > > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig > index 017a1e8..0aec88c 100644 > --- a/drive...
2019 Dec 11
0
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...ed long)compat_ptr(arg)); case CHIOGSTATUS32: { struct changer_element_status32 ces32; @@ -898,8 +902,7 @@ static long ch_ioctl_compat(struct file * file, return ch_gstatus(ch, ces32.ces_type, data); } default: - // return scsi_ioctl_compat(ch->device, cmd, (void*)arg); - return -ENOIOCTLCMD; + return scsi_compat_ioctl(ch->device, cmd, compat_ptr(arg)); } } diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index cea625906440..5afb0046b12a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1465,13 +1465,12 @@ static int sd_getgeo(struct block_device *bdev, struct hd_ge...
2019 Dec 11
3
[PATCH 00/24] block, scsi: final compat_ioctl cleanup
Hi Jens, James and Martin, This series concludes the work I did for linux-5.5 on the compat_ioctl() cleanup, killing off fs/compat_ioctl.c and block/compat_ioctl.c by moving everything into drivers. Overall this would be a reduction both in complexity and line count, but as I'm also adding documentation the overall number of lines increases in the end. My plan was originally to keep the
2020 Jan 02
1
[PATCH v3 13/22] compat_ioctl: scsi: move ioctl handling into drivers
...ed long)compat_ptr(arg)); case CHIOGSTATUS32: { struct changer_element_status32 ces32; @@ -898,8 +902,7 @@ static long ch_ioctl_compat(struct file * file, return ch_gstatus(ch, ces32.ces_type, data); } default: - // return scsi_ioctl_compat(ch->device, cmd, (void*)arg); - return -ENOIOCTLCMD; + return scsi_compat_ioctl(ch->device, cmd, compat_ptr(arg)); } } diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index cea625906440..5afb0046b12a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1465,13 +1465,12 @@ static int sd_getgeo(struct block_device *bdev, struct hd_ge...
2019 Oct 29
0
[RFC] vhost_mdev: add network control vq support
...t_ops(mdev); > + > + switch (m->virtio_id) { > + case VIRTIO_ID_NET: > + switch (cmd) { > + case VHOST_MDEV_NET_CTRL: > + if (!ops->net.ctrl) > + return -ENOTSUPP; > + return ops->net.ctrl(mdev, argp); > + } > + break; > + } > + > + return -ENOIOCTLCMD; > +} As you comment above, then vhost-mdev need device specific stuffs. > + > static int vhost_mdev_open(void *device_data) > { > struct vhost_mdev *m = device_data; > @@ -460,8 +490,11 @@ static long vhost_mdev_unlocked_ioctl(void *device_data, > * VHOST_SET_LOG_F...
2015 Apr 10
0
[PATCH v4 7/8] vhost: feature to set the vring endianness
.../vhost.h | 9 +++++ 4 files changed, 103 insertions(+), 4 deletions(-) Changes since v3: - VHOST_SET_VRING_ENDIAN_LEGACY ioctl renamed to VHOST_SET_VRING_BIG_ENDIAN - ioctl API is now: 0 for le, 1 for be, other values are EINVAL - ioctl doesn't filter out modern devices - ioctl stubs return ENOIOCTLCMD - forbid endianness changes when vring is active - logic now handled with vq->is_le and vq->user_be according to device start/stop as suggested by Michael diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig index 017a1e8..0aec88c 100644 --- a/drivers/vhost/Kconfig +++ b/drivers/vhos...
2015 Apr 21
0
[PATCH v4 7/8] vhost: feature to set the vring endianness
...deletions(-) > > > > Changes since v3: > > - VHOST_SET_VRING_ENDIAN_LEGACY ioctl renamed to VHOST_SET_VRING_BIG_ENDIAN > > - ioctl API is now: 0 for le, 1 for be, other values are EINVAL > > - ioctl doesn't filter out modern devices > > - ioctl stubs return ENOIOCTLCMD > > - forbid endianness changes when vring is active > > - logic now handled with vq->is_le and vq->user_be according to device > > start/stop as suggested by Michael > > > > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig > > index 017a1e8..0...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...gt; > + case VIRTIO_ID_NET: > > + switch (cmd) { > > + case VHOST_MDEV_NET_CTRL: > > + if (!ops->net.ctrl) > > + return -ENOTSUPP; > > + return ops->net.ctrl(mdev, argp); > > + } > > + break; > > + } > > + > > + return -ENOIOCTLCMD; > > +} > > As you comment above, then vhost-mdev need device specific stuffs. Yeah. But this device specific stuff is quite small and simple. It's just to forward the settings between parent and userspace. But I totally agree it would be really great if we could avoid it in an el...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...gt; > + case VIRTIO_ID_NET: > > + switch (cmd) { > > + case VHOST_MDEV_NET_CTRL: > > + if (!ops->net.ctrl) > > + return -ENOTSUPP; > > + return ops->net.ctrl(mdev, argp); > > + } > > + break; > > + } > > + > > + return -ENOIOCTLCMD; > > +} > > As you comment above, then vhost-mdev need device specific stuffs. Yeah. But this device specific stuff is quite small and simple. It's just to forward the settings between parent and userspace. But I totally agree it would be really great if we could avoid it in an el...
2020 Apr 26
1
[PATCH 1/2] vdpa: Support config interrupt in vhost_vdpa
...vdpa, &cb); > + > + return 0; > +} > static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, > void __user *argp) > { > @@ -398,6 +447,9 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, > case VHOST_SET_LOG_FD: > r = -ENOIOCTLCMD; > break; > + case VHOST_VDPA_SET_CONFIG_CALL: > + r = vhost_vdpa_set_config_call(v, argp); > + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -734,6 +786,7 @@ static int vhost_vdpa_release(struct inode *in...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...vdpa, &cb); > + > + return 0; > +} > static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, > void __user *argp) > { > @@ -398,6 +441,9 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, > case VHOST_SET_LOG_FD: > r = -ENOIOCTLCMD; > break; > + case VHOST_VDPA_SET_CONFIG_CALL: > + r = vhost_vdpa_set_config_call(v, argp); > + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -734,6 +780,7 @@ static int vhost_vdpa_release(struct inode *in...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...vdpa, &cb); > + > + return 0; > +} > static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, > void __user *argp) > { > @@ -398,6 +441,9 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, > case VHOST_SET_LOG_FD: > r = -ENOIOCTLCMD; > break; > + case VHOST_VDPA_SET_CONFIG_CALL: > + r = vhost_vdpa_set_config_call(v, argp); > + break; > default: > r = vhost_dev_ioctl(&v->vdev, cmd, argp); > if (r == -ENOIOCTLCMD) > @@ -734,6 +780,7 @@ static int vhost_vdpa_release(struct inode *in...
2015 Apr 24
0
[PATCH v6 7/8] vhost: cross-endian support for legacy devices
...n, as + * expected by legacy virtio. + */ + vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be; +} +#else +static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq) +{ +} + +static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) +{ + return -ENOIOCTLCMD; +} + +static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, + int __user *argp) +{ + return -ENOIOCTLCMD; +} + +static void vhost_init_is_le(struct vhost_virtqueue *vq) +{ + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) + vq->is_le = true; +} +#endif /* CONFIG_VHOST_CR...
2015 Apr 23
0
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...s + * expected by legacy virtio. + */ + vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be; +} +#else +static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq) +{ + ; +} + +static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) +{ + return -ENOIOCTLCMD; +} + +static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, + int __user *argp) +{ + return -ENOIOCTLCMD; +} + +static void vhost_init_is_le(struct vhost_virtqueue *vq) +{ + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) + vq->is_le = true; +} +#endif /* CONFIG_VHOST_CR...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
..._set_vring_endian_legacy(struct vhost_virtqueue *vq, > + void __user *argp) > +{ > + return 0; > +} > + > +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq, > + u32 idx, > + void __user *argp) > +{ > + return 0; > +} Should be -ENOIOCTLCMD? > +#endif /* CONFIG_VHOST_SET_ENDIAN_LEGACY */ > + > long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > { > struct file *eventfp, *filep = NULL; > @@ -806,6 +855,12 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) >...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
..._set_vring_endian_legacy(struct vhost_virtqueue *vq, > + void __user *argp) > +{ > + return 0; > +} > + > +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq, > + u32 idx, > + void __user *argp) > +{ > + return 0; > +} Should be -ENOIOCTLCMD? > +#endif /* CONFIG_VHOST_SET_ENDIAN_LEGACY */ > + > long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > { > struct file *eventfp, *filep = NULL; > @@ -806,6 +855,12 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) >...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...> > > Changes since v3: > > > - VHOST_SET_VRING_ENDIAN_LEGACY ioctl renamed to VHOST_SET_VRING_BIG_ENDIAN > > > - ioctl API is now: 0 for le, 1 for be, other values are EINVAL > > > - ioctl doesn't filter out modern devices > > > - ioctl stubs return ENOIOCTLCMD > > > - forbid endianness changes when vring is active > > > - logic now handled with vq->is_le and vq->user_be according to device > > > start/stop as suggested by Michael > > > > > > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig &...