search for: vhost_attach_vring_work

Displaying 4 results from an estimated 4 matches for "vhost_attach_vring_work".

2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...vq; + struct vhost_vring_worker w; struct vhost_vring_state s; struct vhost_vring_file f; u32 idx; @@ -1723,7 +1852,16 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg if (copy_to_user(argp, &s, sizeof(s))) r = -EFAULT; break; - default: + case VHOST_ATTACH_VRING_WORKER: + if (copy_from_user(&w, argp, sizeof(w))) { + r = -EFAULT; + break; + } + r = vhost_vq_attach_worker(vq, &w); + if (!r && copy_to_user(argp, &w, sizeof(w))) + r = -EFAULT; + break; +default: r = -ENOIOCTLCMD; } @@ -1776,6 +1914,7 @@ EXPORT_SYMBOL_GPL(vhost_...
2023 Apr 12
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...HOST_SET_VRING_WORKER _IOWR(VHOST_VIRTIO, 0x15, struct vhost_vring_worker) > > The VHOST_SET_VRING_WORKER created a worker on the virtqueue in the > vhost_vring_worker. > > > >>>> > >>>>>> - default: > >>>>>> + case VHOST_ATTACH_VRING_WORKER: > >>>>>> + if (copy_from_user(&w, argp, sizeof(w))) { > >>>>>> + r = -EFAULT; > >>>>>> + break; > >>>>>> + } > >>>>>&g...
2023 Apr 10
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...workder_id is the one userspace gets from VHOST_NEW_WORKER. If yes, we should hide the default worker. > > > Should we hide the default worker from xa? > > I can change it if you are worried about future problems. > > > >> - default: > >> + case VHOST_ATTACH_VRING_WORKER: > >> + if (copy_from_user(&w, argp, sizeof(w))) { > >> + r = -EFAULT; > >> + break; > >> + } > >> + r = vhost_vq_attach_worker(vq, &w); > >> +...
2023 Mar 28
12
[PATCH v6 00/11] vhost: multiple worker support
The following patches were built over linux-next which contains various vhost patches in mst's tree and the vhost_task patchset in Christian Brauner's tree: git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git kernel.user_worker branch: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=kernel.user_worker The latter patchset handles the review comment