search for: eventfd_ctx

Displaying 20 results from an estimated 213 matches for "eventfd_ctx".

2020 Aug 04
3
[PATCH V5 1/6] vhost: introduce vhost_vring_call
On 2020/8/4 ??4:42, Zhu, Lingshan wrote: > > > On 8/4/2020 4:38 PM, Jason Wang wrote: >> >> On 2020/7/31 ??2:55, Zhu Lingshan wrote: >>> This commit introduces struct vhost_vring_call which replaced >>> raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. >>> Besides eventfd_ctx, it contains a spin lock and an >>> irq_bypass_producer in its structure. >>> >>> Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> >>> Suggested-by: Jason Wang <jasowang at redh...
2020 Aug 04
3
[PATCH V5 1/6] vhost: introduce vhost_vring_call
On 2020/8/4 ??4:42, Zhu, Lingshan wrote: > > > On 8/4/2020 4:38 PM, Jason Wang wrote: >> >> On 2020/7/31 ??2:55, Zhu Lingshan wrote: >>> This commit introduces struct vhost_vring_call which replaced >>> raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. >>> Besides eventfd_ctx, it contains a spin lock and an >>> irq_bypass_producer in its structure. >>> >>> Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> >>> Suggested-by: Jason Wang <jasowang at redh...
2020 Jul 17
0
[PATCH V2 1/6] vhost: introduce vhost_call_ctx
On 2020/7/16 ??7:23, Zhu Lingshan wrote: > This commit introduces struct vhost_call_ctx which replaced > raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. > Besides eventfd_ctx, it contains a spin lock and an > irq_bypass_producer in its structure. > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > Suggested-by: Jason Wang <jasowang at redhat.com> > --- > drivers/vhost...
2020 Aug 04
0
[PATCH V5 1/6] vhost: introduce vhost_vring_call
...t; On 2020/8/4 ??4:42, Zhu, Lingshan wrote: > > > > > > On 8/4/2020 4:38 PM, Jason Wang wrote: > > > > > > On 2020/7/31 ??2:55, Zhu Lingshan wrote: > > > > This commit introduces struct vhost_vring_call which replaced > > > > raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. > > > > Besides eventfd_ctx, it contains a spin lock and an > > > > irq_bypass_producer in its structure. > > > > > > > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > > > > Suggested...
2020 Aug 04
0
[PATCH V5 1/6] vhost: introduce vhost_vring_call
On 2020/7/31 ??2:55, Zhu Lingshan wrote: > This commit introduces struct vhost_vring_call which replaced > raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. > Besides eventfd_ctx, it contains a spin lock and an > irq_bypass_producer in its structure. > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > Suggested-by: Jason Wang <jasowang at redhat.com> > --- > drivers/vhost...
2020 Jul 22
0
[PATCH V3 1/6] vhost: introduce vhost_vring_call
Please ignore this patchset incorrect metadata, will resend soon. Thanks! On 7/22/2020 5:49 PM, Zhu Lingshan wrote: > From: Zhu Lingshan <lingshan.zhu at intel.com> > > This commit introduces struct vhost_vring_call which replaced > raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. > Besides eventfd_ctx, it contains a spin lock and an > irq_bypass_producer in its structure. > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > Signed-off-by: lszhu <lszhu at localhost.localdomain> > Signed-off-by: Zhu L...
2020 Aug 05
2
[PATCH V5 1/6] vhost: introduce vhost_vring_call
On 2020/8/4 ??5:21, Michael S. Tsirkin wrote: >>>>> ? +struct vhost_vring_call { >>>>> +??? struct eventfd_ctx *ctx; >>>>> +??? struct irq_bypass_producer producer; >>>>> +??? spinlock_t ctx_lock; >>>> It's not clear to me why we need ctx_lock here. >>>> >>>> Thanks >>> Hi Jason, >>> >>> we use this lock to prot...
2020 Aug 05
2
[PATCH V5 1/6] vhost: introduce vhost_vring_call
On 2020/8/4 ??5:21, Michael S. Tsirkin wrote: >>>>> ? +struct vhost_vring_call { >>>>> +??? struct eventfd_ctx *ctx; >>>>> +??? struct irq_bypass_producer producer; >>>>> +??? spinlock_t ctx_lock; >>>> It's not clear to me why we need ctx_lock here. >>>> >>>> Thanks >>> Hi Jason, >>> >>> we use this lock to prot...
2015 Dec 31
4
[PATCH RFC] vhost: basic device IOTLB support
...tion); + for (i = 0; i < VHOST_IOTLB_SIZE; i++) + dev->iotlb[i].flags.valid = VHOST_IOTLB_INVALID; } EXPORT_SYMBOL_GPL(vhost_dev_init); @@ -940,9 +956,10 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) { struct file *eventfp, *filep = NULL; struct eventfd_ctx *ctx = NULL; + struct vhost_iotlb_entry entry; u64 p; long r; - int i, fd; + int index, i, fd; /* If you are not the owner, you can become one */ if (ioctl == VHOST_SET_OWNER) { @@ -1008,6 +1025,80 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) if (...
2015 Dec 31
4
[PATCH RFC] vhost: basic device IOTLB support
...tion); + for (i = 0; i < VHOST_IOTLB_SIZE; i++) + dev->iotlb[i].flags.valid = VHOST_IOTLB_INVALID; } EXPORT_SYMBOL_GPL(vhost_dev_init); @@ -940,9 +956,10 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) { struct file *eventfp, *filep = NULL; struct eventfd_ctx *ctx = NULL; + struct vhost_iotlb_entry entry; u64 p; long r; - int i, fd; + int index, i, fd; /* If you are not the owner, you can become one */ if (ioctl == VHOST_SET_OWNER) { @@ -1008,6 +1025,80 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) if (...
2020 Apr 26
1
[PATCH 1/2] vdpa: Support config interrupt in vhost_vdpa
...ospec.h> > #include <linux/vhost.h> > #include <linux/virtio_net.h> > +#include <linux/kernel.h> > > #include "vhost.h" > > @@ -70,6 +71,7 @@ struct vhost_vdpa { > int nvqs; > int virtio_id; > int minor; > + struct eventfd_ctx *config_ctx; > }; > > static DEFINE_IDA(vhost_vdpa_ida); > @@ -101,6 +103,17 @@ static irqreturn_t vhost_vdpa_virtqueue_cb(void *private) > return IRQ_HANDLED; > } > > +static irqreturn_t vhost_vdpa_config_cb(void *private) > +{ > + struct vhost_vdpa *v...
2015 Dec 31
0
[PATCH RFC] vhost: basic device IOTLB support
...SIZE; i++) > + dev->iotlb[i].flags.valid = VHOST_IOTLB_INVALID; > } > EXPORT_SYMBOL_GPL(vhost_dev_init); > > @@ -940,9 +956,10 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) > { > struct file *eventfp, *filep = NULL; > struct eventfd_ctx *ctx = NULL; > + struct vhost_iotlb_entry entry; > u64 p; > long r; > - int i, fd; > + int index, i, fd; > > /* If you are not the owner, you can become one */ > if (ioctl == VHOST_SET_OWNER) { > @@ -1008,6 +1025,80 @@ long vhost_dev_ioctl(struct vhost_dev *d, u...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...ospec.h> > #include <linux/vhost.h> > #include <linux/virtio_net.h> > +#include <linux/kernel.h> > > #include "vhost.h" > > @@ -70,6 +71,7 @@ struct vhost_vdpa { > int nvqs; > int virtio_id; > int minor; > + struct eventfd_ctx *config_ctx; > }; > > static DEFINE_IDA(vhost_vdpa_ida); > @@ -101,6 +103,17 @@ static irqreturn_t vhost_vdpa_virtqueue_cb(void *private) > return IRQ_HANDLED; > } > > +static irqreturn_t vhost_vdpa_config_cb(void *private) > +{ > + struct vhost_vdpa *v...
2020 Apr 26
3
[PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa
...ospec.h> > #include <linux/vhost.h> > #include <linux/virtio_net.h> > +#include <linux/kernel.h> > > #include "vhost.h" > > @@ -70,6 +71,7 @@ struct vhost_vdpa { > int nvqs; > int virtio_id; > int minor; > + struct eventfd_ctx *config_ctx; > }; > > static DEFINE_IDA(vhost_vdpa_ida); > @@ -101,6 +103,17 @@ static irqreturn_t vhost_vdpa_virtqueue_cb(void *private) > return IRQ_HANDLED; > } > > +static irqreturn_t vhost_vdpa_config_cb(void *private) > +{ > + struct vhost_vdpa *v...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...ring of buffers. */ - struct mutex mutex; - unsigned int num; - struct vring_desc __user *desc; - struct vring_avail __user *avail; - struct vring_used __user *used; - const struct vhost_umem_node *meta_iotlb[VHOST_NUM_ADDRS]; - struct file *kick; - struct file *call; - struct file *error; - struct eventfd_ctx *call_ctx; - struct eventfd_ctx *error_ctx; - struct eventfd_ctx *log_ctx; - - struct vhost_poll poll; - - /* The routine to call when the Guest pings us, or timeout. */ - vhost_work_fn_t handle_kick; - - /* Last available index we saw. */ - u16 last_avail_idx; - - /* Caches available index value f...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...ring of buffers. */ - struct mutex mutex; - unsigned int num; - struct vring_desc __user *desc; - struct vring_avail __user *avail; - struct vring_used __user *used; - const struct vhost_umem_node *meta_iotlb[VHOST_NUM_ADDRS]; - struct file *kick; - struct file *call; - struct file *error; - struct eventfd_ctx *call_ctx; - struct eventfd_ctx *error_ctx; - struct eventfd_ctx *log_ctx; - - struct vhost_poll poll; - - /* The routine to call when the Guest pings us, or timeout. */ - vhost_work_fn_t handle_kick; - - /* Last available index we saw. */ - u16 last_avail_idx; - - /* Caches available index value f...
2017 Mar 10
0
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...; - unsigned int num; > - struct vring_desc __user *desc; > - struct vring_avail __user *avail; > - struct vring_used __user *used; > - const struct vhost_umem_node *meta_iotlb[VHOST_NUM_ADDRS]; > - struct file *kick; > - struct file *call; > - struct file *error; > - struct eventfd_ctx *call_ctx; > - struct eventfd_ctx *error_ctx; > - struct eventfd_ctx *log_ctx; > - > - struct vhost_poll poll; > - > - /* The routine to call when the Guest pings us, or timeout. */ > - vhost_work_fn_t handle_kick; > - > - /* Last available index we saw. */ > - u16 las...
2020 Apr 26
0
[PATCH V3 1/2] vdpa: Support config interrupt in vhost_vdpa
...ospec.h> > #include <linux/vhost.h> > #include <linux/virtio_net.h> > +#include <linux/kernel.h> > > #include "vhost.h" > > @@ -70,6 +71,7 @@ struct vhost_vdpa { > int nvqs; > int virtio_id; > int minor; > + struct eventfd_ctx *config_ctx; > }; > > static DEFINE_IDA(vhost_vdpa_ida); > @@ -101,6 +103,17 @@ static irqreturn_t vhost_vdpa_virtqueue_cb(void *private) > return IRQ_HANDLED; > } > > +static irqreturn_t vhost_vdpa_config_cb(void *private) > +{ > + struct vhost_vdpa *v...
2023 Mar 16
1
[PATCH v3 08/11] vdpa: Add eventfd for the vdpa callback
...driver must guarantee that signaling it is functional equivalent to triggering the callback. When set, vDPA parent can signal it directly instead of triggering the callback. > */ > struct vdpa_callback { > irqreturn_t (*callback)(void *data); > void *private; > + struct eventfd_ctx *irq_ctx; There's no IRQ concept at the virtual vDPA bus level, so it's probably better to rename it as "trigger". Btw, should we select EVENTFD for vDPA? Thanks > }; > > /**
2016 Mar 25
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...+ eventfp = f.fd == -1 ? NULL : eventfd_fget(f.fd); + if (IS_ERR(eventfp)) { + r = PTR_ERR(eventfp); + break; + } + if (eventfp != vq->iotlb_call) { + filep = vq->iotlb_call; + ctx = vq->iotlb_call_ctx; + vq->iotlb_call = eventfp; + vq->iotlb_call_ctx = eventfp ? + eventfd_ctx_fileget(eventfp) : NULL; + } else + filep = eventfp; + break; case VHOST_SET_VRING_CALL: if (copy_from_user(&f, argp, sizeof f)) { r = -EFAULT; @@ -977,11 +1067,55 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) } EXPORT_SYMBOL_GPL(vhost_vring_ioctl);...