search for: vhost_vq_set_backend

Displaying 20 results from an estimated 26 matches for "vhost_vq_set_backend".

Did you mean: vhost_vq_get_backend
2020 Jun 10
0
[PATCH RFC v7 03/14] vhost: use batched get_vq_desc version
...vhost_dev *d, unsigned int ioctl, void __user *arg > > vq->last_avail_idx = s.num; > > /* Forget the cached index value. */ > > vq->avail_idx = vq->last_avail_idx; > > + vq->ndescs = vq->first_desc = 0; > > This is not needed if it is done in vhost_vq_set_backend, as far as I can tell. > > Actually, maybe it is even better to move `vq->avail_idx = vq->last_avail_idx;` line to vhost_vq_set_backend, it is part > of the backend "set up" procedure, isn't it? > > I tested with virtio_test + batch tests sent in > https://l...
2023 Mar 21
8
[PATCH v2 0/7] vhost-scsi: Fix crashes and management op hangs
The following patches were made over Linus tree. The patches fix 3 issues: 1. If a user performs LIO LUN unmapping before the endpoint has been cleared then we can end up trying to free a bogus tmf struct if the TMF is still exucuting when we do the unmap. 2. If vhost_scsi_setup_vq_cmds fails we can leave the tpg->vhost_scsi pointer set and we can end up trying to access a freed struct. 3.
2023 Feb 23
5
[PATCH 0/5] vhost-scsi: Fix management operation hangs
The following patches were made over Linus tree and also apply over mst tree's vhost branch. The patches fix an issue where management operations like LUN mapping/unmapping and device addition hang for 30 seconds or up to N minutes depending on the device. The problem is that we use a global mutex to protect the list of tpgs but we hold that mutex during those management operations. So if you
2020 Apr 13
0
[PATCH 0/8] tools/vhost: Reset virtqueue on tests
...They are based on the tests sent back them, the ones that were not > included (reasons in that thread). This series changes: > > * Delete need to export the ugly function in virtio_ring, now all the > code is added in tools/virtio (except the one line fix). > * Add forgotten uses of vhost_vq_set_backend. Fix bad usage order in > vhost_test_set_backend. > * Drop random reset, not really needed. > * Minor changes updating tests code. > > This serie is meant to be applied on top of > 5de4e0b7068337cf0d4ca48a4011746410115aae in > git.kernel.org/pub/scm/linux/kernel/git/mst/vhost....
2020 Apr 13
0
[PATCH 0/8] tools/vhost: Reset virtqueue on tests
...nes that were not > > > included (reasons in that thread). This series changes: > > > > > > * Delete need to export the ugly function in virtio_ring, now all the > > > code is added in tools/virtio (except the one line fix). > > > * Add forgotten uses of vhost_vq_set_backend. Fix bad usage order in > > > vhost_test_set_backend. > > > * Drop random reset, not really needed. > > > * Minor changes updating tests code. > > > > > > This serie is meant to be applied on top of > > > 5de4e0b7068337cf0d4ca48a4011746410115aae...
2020 Jun 03
2
[PATCH RFC 03/13] vhost: batching fetches
...##__VA_ARGS__); \ > + pr_err(pr_fmt(fmt), ##__VA_ARGS__); \ Need a separate patch for this? Thanks > if ((vq)->error_ctx) \ > eventfd_signal((vq)->error_ctx, 1);\ > } while (0) > @@ -255,6 +256,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, > void *private_data) > { > vq->private_data = private_data; > + vq->ndescs = 0; > + vq->first_desc = 0; > } > > /**
2020 Jun 03
2
[PATCH RFC 03/13] vhost: batching fetches
...##__VA_ARGS__); \ > + pr_err(pr_fmt(fmt), ##__VA_ARGS__); \ Need a separate patch for this? Thanks > if ((vq)->error_ctx) \ > eventfd_signal((vq)->error_ctx, 1);\ > } while (0) > @@ -255,6 +256,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, > void *private_data) > { > vq->private_data = private_data; > + vq->ndescs = 0; > + vq->first_desc = 0; > } > > /**
2020 Apr 07
0
[PATCH v7 19/19] vhost: batching fetches
..., ...) do { \ - pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ + pr_err(pr_fmt(fmt), ##__VA_ARGS__); \ if ((vq)->error_ctx) \ eventfd_signal((vq)->error_ctx, 1);\ } while (0) @@ -255,6 +256,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, void *private_data) { vq->private_data = private_data; + vq->ndescs = 0; + vq->first_desc = 0; } /** -- MST
2020 Apr 07
0
[PATCH v8 19/19] vhost: batching fetches
..., ...) do { \ - pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ + pr_err(pr_fmt(fmt), ##__VA_ARGS__); \ if ((vq)->error_ctx) \ eventfd_signal((vq)->error_ctx, 1);\ } while (0) @@ -255,6 +256,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, void *private_data) { vq->private_data = private_data; + vq->ndescs = 0; + vq->first_desc = 0; } /** -- MST
2020 Jun 02
0
[PATCH RFC 03/13] vhost: batching fetches
..., ...) do { \ - pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ + pr_err(pr_fmt(fmt), ##__VA_ARGS__); \ if ((vq)->error_ctx) \ eventfd_signal((vq)->error_ctx, 1);\ } while (0) @@ -255,6 +256,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, void *private_data) { vq->private_data = private_data; + vq->ndescs = 0; + vq->first_desc = 0; } /** -- MST
2020 Jun 04
0
[PATCH RFC 03/13] vhost: batching fetches
...eparate patch for this? > > Thanks Oh that's a debugging thing. I will drop it. > > > if ((vq)->error_ctx) \ > > eventfd_signal((vq)->error_ctx, 1);\ > > } while (0) > > @@ -255,6 +256,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, > > void *private_data) > > { > > vq->private_data = private_data; > > + vq->ndescs = 0; > > + vq->first_desc = 0; > > } > > /**
2020 Sep 24
0
[PATCH 3/8] vhost scsi: alloc cmds per vq instead of session
...>se_tpg.tpg_group.cg_item); > + } > + } > + kfree(vs_tpg); > out: > mutex_unlock(&vs->dev.mutex); > mutex_unlock(&vhost_scsi_mutex); > @@ -1549,6 +1653,12 @@ static void vhost_scsi_flush(struct vhost_scsi *vs) > mutex_lock(&vq->mutex); > vhost_vq_set_backend(vq, NULL); > mutex_unlock(&vq->mutex); > + /* > + * Make sure cmds are not running before tearing them > + * down. > + */ > + vhost_scsi_flush(vs); > + vhost_scsi_destroy_vq_cmds(vq); > } > } > /* > @@ -1842,23 +1952,6 @@ static void...
2020 Jun 10
2
[PATCH RFC v6 02/11] vhost: use batched get_vq_desc version
...nsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num); > int vhost_get_vq_desc(struct vhost_virtqueue *, > struct iovec iov[], unsigned int iov_count, > unsigned int *out_num, unsigned int *in_num, > @@ -261,6 +258,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, > void *private_data) > { > vq->private_data = private_data; > + vq->ndescs = 0; > + vq->first_desc = 0; > } > > /**
2020 Jun 10
2
[PATCH RFC v6 02/11] vhost: use batched get_vq_desc version
...nsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num); > int vhost_get_vq_desc(struct vhost_virtqueue *, > struct iovec iov[], unsigned int iov_count, > unsigned int *out_num, unsigned int *in_num, > @@ -261,6 +258,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, > void *private_data) > { > vq->private_data = private_data; > + vq->ndescs = 0; > + vq->first_desc = 0; > } > > /**
2020 Jun 11
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num); int vhost_get_vq_desc(struct vhost_virtqueue *, struct iovec iov[], unsigned int iov_count, unsigned int *out_num, unsigned int *in_num, @@ -261,6 +258,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, void *private_data) { vq->private_data = private_data; + vq->ndescs = 0; + vq->first_desc = 0; } /** -- MST
2020 Jun 08
0
[PATCH RFC v6 02/11] vhost: use batched get_vq_desc version
...unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num); int vhost_get_vq_desc(struct vhost_virtqueue *, struct iovec iov[], unsigned int iov_count, unsigned int *out_num, unsigned int *in_num, @@ -261,6 +258,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, void *private_data) { vq->private_data = private_data; + vq->ndescs = 0; + vq->first_desc = 0; } /** -- MST
2020 Jun 10
0
[PATCH RFC v6 02/11] vhost: use batched get_vq_desc version
...> - struct vhost_log *log, unsigned int *log_num); > > int vhost_get_vq_desc(struct vhost_virtqueue *, > > struct iovec iov[], unsigned int iov_count, > > unsigned int *out_num, unsigned int *in_num, > > @@ -261,6 +258,8 @@ static inline void vhost_vq_set_backend(struct vhost_virtqueue *vq, > > void *private_data) > > { > > vq->private_data = private_data; > > + vq->ndescs = 0; > > + vq->first_desc = 0; > > } > > /**
2020 Jun 10
18
[PATCH RFC v7 00/14] vhost: ring format independence
This intentionally leaves "fixup" changes separate - hopefully that is enough to fix vhost-net crashes reported here, but it helps me keep track of what changed. I will naturally squash them later when we are done. This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that
2020 Jun 10
18
[PATCH RFC v7 00/14] vhost: ring format independence
This intentionally leaves "fixup" changes separate - hopefully that is enough to fix vhost-net crashes reported here, but it helps me keep track of what changed. I will naturally squash them later when we are done. This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that
2020 Jun 08
14
[PATCH RFC v6 00/11] vhost: ring format independence
This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. Used ring is similar: we fetch into an independent struct first, convert that to IOV later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will