search for: vhost_set_log_fd

Displaying 20 results from an estimated 50 matches for "vhost_set_log_fd".

2018 Feb 08
0
[PULL] virtio, vhost: fixes, cleanups, features
...82018e9edb68e8ff: Linux 4.15 (2018-01-28 13:20:33 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to d25cc43c6775bff6b8e3dad97c747954b805e421: vhost: don't hold onto file pointer for VHOST_SET_LOG_FD (2018-02-01 16:26:47 +0200) ---------------------------------------------------------------- virtio, vhost: fixes, cleanups, features This includes the disk/cache memory stats for for the virtio balloon, as well as multiple fixes and cleanups. Signed-off-by: Michael S. Tsirkin <mst at redhat....
2019 Nov 07
1
[PATCH v5] vhost: introduce mdev based hardware backend
On 2019/11/6 ??10:49, Tiwei Bie wrote: >>>>>> + default: >>>>>> + /* >>>>>> + * VHOST_SET_MEM_TABLE, VHOST_SET_LOG_BASE, and >>>>>> + * VHOST_SET_LOG_FD are not used yet. >>>>>> + */ >>>>> If we don't even use them, there's probably no need to call >>>>> vhost_dev_ioctl(). This may help to avoid confusion when we want to develop >>>>> new API for e.g dirty page tracking. >&...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...->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) - r = vhost_mdev_vring_ioctl(m, cmd, argp); + if (r == -ENOIOCTLCMD) { + r = vhost_mdev_dev_ioctl(m, cmd, argp); + if (r == -ENOIOCTLCMD) + r = vhost_mdev_vring_ioctl(m, cmd, argp); + }...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...->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) - r = vhost_mdev_vring_ioctl(m, cmd, argp); + if (r == -ENOIOCTLCMD) { + r = vhost_mdev_dev_ioctl(m, cmd, argp); + if (r == -ENOIOCTLCMD) + r = vhost_mdev_vring_ioctl(m, cmd, argp); + }...
2020 Apr 26
1
[PATCH 1/2] vdpa: Support config interrupt in vhost_vdpa
...;config->set_config_cb(v->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_vd...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...;config->set_config_cb(v->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_vd...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...;config->set_config_cb(v->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_vd...
2018 Feb 15
0
[PULL] virtio: cleanups and fixes
The following changes since commit d25cc43c6775bff6b8e3dad97c747954b805e421: vhost: don't hold onto file pointer for VHOST_SET_LOG_FD (2018-02-01 16:26:47 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to fa08a3b4eba59429cf7e241a7af089103e79160f: virtio/s390: implement PM operations for virtio_ccw (2018-02-14 14:34:09 +0...
2020 Apr 26
0
[PATCH V3 1/2] vdpa: Support config interrupt in vhost_vdpa
...;config->set_config_cb(v->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_vd...
2019 Oct 29
0
[RFC] vhost_mdev: add network control vq support
...rn -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_FD are not used yet. > */ > r = vhost_dev_ioctl(&m->dev, cmd, argp); > - if (r == -ENOIOCTLCMD) > - r = vhost_mdev_vring_ioctl(m, cmd, argp); > + if (r == -ENOIOCTLCMD) { > + r = vhost_mdev_dev_ioctl(m, cmd, argp); > + if (r == -ENOIOCTLCMD) > + r = vho...
2009 Dec 20
0
[PATCH 1/3] vhost: prevent modification of an active ring
...backend? + * You don't want to do that. */ + if (vq->private_data && (vq->log_used || + vhost_has_feature(d, VHOST_F_LOG_ALL))) + r = -EBUSY; + else + vq->log_base = (void __user *)(unsigned long)p; + mutex_unlock(&vq->mutex); } break; case VHOST_SET_LOG_FD: @@ -483,7 +503,6 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, unsigned long arg) break; } done: - mutex_unlock(&d->mutex); return r; } -- 1.6.6.rc1.43.gf55cc
2009 Dec 20
0
[PATCH 1/3] vhost: prevent modification of an active ring
...backend? + * You don't want to do that. */ + if (vq->private_data && (vq->log_used || + vhost_has_feature(d, VHOST_F_LOG_ALL))) + r = -EBUSY; + else + vq->log_base = (void __user *)(unsigned long)p; + mutex_unlock(&vq->mutex); } break; case VHOST_SET_LOG_FD: @@ -483,7 +503,6 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, unsigned long arg) break; } done: - mutex_unlock(&d->mutex); return r; } -- 1.6.6.rc1.43.gf55cc
2019 Nov 07
2
[PATCH v6] vhost: introduce mdev based hardware backend
...fd with the device name. After getting the device fd, userspace can use vhost ioctls on top of it to setup the backend. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- This patch depends on below series: https://lkml.org/lkml/2019/11/6/538 v5 -> v6: - Filter out VHOST_SET_LOG_BASE/VHOST_SET_LOG_FD (Jason); - Simplify len/off check (Jason); - Address checkpatch warnings, some of them are ignored to keep the coding style consistent with existing ones; v4 -> v5: - Rebase on top of virtio-mdev series v8; - Use the virtio_ops of mdev_device in vhost-mdev (Jason); - Some minor improvements o...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...really great if we could avoid it in an elegant way. > > > > + > > 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) > > - r = vhost_mdev_vring_ioctl(m, cmd, argp); > > + if (r == -ENOIOCTLCMD) { > > + r = vhost_mdev_dev_ioctl(m, cmd, argp); > > + if (r...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...really great if we could avoid it in an elegant way. > > > > + > > 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) > > - r = vhost_mdev_vring_ioctl(m, cmd, argp); > > + if (r == -ENOIOCTLCMD) { > > + r = vhost_mdev_dev_ioctl(m, cmd, argp); > > + if (r...
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...ux/vhost.h b/include/uapi/linux/vhost.h index 92e1b700b51c..7329e7f349dd 100644 --- a/include/uapi/linux/vhost.h +++ b/include/uapi/linux/vhost.h @@ -45,6 +45,23 @@ #define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, __u64) /* Specify an eventfd file descriptor to signal on log write. */ #define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int) +/* By default, a device gets one vhost_worker that its virtqueues share. This + * command allows the owner of the device to create an additional vhost_worker + * for the device. It can later be bound to 1 or more of its virtqueues using + * the VHOST_ATTACH_VRING_WORK...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...gt;>> + break; >>>> + case VHOST_MDEV_GET_VRING_NUM: >>>> + r = vhost_mdev_get_vring_num(m, argp); >>>> + break; >>>> + default: >>>> + /* >>>> + * VHOST_SET_MEM_TABLE, VHOST_SET_LOG_BASE, and >>>> + * VHOST_SET_LOG_FD are not used yet. >>>> + */ >>> >>> If we don't even use them, there's probably no need to call >>> vhost_dev_ioctl(). This may help to avoid confusion when we want to develop >>> new API for e.g dirty page tracking. >> Good point. It&...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...gt;>> + break; >>>> + case VHOST_MDEV_GET_VRING_NUM: >>>> + r = vhost_mdev_get_vring_num(m, argp); >>>> + break; >>>> + default: >>>> + /* >>>> + * VHOST_SET_MEM_TABLE, VHOST_SET_LOG_BASE, and >>>> + * VHOST_SET_LOG_FD are not used yet. >>>> + */ >>> >>> If we don't even use them, there's probably no need to call >>> vhost_dev_ioctl(). This may help to avoid confusion when we want to develop >>> new API for e.g dirty page tracking. >> Good point. It&...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...); > > + break; > > + case VHOST_SET_FEATURES: > > + r = vhost_vdpa_set_features(v, argp); > > + break; > > + case VHOST_VDPA_GET_VRING_NUM: > > + r = vhost_vdpa_get_vring_num(v, argp); > > + break; > > + case VHOST_SET_LOG_BASE: > > + case VHOST_SET_LOG_FD: > > + r = -ENOIOCTLCMD; > > + break; > > + default: > > + mutex_lock(&v->vdev.mutex); > > + r = vhost_dev_ioctl(&v->vdev, cmd, argp); > > + if (r == -ENOIOCTLCMD) > > + r = vhost_vdpa_vring_ioctl(v, cmd, argp); > > + mutex_unloc...
2019 Oct 29
2
[PATCH v3] vhost: introduce mdev based hardware backend
...T_FEATURES: + r = vhost_mdev_get_features(m, argp); + break; + case VHOST_SET_FEATURES: + r = vhost_mdev_set_features(m, argp); + break; + case VHOST_MDEV_GET_VRING_NUM: + r = vhost_mdev_get_vring_num(m, argp); + break; + default: + /* + * VHOST_SET_MEM_TABLE, VHOST_SET_LOG_BASE, and + * VHOST_SET_LOG_FD are not used yet. + */ + r = vhost_dev_ioctl(&m->dev, cmd, argp); + if (r == -ENOIOCTLCMD) + r = vhost_mdev_vring_ioctl(m, cmd, argp); + } + + mutex_unlock(&m->mutex); + return r; +} + +static const struct vfio_device_ops vfio_vhost_mdev_dev_ops = { + .name = "vfio-vhost-m...