From 20cb2ffd5ff3fdbf47d7a69d1bb649000aca66b6 Mon Sep 17 00:00:00 2001 From: Gonglei Date: Fri, 28 Oct 2016 16:33:30 +0800 Subject: 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-crypto.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/virtio/virtio-crypto.h b/include/hw/virtio/virtio-crypto.h index db5c941ab9..a00a0bfaba 100644 --- a/include/hw/virtio/virtio-crypto.h +++ b/include/hw/virtio/virtio-crypto.h @@ -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; -- cgit v1.2.3-55-g7522