search for: virtcrypto_update_status

Displaying 20 results from an estimated 41 matches for "virtcrypto_update_status".

2016 Nov 28
2
[PATCH v3] crypto: add virtio-crypto driver
On Mon, 28 Nov 2016 20:08:23 +0800 Gonglei <arei.gonglei at huawei.com> wrote: > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > +{ > + u32 status; > + int err; > + > + virtio_cread(vcrypto->vdev, > + struct virtio_crypto_config, status, &status); > + > + /* Ignore unknown (future) status bits */ > + status &= VIRTIO_CRYPTO_S_HW_READY; I'm wonder...
2016 Nov 28
2
[PATCH v3] crypto: add virtio-crypto driver
On Mon, 28 Nov 2016 20:08:23 +0800 Gonglei <arei.gonglei at huawei.com> wrote: > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > +{ > + u32 status; > + int err; > + > + virtio_cread(vcrypto->vdev, > + struct virtio_crypto_config, status, &status); > + > + /* Ignore unknown (future) status bits */ > + status &= VIRTIO_CRYPTO_S_HW_READY; I'm wonder...
2016 Nov 29
1
[virtio-dev] Re: [PATCH v3] crypto: add virtio-crypto driver
On Tue, 29 Nov 2016 01:37:44 +0000 "Gonglei (Arei)" <arei.gonglei at huawei.com> wrote: > > On Mon, 28 Nov 2016 20:08:23 +0800 > > Gonglei <arei.gonglei at huawei.com> wrote: > > > > > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > > > +{ > > > + u32 status; > > > + int err; > > > + > > > + virtio_cread(vcrypto->vdev, > > > + struct virtio_crypto_config, status, &status); > > > + > > > + /* Ignore unknown (futur...
2016 Nov 29
1
[virtio-dev] Re: [PATCH v3] crypto: add virtio-crypto driver
On Tue, 29 Nov 2016 01:37:44 +0000 "Gonglei (Arei)" <arei.gonglei at huawei.com> wrote: > > On Mon, 28 Nov 2016 20:08:23 +0800 > > Gonglei <arei.gonglei at huawei.com> wrote: > > > > > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > > > +{ > > > + u32 status; > > > + int err; > > > + > > > + virtio_cread(vcrypto->vdev, > > > + struct virtio_crypto_config, status, &status); > > > + > > > + /* Ignore unknown (futur...
2016 Dec 27
1
[PATCH] virtio-crypto: support crypto engine framework
...+ } + + vi->data_vq[i].engine->cipher_one_request = + virtio_crypto_ablkcipher_crypt_req; } kfree(names); @@ -136,6 +146,7 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi) return 0; +err_engine: err_find: kfree(names); err_names: @@ -269,6 +280,38 @@ static int virtcrypto_update_status(struct virtio_crypto *vcrypto) return 0; } +static int virtcrypto_start_crypto_engines(struct virtio_crypto *vcrypto) +{ + int32_t i; + int ret; + + for (i = 0; i < vcrypto->max_data_queues; i++) { + if (vcrypto->data_vq[i].engine) { + ret = crypto_engine_start(vcrypto->data_vq[...
2016 Dec 27
1
[PATCH] virtio-crypto: support crypto engine framework
...+ } + + vi->data_vq[i].engine->cipher_one_request = + virtio_crypto_ablkcipher_crypt_req; } kfree(names); @@ -136,6 +146,7 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi) return 0; +err_engine: err_find: kfree(names); err_names: @@ -269,6 +280,38 @@ static int virtcrypto_update_status(struct virtio_crypto *vcrypto) return 0; } +static int virtcrypto_start_crypto_engines(struct virtio_crypto *vcrypto) +{ + int32_t i; + int ret; + + for (i = 0; i < vcrypto->max_data_queues; i++) { + if (vcrypto->data_vq[i].engine) { + ret = crypto_engine_start(vcrypto->data_vq[...
2016 Nov 29
0
[virtio-dev] Re: [PATCH v3] crypto: add virtio-crypto driver
> > Subject: [virtio-dev] Re: [PATCH v3] crypto: add virtio-crypto driver > > On Mon, 28 Nov 2016 20:08:23 +0800 > Gonglei <arei.gonglei at huawei.com> wrote: > > > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > > +{ > > + u32 status; > > + int err; > > + > > + virtio_cread(vcrypto->vdev, > > + struct virtio_crypto_config, status, &status); > > + > > + /* Ignore unknown (future) status bits */ > > + status &am...
2020 Aug 05
0
[PATCH v3 32/38] virtio_crypto: convert to LE accessors
...sertions(+), 23 deletions(-) diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c index c8a962c62663..aeecce27fe8f 100644 --- a/drivers/crypto/virtio/virtio_crypto_core.c +++ b/drivers/crypto/virtio/virtio_crypto_core.c @@ -204,8 +204,8 @@ static int virtcrypto_update_status(struct virtio_crypto *vcrypto) u32 status; int err; - virtio_cread(vcrypto->vdev, - struct virtio_crypto_config, status, &status); + virtio_cread_le(vcrypto->vdev, + struct virtio_crypto_config, status, &status); /* * Unknown status bits would be a host error and th...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...tcrypto_find_vqs(vi); > + if (ret) > + goto err_free; > + > + get_online_cpus(); > + virtcrypto_set_affinity(vi); > + put_online_cpus(); > + > + return 0; > + > +err_free: > + virtcrypto_free_queues(vi); > +err: > + return ret; > +} > + > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > +{ > + u32 status; > + int err; > + > + virtio_cread(vcrypto->vdev, > + struct virtio_crypto_config, status, &status); > + > + /* Ignore unknown (future) status bits */ > + status &= VIRTIO_CRYPTO_S_HW_READY; > + > + i...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...tcrypto_find_vqs(vi); > + if (ret) > + goto err_free; > + > + get_online_cpus(); > + virtcrypto_set_affinity(vi); > + put_online_cpus(); > + > + return 0; > + > +err_free: > + virtcrypto_free_queues(vi); > +err: > + return ret; > +} > + > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > +{ > + u32 status; > + int err; > + > + virtio_cread(vcrypto->vdev, > + struct virtio_crypto_config, status, &status); > + > + /* Ignore unknown (future) status bits */ > + status &= VIRTIO_CRYPTO_S_HW_READY; > + > + i...
2016 Nov 28
4
[PATCH v3] virtio-crypto: add Linux driver
...nging the relationship of binding virtqueue and cpu) - use __u32/64 in the config space since the virtio->get() doesn't support byte-swap yet. [Michael] - drop the whole patch 1 of v2 because the above reason. - add VERSION_1 check at the beginning of virtcrypto_probe() - s/-1/EPERM/g in virtcrypto_update_status(), don't change err to EFAULT then. [Michael] - add reset operation before delete the virtqueus. [Micheal] - drop an unnecessiry spin_lock calling in virtcrypto_freeze(), avoid possible dead lock. [Micheal] - redefine parameter alg's type in order to use a cast for it. [Michael] - pad a...
2016 Nov 28
4
[PATCH v3] virtio-crypto: add Linux driver
...nging the relationship of binding virtqueue and cpu) - use __u32/64 in the config space since the virtio->get() doesn't support byte-swap yet. [Michael] - drop the whole patch 1 of v2 because the above reason. - add VERSION_1 check at the beginning of virtcrypto_probe() - s/-1/EPERM/g in virtcrypto_update_status(), don't change err to EFAULT then. [Michael] - add reset operation before delete the virtqueus. [Micheal] - drop an unnecessiry spin_lock calling in virtcrypto_freeze(), avoid possible dead lock. [Micheal] - redefine parameter alg's type in order to use a cast for it. [Michael] - pad a...
2016 Nov 28
0
[PATCH v3] crypto: add virtio-crypto driver
...+ > > + get_online_cpus(); > > + virtcrypto_set_affinity(vi); > > + put_online_cpus(); > > + > > + return 0; > > + > > +err_free: > > + virtcrypto_free_queues(vi); > > +err: > > + return ret; > > +} > > + > > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > > +{ > > + u32 status; > > + int err; > > + > > + virtio_cread(vcrypto->vdev, > > + struct virtio_crypto_config, status, &status); > > + > > + /* Ignore unknown (future) status bits */ > > + status &am...
2016 Dec 15
2
[PATCH v8 0/1] virtio-crypto: add Linux driver
...spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for error path in virtio_crypto_alg_validate_key(). - add lock before calling virtio_break_device() in virtcrypto_update_status() v4: - rework unknow status bit handler by calling virtio_break_device(). [Cornelia] - convert space to tab in Kconfig. [Stefan] - rename virtio_crypto.c to virtio_crypto_core.c and then make the moudle named virtio_crypto.ko for consistency. [Stefan] - don't call virtcrypto_dev_stop()...
2016 Dec 15
2
[PATCH v8 0/1] virtio-crypto: add Linux driver
...spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for error path in virtio_crypto_alg_validate_key(). - add lock before calling virtio_break_device() in virtcrypto_update_status() v4: - rework unknow status bit handler by calling virtio_break_device(). [Cornelia] - convert space to tab in Kconfig. [Stefan] - rename virtio_crypto.c to virtio_crypto_core.c and then make the moudle named virtio_crypto.ko for consistency. [Stefan] - don't call virtcrypto_dev_stop()...
2016 Dec 14
2
[PATCH v7 0/1] virtio-crypto: add Linux driver
...spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for error path in virtio_crypto_alg_validate_key(). - add lock before calling virtio_break_device() in virtcrypto_update_status() v4: - rework unknow status bit handler by calling virtio_break_device(). [Cornelia] - convert space to tab in Kconfig. [Stefan] - rename virtio_crypto.c to virtio_crypto_core.c and then make the moudle named virtio_crypto.ko for consistency. [Stefan] - don't call virtcrypto_dev_stop()...
2016 Dec 14
2
[PATCH v7 0/1] virtio-crypto: add Linux driver
...spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for error path in virtio_crypto_alg_validate_key(). - add lock before calling virtio_break_device() in virtcrypto_update_status() v4: - rework unknow status bit handler by calling virtio_break_device(). [Cornelia] - convert space to tab in Kconfig. [Stefan] - rename virtio_crypto.c to virtio_crypto_core.c and then make the moudle named virtio_crypto.ko for consistency. [Stefan] - don't call virtcrypto_dev_stop()...
2016 Nov 28
0
[virtio-dev] Re: [PATCH v2 2/2] crypto: add virtio-crypto driver
...+ > > + get_online_cpus(); > > + virtcrypto_set_affinity(vi); > > + put_online_cpus(); > > + > > + return 0; > > + > > +err_free: > > + virtcrypto_free_queues(vi); > > +err: > > + return ret; > > +} > > + > > +static int virtcrypto_update_status(struct virtio_crypto *vcrypto) > > +{ > > + __le32 status_le; > > + u32 status; > > + int err; > > + > > + status_le = virtio_cread32_le(vcrypto->vdev, > > + offsetof(struct virtio_crypto_config, status)); > > + status = le32_to_cpu(status_le); &...
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
...spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for error path in virtio_crypto_alg_validate_key(). - add lock before calling virtio_break_device() in virtcrypto_update_status() v4: - rework unknow status bit handler by calling virtio_break_device(). [Cornelia] - convert space to tab in Kconfig. [Stefan] - rename virtio_crypto.c to virtio_crypto_core.c and then make the moudle named virtio_crypto.ko for consistency. [Stefan] - don't call virtcrypto_dev_stop()...
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
...spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for error path in virtio_crypto_alg_validate_key(). - add lock before calling virtio_break_device() in virtcrypto_update_status() v4: - rework unknow status bit handler by calling virtio_break_device(). [Cornelia] - convert space to tab in Kconfig. [Stefan] - rename virtio_crypto.c to virtio_crypto_core.c and then make the moudle named virtio_crypto.ko for consistency. [Stefan] - don't call virtcrypto_dev_stop()...