qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

cryptodev-vhost-user: set the key length

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>

authored by

Gonglei and committed by
Michael S. Tsirkin
0a9b9be9 efbfeb81

+7
+4
backends/cryptodev-vhost-user.c
··· 224 224 1u << VIRTIO_CRYPTO_SERVICE_MAC; 225 225 backend->conf.cipher_algo_l = 1u << VIRTIO_CRYPTO_CIPHER_AES_CBC; 226 226 backend->conf.hash_algo = 1u << VIRTIO_CRYPTO_HASH_SHA1; 227 + 228 + backend->conf.max_size = UINT64_MAX; 229 + backend->conf.max_cipher_key_len = VHOST_USER_MAX_CIPHER_KEY_LEN; 230 + backend->conf.max_auth_key_len = VHOST_USER_MAX_AUTH_KEY_LEN; 227 231 } 228 232 229 233 static int64_t cryptodev_vhost_user_sym_create_session(
+3
include/sysemu/cryptodev-vhost-user.h
··· 23 23 #ifndef CRYPTODEV_VHOST_USER_H 24 24 #define CRYPTODEV_VHOST_USER_H 25 25 26 + #define VHOST_USER_MAX_AUTH_KEY_LEN 512 27 + #define VHOST_USER_MAX_CIPHER_KEY_LEN 64 28 + 26 29 27 30 /** 28 31 * cryptodev_vhost_user_get_vhost: