search for: log_ctx

Displaying 20 results from an estimated 220 matches for "log_ctx".

2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...used = &vq->used->flags; > - log_write(vq->log_base, vq->log_addr + > - (used - (void __user *)vq->used), > - sizeof vq->used->flags); > + log_used(vq, (used - (void __user *)vq->used), > + sizeof vq->used->flags); > if (vq->log_ctx) > eventfd_signal(vq->log_ctx, 1); > } > @@ -1789,9 +1844,8 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) > smp_wmb(); > /* Log avail event write */ > used = vhost_avail_event(vq); > - log_write(vq->log_base, vq->lo...
2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...used = &vq->used->flags; > - log_write(vq->log_base, vq->log_addr + > - (used - (void __user *)vq->used), > - sizeof vq->used->flags); > + log_used(vq, (used - (void __user *)vq->used), > + sizeof vq->used->flags); > if (vq->log_ctx) > eventfd_signal(vq->log_ctx, 1); > } > @@ -1789,9 +1844,8 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) > smp_wmb(); > /* Log avail event write */ > used = vhost_avail_event(vq); > - log_write(vq->log_base, vq->lo...
2018 Dec 10
0
[PATCH net 4/4] vhost: log dirty page correctly
.../* Log used flag write. */ used = &vq->used->flags; - log_write(vq->log_base, vq->log_addr + - (used - (void __user *)vq->used), - sizeof vq->used->flags); + log_used(vq, (used - (void __user *)vq->used), + sizeof vq->used->flags); if (vq->log_ctx) eventfd_signal(vq->log_ctx, 1); } @@ -1789,9 +1843,8 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) smp_wmb(); /* Log avail event write */ used = vhost_avail_event(vq); - log_write(vq->log_base, vq->log_addr + - (used - (void __user...
2018 Dec 12
0
[PATCH net V2 4/4] vhost: log dirty page correctly
.../* Log used flag write. */ used = &vq->used->flags; - log_write(vq->log_base, vq->log_addr + - (used - (void __user *)vq->used), - sizeof vq->used->flags); + log_used(vq, (used - (void __user *)vq->used), + sizeof vq->used->flags); if (vq->log_ctx) eventfd_signal(vq->log_ctx, 1); } @@ -1789,9 +1844,8 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) smp_wmb(); /* Log avail event write */ used = vhost_avail_event(vq); - log_write(vq->log_base, vq->log_addr + - (used - (void __user...
2018 Dec 13
0
[PATCH net V2 4/4] vhost: log dirty page correctly
...ed->flags; >> - log_write(vq->log_base, vq->log_addr + >> - (used - (void __user *)vq->used), >> - sizeof vq->used->flags); >> + log_used(vq, (used - (void __user *)vq->used), >> + sizeof vq->used->flags); >> if (vq->log_ctx) >> eventfd_signal(vq->log_ctx, 1); >> } >> @@ -1789,9 +1844,8 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) >> smp_wmb(); >> /* Log avail event write */ >> used = vhost_avail_event(vq); >> - log...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...d to increment used idx"); > + return -EFAULT; > + } > + if (unlikely(vq->log_used)) { > + /* Log used index update. */ > + log_write(vq->log_base, > + vq->log_addr + offsetof(struct vring_used, idx), > + sizeof(vq->used->idx)); > + if (vq->log_ctx) > + eventfd_signal(vq->log_ctx, 1); > + } > + return 0; > +} > +EXPORT_SYMBOL_GPL(vhost_add_used_idx); > + > static int __vhost_add_used_n(struct vhost_virtqueue *vq, > struct vring_used_elem *heads, > unsigned count) > diff --git a/drivers/vhost...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...d to increment used idx"); > + return -EFAULT; > + } > + if (unlikely(vq->log_used)) { > + /* Log used index update. */ > + log_write(vq->log_base, > + vq->log_addr + offsetof(struct vring_used, idx), > + sizeof(vq->used->idx)); > + if (vq->log_ctx) > + eventfd_signal(vq->log_ctx, 1); > + } > + return 0; > +} > +EXPORT_SYMBOL_GPL(vhost_add_used_idx); > + > static int __vhost_add_used_n(struct vhost_virtqueue *vq, > struct vring_used_elem *heads, > unsigned count) > diff --git a/drivers/vhost...
2018 Dec 12
10
[PATCH net V2 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4-7 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was
2018 Dec 12
10
[PATCH net V2 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4-7 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was
2018 Dec 13
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...write(vq->log_base, vq->log_addr + > > > - (used - (void __user *)vq->used), > > > - sizeof vq->used->flags); > > > + log_used(vq, (used - (void __user *)vq->used), > > > + sizeof vq->used->flags); > > > if (vq->log_ctx) > > > eventfd_signal(vq->log_ctx, 1); > > > } > > > @@ -1789,9 +1844,8 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) > > > smp_wmb(); > > > /* Log avail event write */ > > > used = vh...
2018 Dec 13
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...write(vq->log_base, vq->log_addr + > > > - (used - (void __user *)vq->used), > > > - sizeof vq->used->flags); > > > + log_used(vq, (used - (void __user *)vq->used), > > > + sizeof vq->used->flags); > > > if (vq->log_ctx) > > > eventfd_signal(vq->log_ctx, 1); > > > } > > > @@ -1789,9 +1844,8 @@ static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event) > > > smp_wmb(); > > > /* Log avail event write */ > > > used = vh...
2010 Sep 14
1
[PATCH] vhost: max s/g to match qemu
...= vhost_dev_alloc_iovecs(dev); + if (err) + goto err_cgroup; + return 0; err_cgroup: kthread_stop(worker); @@ -345,6 +391,7 @@ void vhost_dev_cleanup(struct vhost_dev *dev) fput(dev->vqs[i].call); vhost_vq_reset(dev, dev->vqs + i); } + vhost_dev_free_iovecs(dev); if (dev->log_ctx) eventfd_ctx_put(dev->log_ctx); dev->log_ctx = NULL; @@ -946,7 +993,7 @@ static int get_indirect(struct vhost_dev *dev, struct vhost_virtqueue *vq, } ret = translate_desc(dev, indirect->addr, indirect->len, vq->indirect, - ARRAY_SIZE(vq->indirect)); + UIO_...
2010 Sep 14
1
[PATCH] vhost: max s/g to match qemu
...= vhost_dev_alloc_iovecs(dev); + if (err) + goto err_cgroup; + return 0; err_cgroup: kthread_stop(worker); @@ -345,6 +391,7 @@ void vhost_dev_cleanup(struct vhost_dev *dev) fput(dev->vqs[i].call); vhost_vq_reset(dev, dev->vqs + i); } + vhost_dev_free_iovecs(dev); if (dev->log_ctx) eventfd_ctx_put(dev->log_ctx); dev->log_ctx = NULL; @@ -946,7 +993,7 @@ static int get_indirect(struct vhost_dev *dev, struct vhost_virtqueue *vq, } ret = translate_desc(dev, indirect->addr, indirect->len, vq->indirect, - ARRAY_SIZE(vq->indirect)); + UIO_...
2011 Jun 21
1
[PATCH 1/2] vhost: init used ring after backend was set
This patch move the used ring initialization after backend was set. This make us possible to disable the backend and tweak the used ring then restart. And it's also useful for log setting as used ring have been checked then. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/net.c | 4 ++++ drivers/vhost/vhost.c | 11 +++-------- drivers/vhost/vhost.h | 1 +
2011 Jun 21
1
[PATCH 1/2] vhost: init used ring after backend was set
This patch move the used ring initialization after backend was set. This make us possible to disable the backend and tweak the used ring then restart. And it's also useful for log setting as used ring have been checked then. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/net.c | 4 ++++ drivers/vhost/vhost.c | 11 +++-------- drivers/vhost/vhost.h | 1 +
2010 Feb 23
3
[PATCH 0/3] vhost: logging fixes
The following patches on top of net-next fix issues related to write logging in vhost. This fixes all known to me logging issues, migration now works for me while under stress in both TX and RX directions. Rusty's going on vacation, I am guessing he won't have time to review this: Gleb, Juan, Herbert, could one of you review this patchset please? There's also the send queue full issue
2010 Feb 23
3
[PATCH 0/3] vhost: logging fixes
The following patches on top of net-next fix issues related to write logging in vhost. This fixes all known to me logging issues, migration now works for me while under stress in both TX and RX directions. Rusty's going on vacation, I am guessing he won't have time to review this: Gleb, Juan, Herbert, could one of you review this patchset please? There's also the send queue full issue
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...+ } > > > + if (unlikely(vq->log_used)) { > > > + /* Log used index update. */ > > > + log_write(vq->log_base, > > > + vq->log_addr + offsetof(struct vring_used, idx), > > > + sizeof(vq->used->idx)); > > > + if (vq->log_ctx) > > > + eventfd_signal(vq->log_ctx, 1); > > > + } > > > + return 0; > > > +} > > > +EXPORT_SYMBOL_GPL(vhost_add_used_idx); > > > + > > > static int __vhost_add_used_n(struct vhost_virtqueue *vq, > > > struct vr...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...+ } > > > + if (unlikely(vq->log_used)) { > > > + /* Log used index update. */ > > > + log_write(vq->log_base, > > > + vq->log_addr + offsetof(struct vring_used, idx), > > > + sizeof(vq->used->idx)); > > > + if (vq->log_ctx) > > > + eventfd_signal(vq->log_ctx, 1); > > > + } > > > + return 0; > > > +} > > > +EXPORT_SYMBOL_GPL(vhost_add_used_idx); > > > + > > > static int __vhost_add_used_n(struct vhost_virtqueue *vq, > > > struct vr...
2011 Jun 16
1
[PATCH] vhost: set dirty log when updating flags of used ring
...ags) < 0) + return -EFAULT; + if (unlikely(vq->log_used)) { + /* Make sure the flag is seen before log. */ + smp_wmb(); + /* Log used flag write. */ + log_write(vq->log_base, + vq->log_addr + offsetof(struct vring_used, flags), + sizeof vq->used->flags); + if (vq->log_ctx) + eventfd_signal(vq->log_ctx, 1); + } + return 0; +} + /* OK, now we need to know about added descriptors. */ bool vhost_enable_notify(struct vhost_virtqueue *vq) { @@ -1384,7 +1402,7 @@ bool vhost_enable_notify(struct vhost_virtqueue *vq) if (!(vq->used_flags & VRING_USED_F_NO_NO...