cryptodev: add vhost-user as a new cryptodev backend

Usage:
 -chardev socket,id=charcrypto0,path=/path/to/your/socket
 -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0
 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
Signed-off-by: Jay Zhou <jianjay.zhou@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 2018-03-01 21:46:28 +08:00 committed by Michael S. Tsirkin
parent 59fbfed9b8
commit 042cea274c
7 changed files with 622 additions and 0 deletions

6
vl.c
View file

@ -2838,6 +2838,12 @@ static bool object_create_initial(const char *type)
return false;
}
#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
if (g_str_equal(type, "cryptodev-vhost-user")) {
return false;
}
#endif
/*
* return false for concrete netfilters since
* they depend on netdevs already existing