Searched refs:vcrypto (Results 1 – 5 of 5) sorted by relevance
| /linux/drivers/crypto/virtio/ |
| H A D | virtio_crypto_core.c | 32 struct virtio_crypto *vcrypto = vq->vdev->priv; in virtcrypto_ctrlq_callback() local 37 spin_lock_irqsave(&vcrypto->ctrl_lock, flags); in virtcrypto_ctrlq_callback() 41 spin_unlock_irqrestore(&vcrypto->ctrl_lock, flags); in virtcrypto_ctrlq_callback() 43 spin_lock_irqsave(&vcrypto->ctrl_lock, flags); in virtcrypto_ctrlq_callback() 46 spin_unlock_irqrestore(&vcrypto->ctrl_lock, flags); in virtcrypto_ctrlq_callback() 49 int virtio_crypto_ctrl_vq_request(struct virtio_crypto *vcrypto, struct scatterlist *sgs[], in virtio_crypto_ctrl_vq_request() argument 58 spin_lock_irqsave(&vcrypto->ctrl_lock, flags); in virtio_crypto_ctrl_vq_request() 59 err = virtqueue_add_sgs(vcrypto->ctrl_vq, sgs, out_sgs, in_sgs, vc_ctrl_req, GFP_ATOMIC); in virtio_crypto_ctrl_vq_request() 61 spin_unlock_irqrestore(&vcrypto->ctrl_lock, flags); in virtio_crypto_ctrl_vq_request() 65 virtqueue_kick(vcrypto->ctrl_vq); in virtio_crypto_ctrl_vq_request() [all …]
|
| H A D | virtio_crypto_mgr.c | 202 int virtcrypto_dev_start(struct virtio_crypto *vcrypto) in virtcrypto_dev_start() argument 204 if (virtio_crypto_skcipher_algs_register(vcrypto)) { in virtcrypto_dev_start() 209 if (virtio_crypto_akcipher_algs_register(vcrypto)) { in virtcrypto_dev_start() 211 virtio_crypto_skcipher_algs_unregister(vcrypto); in virtcrypto_dev_start() 228 void virtcrypto_dev_stop(struct virtio_crypto *vcrypto) in virtcrypto_dev_stop() argument 230 virtio_crypto_skcipher_algs_unregister(vcrypto); in virtcrypto_dev_stop() 231 virtio_crypto_akcipher_algs_unregister(vcrypto); in virtcrypto_dev_stop() 248 bool virtcrypto_algo_is_supported(struct virtio_crypto *vcrypto, in virtcrypto_algo_is_supported() argument 261 if (!(vcrypto->crypto_services & service_mask)) in virtcrypto_algo_is_supported() 267 algo_mask = vcrypto->cipher_algo_l; in virtcrypto_algo_is_supported() [all …]
|
| H A D | virtio_crypto_skcipher_algs.c | 19 struct virtio_crypto *vcrypto; member 116 struct virtio_crypto *vcrypto = ctx->vcrypto; in virtio_crypto_alg_skcipher_init_session() local 167 err = virtio_crypto_ctrl_vq_request(vcrypto, sgs, num_out, num_in, vc_ctrl_req); in virtio_crypto_alg_skcipher_init_session() 196 struct virtio_crypto *vcrypto = ctx->vcrypto; in virtio_crypto_alg_skcipher_close_session() local 229 err = virtio_crypto_ctrl_vq_request(vcrypto, sgs, num_out, num_in, vc_ctrl_req); in virtio_crypto_alg_skcipher_close_session() 253 struct virtio_crypto *vcrypto = ctx->vcrypto; in virtio_crypto_alg_skcipher_init_sessions() local 255 if (keylen > vcrypto->max_cipher_key_len) { in virtio_crypto_alg_skcipher_init_sessions() 291 if (!ctx->vcrypto) { in virtio_crypto_skcipher_setkey() 294 struct virtio_crypto *vcrypto = in virtio_crypto_skcipher_setkey() local 297 if (!vcrypto) { in virtio_crypto_skcipher_setkey() [all …]
|
| H A D | virtio_crypto_akcipher_algs.c | 28 struct virtio_crypto *vcrypto; member 103 struct virtio_crypto *vcrypto = ctx->vcrypto; in virtio_crypto_alg_akcipher_init_session() local 136 err = virtio_crypto_ctrl_vq_request(vcrypto, sgs, num_out, num_in, vc_ctrl_req); in virtio_crypto_alg_akcipher_init_session() 162 struct virtio_crypto *vcrypto = ctx->vcrypto; in virtio_crypto_alg_akcipher_close_session() local 191 err = virtio_crypto_ctrl_vq_request(vcrypto, sgs, num_out, num_in, vc_ctrl_req); in virtio_crypto_alg_akcipher_close_session() 217 struct virtio_crypto *vcrypto = ctx->vcrypto; in __virtio_crypto_akcipher_do_req() local 222 int node = dev_to_node(&vcrypto->vdev->dev); in __virtio_crypto_akcipher_do_req() 277 struct virtio_crypto *vcrypto = ctx->vcrypto; in virtio_crypto_rsa_do_req() local 285 GFP_KERNEL, dev_to_node(&vcrypto->vdev->dev)); in virtio_crypto_rsa_do_req() 316 struct virtio_crypto *vcrypto = ctx->vcrypto; in virtio_crypto_rsa_req() local [all …]
|
| H A D | virtio_crypto_common.h | 125 int virtcrypto_dev_start(struct virtio_crypto *vcrypto); 126 void virtcrypto_dev_stop(struct virtio_crypto *vcrypto); 144 int virtio_crypto_skcipher_algs_register(struct virtio_crypto *vcrypto); 145 void virtio_crypto_skcipher_algs_unregister(struct virtio_crypto *vcrypto); 146 int virtio_crypto_akcipher_algs_register(struct virtio_crypto *vcrypto); 147 void virtio_crypto_akcipher_algs_unregister(struct virtio_crypto *vcrypto); 148 int virtio_crypto_ctrl_vq_request(struct virtio_crypto *vcrypto, struct scatterlist *sgs[],
|