search for: queue_id

Displaying 20 results from an estimated 64 matches for "queue_id".

2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...vice_ops); > + > +int vhost_mdev_set_features(struct vhost_mdev *vdpa, u64 features) > +{ > + vdpa->features = features; > + return 0; > +} > +EXPORT_SYMBOL(vhost_mdev_set_features); > + > +struct eventfd_ctx * > +vhost_mdev_get_call_ctx(struct vhost_mdev *vdpa, int queue_id) > +{ > + return vdpa->vqs[queue_id].call_ctx; > +} > +EXPORT_SYMBOL(vhost_mdev_get_call_ctx); > + > +int vhost_mdev_get_acked_features(struct vhost_mdev *vdpa, u64 *features) > +{ > + *features = vdpa->acked_features; > + return 0; > +} > +EXPORT_SYMBOL(vhost...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...vice_ops); > + > +int vhost_mdev_set_features(struct vhost_mdev *vdpa, u64 features) > +{ > + vdpa->features = features; > + return 0; > +} > +EXPORT_SYMBOL(vhost_mdev_set_features); > + > +struct eventfd_ctx * > +vhost_mdev_get_call_ctx(struct vhost_mdev *vdpa, int queue_id) > +{ > + return vdpa->vqs[queue_id].call_ctx; > +} > +EXPORT_SYMBOL(vhost_mdev_get_call_ctx); > + > +int vhost_mdev_get_acked_features(struct vhost_mdev *vdpa, u64 *features) > +{ > + *features = vdpa->acked_features; > + return 0; > +} > +EXPORT_SYMBOL(vhost...
2019 Sep 03
0
[RFC v3] vhost: introduce mdev based hardware vhost backend
...ef int (*vhost_mdev_start_device_t)(struct vhost_mdev *vdpa); > > +typedef int (*vhost_mdev_stop_device_t)(struct vhost_mdev *vdpa); > > +typedef int (*vhost_mdev_set_features_t)(struct vhost_mdev *vdpa); > > +typedef void (*vhost_mdev_notify_device_t)(struct vhost_mdev *vdpa, int queue_id); > > +typedef u64 (*vhost_mdev_get_notify_addr_t)(struct vhost_mdev *vdpa, int queue_id); > > +typedef u16 (*vhost_mdev_get_vring_base_t)(struct vhost_mdev *vdpa, int queue_id); > > +typedef void (*vhost_mdev_features_changed_t)(struct vhost_mdev *vdpa); > > + > > +st...
2019 Sep 06
1
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...efan, do you remember why did you put this comment? If not, > I will get rid of it. This comment can be removed. > > > +static void virtio_fs_wake_pending_and_unlock(struct fuse_iqueue *fiq) > > > +__releases(fiq->waitq.lock) > > > +{ > > > + unsigned int queue_id = VQ_REQUEST; /* TODO multiqueue */ > > > + struct virtio_fs *fs; > > > + struct fuse_conn *fc; > > > + struct fuse_req *req; > > > + struct fuse_pqueue *fpq; > > > + int ret; > > > + > > > + WARN_ON(list_empty(&fiq->pending)); &...
2019 Sep 05
0
[PATCH 13/18] virtiofs: Do not access virtqueue in request submission path
...8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 40259368a6bd..01bbf2c0e144 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -888,10 +888,10 @@ __releases(fiq->waitq.lock) fs = fiq->priv; fc = fs->vqs[queue_id].fud->fc; - dev_dbg(&fs->vqs[queue_id].vq->vdev->dev, - "%s: opcode %u unique %#llx nodeid %#llx in.len %u out.len %u\n", - __func__, req->in.h.opcode, req->in.h.unique, req->in.h.nodeid, - req->in.h.len, fuse_len_args(req->out.numargs, req->out.args...
2019 Oct 15
7
[PATCH 0/5] virtiofs: Fix couple of deadlocks
Hi, We have couple of places which can result in deadlock. This patch series fixes these. We can be called with fc->bg_lock (for background requests) while submitting a request. This leads to two constraints. - We can't end requests in submitter's context and call fuse_end_request() as it tries to take fc->bg_lock as well. So queue these requests on a list and use a worker to
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...tel(m->mdev, VIRTIO_MDEV_QUEUE_NOTIFY, vq - m->vqs); > +} > + > +static long vhost_mdev_start_backend(struct vhost_mdev *m) > +{ > + struct mdev_device *mdev = m->mdev; > + u64 features = m->acked_features; > + u64 addr; > + struct vhost_virtqueue *vq; > + int queue_id; > + > + features |= 1ULL << VIRTIO_F_IOMMU_PLATFORM; Is it better to get this feature from backend? > + > + virtio_mdev_writel(mdev, VIRTIO_MDEV_DRIVER_FEATURES_SEL, 1); > + virtio_mdev_writel(mdev, VIRTIO_MDEV_DRIVER_FEATURES, > + (u32)(features >> 32)); &gt...
2019 Sep 05
0
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...ve not noticed it yet. So its a TODO item. It will be nice to retry if virtuqueue gets full (instead of returning error to caller). [..] > > +static void virtio_fs_wake_pending_and_unlock(struct fuse_iqueue *fiq) > > +__releases(fiq->waitq.lock) > > +{ > > + unsigned int queue_id = VQ_REQUEST; /* TODO multiqueue */ > > + struct virtio_fs *fs; > > + struct fuse_conn *fc; > > + struct fuse_req *req; > > + struct fuse_pqueue *fpq; > > + int ret; > > + > > + WARN_ON(list_empty(&fiq->pending)); > > + req = list_last_entry(&a...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...t; + req->argbuf = NULL; > + } > + if (sgs != stack_sgs) { > + kfree(sgs); > + kfree(sg); > + } > + > + return ret; > +} > + > +static void virtio_fs_wake_pending_and_unlock(struct fuse_iqueue *fiq) > +__releases(fiq->waitq.lock) > +{ > + unsigned int queue_id = VQ_REQUEST; /* TODO multiqueue */ > + struct virtio_fs *fs; > + struct fuse_conn *fc; > + struct fuse_req *req; > + struct fuse_pqueue *fpq; > + int ret; > + > + WARN_ON(list_empty(&fiq->pending)); > + req = list_last_entry(&fiq->pending, struct fuse_req, lis...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...t; + req->argbuf = NULL; > + } > + if (sgs != stack_sgs) { > + kfree(sgs); > + kfree(sg); > + } > + > + return ret; > +} > + > +static void virtio_fs_wake_pending_and_unlock(struct fuse_iqueue *fiq) > +__releases(fiq->waitq.lock) > +{ > + unsigned int queue_id = VQ_REQUEST; /* TODO multiqueue */ > + struct virtio_fs *fs; > + struct fuse_conn *fc; > + struct fuse_req *req; > + struct fuse_pqueue *fpq; > + int ret; > + > + WARN_ON(list_empty(&fiq->pending)); > + req = list_last_entry(&fiq->pending, struct fuse_req, lis...
2019 Sep 05
0
[PATCH 03/18] virtiofs: Pass fsvq instead of vq as parameter to virtio_fs_enqueue_req
...>lock); + vq = fsvq->vq; ret = virtqueue_add_sgs(vq, sgs, out_sgs, in_sgs, req, GFP_ATOMIC); if (ret < 0) { /* TODO handle full virtqueue */ @@ -824,7 +825,7 @@ __releases(fiq->waitq.lock) /* TODO check for FR_INTERRUPTED? */ retry: - ret = virtio_fs_enqueue_req(fs->vqs[queue_id].vq, req); + ret = virtio_fs_enqueue_req(&fs->vqs[queue_id], req); if (ret < 0) { if (ret == -ENOMEM || ret == -ENOSPC) { /* Virtqueue full. Retry submission */ -- 2.20.1
2019 Oct 21
0
[PATCH 1/5] virtiofs: Do not end request in submission context
...o_fs_vq *fsvq; > > int ret; > > > > WARN_ON(list_empty(&fiq->pending)); > > @@ -951,7 +974,8 @@ __releases(fiq->lock) > > smp_mb__after_atomic(); > > > > retry: > > - ret = virtio_fs_enqueue_req(&fs->vqs[queue_id], req); > > + fsvq = &fs->vqs[queue_id]; > > + ret = virtio_fs_enqueue_req(fsvq, req); > > if (ret < 0) { > > if (ret == -ENOMEM || ret == -ENOSPC) { > > /* Virtqueue full. Retry submission */ > &...
2019 Oct 23
1
[PATCH -next] virtiofs: remove unused variable 'fc'
...g <yuehaibing at huawei.com> --- fs/fuse/virtio_fs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 2de8fc0..a5c8604 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -980,7 +980,6 @@ __releases(fiq->lock) { unsigned int queue_id = VQ_REQUEST; /* TODO multiqueue */ struct virtio_fs *fs; - struct fuse_conn *fc; struct fuse_req *req; struct virtio_fs_vq *fsvq; int ret; @@ -993,7 +992,6 @@ __releases(fiq->lock) spin_unlock(&fiq->lock); fs = fiq->priv; - fc = fs->vqs[queue_id].fud->fc; pr_de...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...struct vhost_mdev, dev); + + virtio_mdev_writel(m->mdev, VIRTIO_MDEV_QUEUE_NOTIFY, vq - m->vqs); +} + +static long vhost_mdev_start_backend(struct vhost_mdev *m) +{ + struct mdev_device *mdev = m->mdev; + u64 features = m->acked_features; + u64 addr; + struct vhost_virtqueue *vq; + int queue_id; + + features |= 1ULL << VIRTIO_F_IOMMU_PLATFORM; + + virtio_mdev_writel(mdev, VIRTIO_MDEV_DRIVER_FEATURES_SEL, 1); + virtio_mdev_writel(mdev, VIRTIO_MDEV_DRIVER_FEATURES, + (u32)(features >> 32)); + + virtio_mdev_writel(mdev, VIRTIO_MDEV_DRIVER_FEATURES_SEL, 0); + virtio_mdev_writ...
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU
2016 Nov 28
1
[PATCH v3] crypto: add virtio-crypto driver
...+ vcrypto->ctrl.header.opcode = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); >>> > > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); >>> > > + /* Set the default dataqueue id to 0 */ >>> > > + vcrypto->ctrl.header.queue_id = 0; >>> > > + >>> > > + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); >>> > > + /* Pad cipher's parameters */ >>> > > + vcrypto->ctrl.u.sym_create_session.op_type = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_S...
2016 Nov 28
1
[PATCH v3] crypto: add virtio-crypto driver
...+ vcrypto->ctrl.header.opcode = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); >>> > > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); >>> > > + /* Set the default dataqueue id to 0 */ >>> > > + vcrypto->ctrl.header.queue_id = 0; >>> > > + >>> > > + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); >>> > > + /* Pad cipher's parameters */ >>> > > + vcrypto->ctrl.u.sym_create_session.op_type = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_S...
2015 Mar 11
0
[PATCH] pmu/gk20a: PMU boot support.
...crash due to FECS crash. Dump FECS status */ > + /*gk20a_fecs_dump_falcon_stats(g);*/ > +} > + > +static bool pmu_validate_cmd(struct pmu_desc *pmu, struct pmu_cmd *cmd, > + struct pmu_msg *msg, struct pmu_payload *payload, > + u32 queue_id) > +{ > + struct nvkm_pmu *ppmu = (void *)nvkm_pmu((void *) > + impl_from_pmu(pmu)); > + struct pmu_queue *queue; > + u32 in_size, out_size; > + > + nv_debug(ppmu, "pmu validate cmd\n"); > + pmu_dump_falcon_stats(pmu); &g...
2015 Mar 11
3
[PATCH] pmu/gk20a: PMU boot support.
...N_REG_SP : 0x%x\n", + nv_rd32(ppmu, 0x0010a20c)); + } + + /* PMU may crash due to FECS crash. Dump FECS status */ + /*gk20a_fecs_dump_falcon_stats(g);*/ +} + +static bool pmu_validate_cmd(struct pmu_desc *pmu, struct pmu_cmd *cmd, + struct pmu_msg *msg, struct pmu_payload *payload, + u32 queue_id) +{ + struct nvkm_pmu *ppmu = (void *)nvkm_pmu((void *) + impl_from_pmu(pmu)); + struct pmu_queue *queue; + u32 in_size, out_size; + + nv_debug(ppmu, "pmu validate cmd\n"); + pmu_dump_falcon_stats(pmu); + + if (!PMU_IS_SW_COMMAND_QUEUE(queue_id)) + goto invalid_cmd; + + queue = &pmu...