search for: vhost_log_write

Displaying 20 results from an estimated 191 matches for "vhost_log_write".

2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...ndex ad7a6f475a44..784df2b49628 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -1192,7 +1192,8 @@ static void handle_rx(struct vhost_net *net) > if (nvq->done_idx > VHOST_NET_BATCH) > vhost_net_signal_used(nvq); > if (unlikely(vq_log)) > - vhost_log_write(vq, vq_log, log, vhost_len); > + vhost_log_write(vq, vq_log, log, vhost_len, > + vq->iov, in); > total_len += vhost_len; > if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { > vhost_poll_queue(&vq->poll); > diff --git a/drivers/vhost/vhost.c b/...
2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...ndex ad7a6f475a44..784df2b49628 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -1192,7 +1192,8 @@ static void handle_rx(struct vhost_net *net) > if (nvq->done_idx > VHOST_NET_BATCH) > vhost_net_signal_used(nvq); > if (unlikely(vq_log)) > - vhost_log_write(vq, vq_log, log, vhost_len); > + vhost_log_write(vq, vq_log, log, vhost_len, > + vq->iov, in); > total_len += vhost_len; > if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { > vhost_poll_queue(&vq->poll); > diff --git a/drivers/vhost/vhost.c b/...
2018 Dec 10
0
[PATCH net 4/4] vhost: log dirty page correctly
...vhost/net.c b/drivers/vhost/net.c index 5f272ab4d5b4..754ca22efb43 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1196,7 +1196,8 @@ static void handle_rx(struct vhost_net *net) if (nvq->done_idx > VHOST_NET_BATCH) vhost_net_signal_used(nvq); if (unlikely(vq_log)) - vhost_log_write(vq, vq_log, log, vhost_len); + vhost_log_write(vq, vq_log, log, vhost_len, + vq->iov, in); total_len += vhost_len; if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { vhost_poll_queue(&vq->poll); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 55...
2018 Dec 12
0
[PATCH net V2 4/4] vhost: log dirty page correctly
...vhost/net.c b/drivers/vhost/net.c index ad7a6f475a44..784df2b49628 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1192,7 +1192,8 @@ static void handle_rx(struct vhost_net *net) if (nvq->done_idx > VHOST_NET_BATCH) vhost_net_signal_used(nvq); if (unlikely(vq_log)) - vhost_log_write(vq, vq_log, log, vhost_len); + vhost_log_write(vq, vq_log, log, vhost_len, + vq->iov, in); total_len += vhost_len; if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { vhost_poll_queue(&vq->poll); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 55...
2018 Dec 13
0
[PATCH net V2 4/4] vhost: log dirty page correctly
...100644 >> --- a/drivers/vhost/net.c >> +++ b/drivers/vhost/net.c >> @@ -1192,7 +1192,8 @@ static void handle_rx(struct vhost_net *net) >> if (nvq->done_idx > VHOST_NET_BATCH) >> vhost_net_signal_used(nvq); >> if (unlikely(vq_log)) >> - vhost_log_write(vq, vq_log, log, vhost_len); >> + vhost_log_write(vq, vq_log, log, vhost_len, >> + vq->iov, in); >> total_len += vhost_len; >> if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { >> vhost_poll_queue(&vq->poll); >> diff --git...
2019 Dec 15
0
[vhost:linux-next 12/12] drivers/vhost/vhost.c:1968:11: note: in expansion of macro 'min'
...> All warnings (new ones prefixed by >>): In file included from include/linux/list.h:9:0, from include/linux/wait.h:7, from include/linux/eventfd.h:13, from drivers/vhost/vhost.c:13: drivers/vhost/vhost.c: In function 'vhost_log_write': include/linux/kernel.h:844:29: warning: comparison of distinct pointer types lacks a cast (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^ include/linux/kernel.h:858:4: note: in expansion of macro '__typecheck' (__typecheck(x, y) &...
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
.../net.c > > > +++ b/drivers/vhost/net.c > > > @@ -1192,7 +1192,8 @@ static void handle_rx(struct vhost_net *net) > > > if (nvq->done_idx > VHOST_NET_BATCH) > > > vhost_net_signal_used(nvq); > > > if (unlikely(vq_log)) > > > - vhost_log_write(vq, vq_log, log, vhost_len); > > > + vhost_log_write(vq, vq_log, log, vhost_len, > > > + vq->iov, in); > > > total_len += vhost_len; > > > if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { > > > vhost_poll_queue(&vq-...
2018 Dec 13
2
[PATCH net V2 4/4] vhost: log dirty page correctly
.../net.c > > > +++ b/drivers/vhost/net.c > > > @@ -1192,7 +1192,8 @@ static void handle_rx(struct vhost_net *net) > > > if (nvq->done_idx > VHOST_NET_BATCH) > > > vhost_net_signal_used(nvq); > > > if (unlikely(vq_log)) > > > - vhost_log_write(vq, vq_log, log, vhost_len); > > > + vhost_log_write(vq, vq_log, log, vhost_len, > > > + vq->iov, in); > > > total_len += vhost_len; > > > if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { > > > vhost_poll_queue(&vq-...
2018 May 21
1
[RFC PATCH net-next 02/12] vhost_net: introduce vhost_exceeds_weight()
...likely(++sent_pkts >= VHOST_NET_PKT_WEIGHT)) { > + if (unlikely(vhost_exceeds_weight(++sent_pkts, total_len))) { > vhost_poll_queue(&vq->poll); > break; > } > @@ -887,8 +891,7 @@ static void handle_rx(struct vhost_net *net) > if (unlikely(vq_log)) > vhost_log_write(vq, vq_log, log, vhost_len); > total_len += vhost_len; > - if (unlikely(total_len >= VHOST_NET_WEIGHT) || > - unlikely(++recv_pkts >= VHOST_NET_PKT_WEIGHT)) { > + if (unlikely(vhost_exceeds_weight(++recv_pkts, total_len))) { > vhost_poll_queue(&vq->poll); &...
2016 Jan 20
1
[PATCH V2 2/3] vhost: introduce vhost_vq_more_avail()
...(struct vhost_dev *, struct vhost_virtqueue *); > void vhost_disable_notify(struct vhost_dev *, struct vhost_virtqueue *); > +bool vhost_vq_more_avail(struct vhost_dev *, struct vhost_virtqueue *); > bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); > > int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, > -- > 2.5.0
2016 Jan 20
1
[PATCH V2 2/3] vhost: introduce vhost_vq_more_avail()
...(struct vhost_dev *, struct vhost_virtqueue *); > void vhost_disable_notify(struct vhost_dev *, struct vhost_virtqueue *); > +bool vhost_vq_more_avail(struct vhost_dev *, struct vhost_virtqueue *); > bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); > > int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, > -- > 2.5.0
2015 Oct 30
5
[PATCH] vhost: move is_le setup to the backend
...r = vhost_update_used_flags(vq); if (r) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 4772862b71a7..8a62041959fe 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -162,6 +162,7 @@ bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, unsigned int log_num, u64 len); +void vhost_set_is_le(struct vhost_virtqueue *vq); #define vq_err(vq, fmt, ...) do { \ pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
2015 Oct 30
5
[PATCH] vhost: move is_le setup to the backend
...r = vhost_update_used_flags(vq); if (r) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 4772862b71a7..8a62041959fe 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -162,6 +162,7 @@ bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, unsigned int log_num, u64 len); +void vhost_set_is_le(struct vhost_virtqueue *vq); #define vq_err(vq, fmt, ...) do { \ pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
2016 Jan 11
2
[PATCH] vhost: move is_le setup to the backend
...r = vhost_update_used_flags(vq); if (r) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index d3f767448a72..af5d33797937 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -162,6 +162,7 @@ bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, unsigned int log_num, u64 len); +void vhost_set_is_le(struct vhost_virtqueue *vq); #define vq_err(vq, fmt, ...) do { \ pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
2016 Jan 11
2
[PATCH] vhost: move is_le setup to the backend
...r = vhost_update_used_flags(vq); if (r) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index d3f767448a72..af5d33797937 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -162,6 +162,7 @@ bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, unsigned int log_num, u64 len); +void vhost_set_is_le(struct vhost_virtqueue *vq); #define vq_err(vq, fmt, ...) do { \ pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...: > > > return r; > > > } > > > +EXPORT_SYMBOL_GPL(vhost_dev_ioctl); > > > > > > static const struct vhost_memory_region *find_region(struct vhost_memory *mem, > > > __u64 addr, __u32 len) > > > @@ -962,6 +982,7 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, > > > BUG(); > > > return 0; > > > } > > > +EXPORT_SYMBOL_GPL(vhost_log_write); > > > > > > static int vhost_update_used_flags(struct vhost_virtqueue *vq) > > > { > > &gt...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...: > > > return r; > > > } > > > +EXPORT_SYMBOL_GPL(vhost_dev_ioctl); > > > > > > static const struct vhost_memory_region *find_region(struct vhost_memory *mem, > > > __u64 addr, __u32 len) > > > @@ -962,6 +982,7 @@ int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, > > > BUG(); > > > return 0; > > > } > > > +EXPORT_SYMBOL_GPL(vhost_log_write); > > > > > > static int vhost_update_used_flags(struct vhost_virtqueue *vq) > > > { > > &gt...
2018 Apr 24
2
[PATCH] vhost_net: use packet weight for rx handler, too
...id handle_rx(struct vhost_net *net) struct socket *sock; struct iov_iter fixup; __virtio16 num_buffers; + int recv_pkts = 0; mutex_lock_nested(&vq->mutex, 0); sock = vq->private_data; @@ -872,7 +875,8 @@ static void handle_rx(struct vhost_net *net) if (unlikely(vq_log)) vhost_log_write(vq, vq_log, log, vhost_len); total_len += vhost_len; - if (unlikely(total_len >= VHOST_NET_WEIGHT)) { + if (unlikely(total_len >= VHOST_NET_WEIGHT) || + unlikely(++recv_pkts >= VHOST_NET_PKT_WEIGHT)) { vhost_poll_queue(&vq->poll); goto out; } -- 2.14.3