[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
From: |
Zeng, Xin |
Subject: |
Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver |
Date: |
Thu, 15 Dec 2016 00:59:19 +0000 |
On Thursday, December 15, 2016 8:45 AM, Gonglei (Arei) Wrote:
< > > diff --git a/drivers/crypto/virtio/virtio_crypto_core.c
< > b/drivers/crypto/virtio/virtio_crypto_core.c
< > > new file mode 100644
< > > index 0000000..c0854a1
< > > --- /dev/null
< > > +++ b/drivers/crypto/virtio/virtio_crypto_core.c
< > > @@ -0,0 +1,474 @@
< > [..]
< > > +
< > > +static void virtcrypto_dataq_callback(struct virtqueue *vq)
< > > +{
< > > + struct virtio_crypto *vcrypto = vq->vdev->priv;
< > > + struct virtio_crypto_request *vc_req;
< > > + unsigned long flags;
< > > + unsigned int len;
< > > + struct ablkcipher_request *ablk_req;
< > > + int error;
< > > +
< > > + spin_lock_irqsave(&vcrypto->lock, flags);
< >
< > Would it make sense to use a per virtqueue lock
< > like in virtio_blk for example instead of locking on the whole
< > device? OK, it seems you use only one dataqueue, so it
< > may not be that relevant.
< >
< Currently yes, both the backend device (cryptodev-backend-builtin)
< and the frontend driver use one dataqueue.
<
I think it makes sense to use per virtqueue lock here though it only uses one
queue so far,
but in the spec we already have multi queues support.
< Regards,
< -Gonglei
- [Qemu-devel] [PATCH v7 0/1] virtio-crypto: add Linux driver, Gonglei, 2016/12/14
- [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver, Gonglei, 2016/12/14
- Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver, Halil Pasic, 2016/12/14
- Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver, Gonglei (Arei), 2016/12/14
- Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver,
Zeng, Xin <=
- Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver, Gonglei (Arei), 2016/12/14
- Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver, Michael S. Tsirkin, 2016/12/15
- Re: [Qemu-devel] [virtio-dev] Re: [PATCH v7 1/1] crypto: add virtio-crypto driver, Gonglei (Arei), 2016/12/15