virtio-crypto: set capacity of algorithms supported

Expose the capacity of algorithms supported by
virtio crypto device to the frontend driver using
pci configuration space.

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:26 +08:00 committed by Michael S. Tsirkin
parent b307d308c9
commit 050652d9be
2 changed files with 61 additions and 0 deletions

View file

@ -39,6 +39,24 @@ do { \
typedef struct VirtIOCryptoConf {
CryptoDevBackend *cryptodev;
/* Supported service mask */
uint32_t crypto_services;
/* Detailed algorithms mask */
uint32_t cipher_algo_l;
uint32_t cipher_algo_h;
uint32_t hash_algo;
uint32_t mac_algo_l;
uint32_t mac_algo_h;
uint32_t aead_algo;
/* Maximum length of cipher key */
uint32_t max_cipher_key_len;
/* Maximum length of authenticated key */
uint32_t max_auth_key_len;
/* Maximum size of each crypto request's content */
uint64_t max_size;
} VirtIOCryptoConf;
struct VirtIOCrypto;