aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2016-10-28 16:33:30 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-11-01 19:21:08 +0200
commit20cb2ffd5ff3fdbf47d7a69d1bb649000aca66b6 (patch)
tree00e68a2ba3eed88e2f1dc5eb5816ee7e9bfdb9eb /include
parentd6634ac09abf20d890fd094773f125ee0ff0b1cb (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-crypto.h8
1 files changed, 7 insertions, 1 deletions
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;