virtio-crypto: using bh to handle dataq's requests

Make crypto operations are executed asynchronously,
so that other QEMU threads and monitor couldn't
be blocked at the virtqueue handling context.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Gonglei 2016-10-28 16:33:30 +08:00 committed by Michael S. Tsirkin
parent d6634ac09a
commit 20cb2ffd5f
2 changed files with 60 additions and 3 deletions

View file

@ -76,11 +76,17 @@ typedef struct VirtIOCryptoReq {
} u;
} VirtIOCryptoReq;
typedef struct VirtIOCryptoQueue {
VirtQueue *dataq;
QEMUBH *dataq_bh;
struct VirtIOCrypto *vcrypto;
} VirtIOCryptoQueue;
typedef struct VirtIOCrypto {
VirtIODevice parent_obj;
VirtQueue *ctrl_vq;
VirtIOCryptoQueue *vqs;
VirtIOCryptoConf conf;
CryptoDevBackend *cryptodev;