search for: vhost_file_unbind

Displaying 8 results from an estimated 8 matches for "vhost_file_unbind".

2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...dpa *v, u32 __user *argp) > +{ > + struct vdpa_callback cb; > + u32 fd; > + struct eventfd_ctx *ctx; > + > + cb.callback = vhost_vdpa_config_cb; > + cb.private = v->vdpa; > + if (copy_from_user(&fd, argp, sizeof(fd))) > + return -EFAULT; > + > + ctx = fd == VHOST_FILE_UNBIND ? NULL : eventfd_ctx_fdget(fd); > + swap(ctx, v->config_ctx); > + > + if (!IS_ERR_OR_NULL(ctx)) > + eventfd_ctx_put(ctx); > + > + if (IS_ERR(v->config_ctx)) > + return PTR_ERR(v->config_ctx); > + > + v->vdpa->config->set_config_cb(v->vdpa, &cb);...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...dpa *v, u32 __user *argp) > +{ > + struct vdpa_callback cb; > + u32 fd; > + struct eventfd_ctx *ctx; > + > + cb.callback = vhost_vdpa_config_cb; > + cb.private = v->vdpa; > + if (copy_from_user(&fd, argp, sizeof(fd))) > + return -EFAULT; > + > + ctx = fd == VHOST_FILE_UNBIND ? NULL : eventfd_ctx_fdget(fd); > + swap(ctx, v->config_ctx); > + > + if (!IS_ERR_OR_NULL(ctx)) > + eventfd_ctx_put(ctx); > + > + if (IS_ERR(v->config_ctx)) > + return PTR_ERR(v->config_ctx); > + > + v->vdpa->config->set_config_cb(v->vdpa, &cb);...
2020 Apr 26
1
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...t.h >>> index 1813821..8663139 100644 >>> --- a/drivers/vhost/vhost.h >>> +++ b/drivers/vhost/vhost.h >>> @@ -18,6 +18,8 @@ >>> ? typedef void (*vhost_work_fn_t)(struct vhost_work *work); >>> ? ? #define VHOST_WORK_QUEUED 1 >>> +#define VHOST_FILE_UNBIND -1 >> >> >> I think it's better to document this in uapi. > > > I meant e.g in vhost_vring_file, we had a comment of unbinding: > > struct vhost_vring_file { > ??? unsigned int index; > ??? int fd; /* Pass -1 to unbind from file. */ > > }; I think...
2020 Apr 26
0
[PATCH V3 1/2] vdpa: Support config interrupt in vhost_vdpa
...dpa *v, u32 __user *argp) > +{ > + struct vdpa_callback cb; > + int fd; > + struct eventfd_ctx *ctx; > + > + cb.callback = vhost_vdpa_config_cb; > + cb.private = v->vdpa; > + if (copy_from_user(&fd, argp, sizeof(fd))) > + return -EFAULT; > + > + ctx = fd == VHOST_FILE_UNBIND ? NULL : eventfd_ctx_fdget(fd); > + swap(ctx, v->config_ctx); > + > + if (!IS_ERR_OR_NULL(ctx)) > + eventfd_ctx_put(ctx); > + > + if (IS_ERR(v->config_ctx)) > + return PTR_ERR(v->config_ctx); > + > + v->vdpa->config->set_config_cb(v->vdpa, &cb);...
2020 Apr 27
0
[PATCH V4 0/3] vdpa: Support config interrupt in vhost_vdpa
...han wrote: > This series includes two patches, one introduced > config interrupt support in VDPA core, the other > one implemented config interrupt in IFCVF. > > changes from V3: > move changes in driver/vhost/vhost.c to a > separated patch. > > changes from V2: > move VHOST_FILE_UNBIND to the uapi header. > > changes from V1: > vdpa: more efficient code to handle eventfd unbind. > ifcvf: add VIRTIO_NET_F_STATUS feature bit. 5.8 material I think. Acked-by: Jason Wang <jasowang at redhat.com> > > Zhu Lingshan (3): > vdpa: Support config interrupt...
2020 Apr 26
0
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...vhost.h b/drivers/vhost/vhost.h >> index 1813821..8663139 100644 >> --- a/drivers/vhost/vhost.h >> +++ b/drivers/vhost/vhost.h >> @@ -18,6 +18,8 @@ >> ? typedef void (*vhost_work_fn_t)(struct vhost_work *work); >> ? ? #define VHOST_WORK_QUEUED 1 >> +#define VHOST_FILE_UNBIND -1 > > > I think it's better to document this in uapi. I meant e.g in vhost_vring_file, we had a comment of unbinding: struct vhost_vring_file { ??? unsigned int index; ??? int fd; /* Pass -1 to unbind from file. */ }; Thanks
2020 Jun 10
2
[GIT PULL] virtio: features, fixes
...x up after API change Samuel Zou (1): vdpasim: Fix some coccinelle warnings Zhu Lingshan (5): ifcvf: move IRQ request/free to status change handlers ifcvf: ignore continuous setting same status value vhost_vdpa: Support config interrupt in vdpa vhost: replace -1 with VHOST_FILE_UNBIND in ioctls ifcvf: implement config interrupt in IFCVF MAINTAINERS | 18 +- drivers/acpi/numa/srat.c | 1 + drivers/crypto/virtio/virtio_crypto_algs.c | 21 +- drivers/misc/mic/Kconfig | 2 +- drivers/net/caif/Kconfi...
2020 Apr 26
1
[PATCH 1/2] vdpa: Support config interrupt in vhost_vdpa
On 2020/4/24 ??6:04, Zhu Lingshan wrote: > This commit implements config interrupt support in > vhost_vdpa layer. > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> One should be sufficient. > --- > drivers/vhost/vdpa.c | 53 ++++++++++++++++++++++++++++++++++++++++ >