Re: [Qemu-devel] [PATCH] crypto: add virtio-crypto driver

2016-11-19 Thread gong lei
on 2016/11/17 23:55, Benedetto, Salvatore wrote: > Hi Gonglei, > > ... >> + >> +static int virtio_crypto_alg_ablkcipher_init_session( >> +struct virtio_crypto_ablkcipher_ctx *ctx, >> +int alg, const uint8_t *key, >> +unsigned int keylen, >> +int encr

Re: [Qemu-devel] [PATCH] crypto: add virtio-crypto driver

2016-11-17 Thread Benedetto, Salvatore
Hi Gonglei, ... > + > +static int virtio_crypto_alg_ablkcipher_init_session( > + struct virtio_crypto_ablkcipher_ctx *ctx, > + int alg, const uint8_t *key, > + unsigned int keylen, > + int encrypt) > +{ > + struct scatterlist outhdr, key_sg, inhd

Re: [Qemu-devel] [PATCH] crypto: add virtio-crypto driver

2016-11-16 Thread Gonglei (Arei)
Hi Michael, May I should convert all __virtio32/64 to le32/64 in virtio_crypto.h ? > +#define VIRTIO_CRYPTO_OPCODE(service, op) (((service) << 8) | (op)) > + > +struct virtio_crypto_ctrl_header { > +#define VIRTIO_CRYPTO_CIPHER_CREATE_SESSION \ > +VIRTIO_CRYPTO_OPCODE(VIRTIO_CR

[Qemu-devel] [PATCH] crypto: add virtio-crypto driver

2016-11-13 Thread Gonglei
This patch introduces virtio-crypto driver for Linux Kernel. The virtio crypto device is a virtual cryptography device as well as a kind of virtual hardware accelerator for virtual machines. The encryption anddecryption requests are placed in the data queue and are ultimately handled by thebackend