diff options
| author | Gonglei | 2016-10-28 10:33:30 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin | 2016-11-01 18:21:08 +0100 |
| commit | 20cb2ffd5ff3fdbf47d7a69d1bb649000aca66b6 (patch) | |
| tree | 00e68a2ba3eed88e2f1dc5eb5816ee7e9bfdb9eb /include | |
| parent | cryptodev: introduce an unified wrapper for crypto operation (diff) | |
| download | qemu-20cb2ffd5ff3fdbf47d7a69d1bb649000aca66b6.tar.gz qemu-20cb2ffd5ff3fdbf47d7a69d1bb649000aca66b6.tar.xz qemu-20cb2ffd5ff3fdbf47d7a69d1bb649000aca66b6.zip | |
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.h | 8 |
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; |
