[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 00/14] virtio-crypto: introduce framework and dev
From: |
Gonglei |
Subject: |
[Qemu-devel] [PATCH v1 00/14] virtio-crypto: introduce framework and device emulation |
Date: |
Thu, 8 Sep 2016 11:42:22 +0800 |
This patch series realize the framework and emulation of a new
virtio crypto device, which is similar with virtio net device.
- I introduce the cryptodev backend as the client of virtio crypto device
which can be realized by different methods, such as cryptodev-linux in my
series,
vhost-crypto kernel module, vhost-user etc.
- The patch set abides by the virtio crypto speccification v9.
- The virtio crypto support symmetric algorithms (including CIPHER and
algorithm chainning)
at present, except HASH, MAC and AEAD services.
- unsupport hot plug/unplug cryptodev client at this moment.
Cryptodev-linux is a device that allows access to Linux kernel cryptographic
drivers;
thus allowing of userspace applications to take advantage of hardware
accelerators.
It can be found here:
http://cryptodev-linux.org/
(please use the latest version)
To use the cryptodev-linux as the client, the cryptodev.ko should be insert on
the host.
# enter cryptodev-linux module root directory, then
make;make install
then configuring QEMU shows:
[...]
jemalloc support no
avx2 optimization no
cryptodev-linux support yes
QEMU can then be started using the following parameters:
qemu-system-x86_64 \
[...] \
-cryptodev type=cryptodev-linux,id=cryptodev0 \
-device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \
[...]
The front-end linux kernel driver (Experimental at present) is publicly
accessible from:
https://github.com/gongleiarei/virtio-crypto-linux-driver.git
After insmod virtio-crypto.ko, you also can use cryptodev-linux test the crypto
function
in the guest. For example:
linux-guest:/home/gonglei/cryptodev-linux/tests # ./cipher -
requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver virtio_crypto_aes_cbc
AES Test passed
requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver virtio_crypto_aes_cbc
requested cipher CRYPTO_AES_CBC, got cbc(aes) with driver virtio_crypto_aes_cbc
Test passed
Please review, thanks!
QEMU code also can be accessible from:
https://github.com/gongleiarei/qemu.git
branch virtio-crypto
Regards,
Gonglei (14):
crypto: introduce cryptodev backend and crypto legacy hardware
crypto: introduce crypto queue handler
crypto: add cryptoLegacyHW stuff
crypto: add symetric algorithms support
crypto: add cryptodev-linux as a cryptodev backend
crypto: add internal handle logic layer
virtio-crypto: introduce virtio-crypto.h
virtio-crypto-pci: add virtio crypto pci support
virtio-crypto: add virtio crypto realization modle
virtio-crypto: set capacity of crypto legacy hardware
virtio-crypto: add control queue handler
virtio-crypto: add destroy session logic
virtio-crypto: get correct input data address for each request
virtio-crypto: add data virtqueue processing handler
configure | 16 +
crypto/Makefile.objs | 3 +
crypto/crypto-queue.c | 205 ++++++
crypto/crypto.c | 378 +++++++++++
crypto/cryptodev-linux.c | 419 ++++++++++++
hw/core/qdev-properties-system.c | 86 +++
hw/virtio/Makefile.objs | 2 +
hw/virtio/virtio-crypto-pci.c | 71 ++
hw/virtio/virtio-crypto.c | 868 +++++++++++++++++++++++++
hw/virtio/virtio-pci.h | 16 +
include/crypto/crypto-clients.h | 39 ++
include/crypto/crypto-queue.h | 69 ++
include/crypto/crypto.h | 193 ++++++
include/hw/qdev-properties.h | 3 +
include/hw/virtio/virtio-crypto.h | 84 +++
include/qemu/typedefs.h | 1 +
include/standard-headers/linux/virtio_crypto.h | 448 +++++++++++++
include/sysemu/sysemu.h | 1 +
qapi-schema.json | 61 ++
qemu-options.hx | 19 +
vl.c | 13 +
21 files changed, 2995 insertions(+)
create mode 100644 crypto/crypto-queue.c
create mode 100644 crypto/crypto.c
create mode 100644 crypto/cryptodev-linux.c
create mode 100644 hw/virtio/virtio-crypto-pci.c
create mode 100644 hw/virtio/virtio-crypto.c
create mode 100644 include/crypto/crypto-clients.h
create mode 100644 include/crypto/crypto-queue.h
create mode 100644 include/crypto/crypto.h
create mode 100644 include/hw/virtio/virtio-crypto.h
create mode 100644 include/standard-headers/linux/virtio_crypto.h
--
1.7.12.4
- [Qemu-devel] [PATCH v1 00/14] virtio-crypto: introduce framework and device emulation,
Gonglei <=
- [Qemu-devel] [PATCH v1 06/14] crypto: add internal handle logic layer, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 01/14] crypto: introduce cryptodev backend and crypto legacy hardware, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 03/14] crypto: add cryptoLegacyHW stuff, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 12/14] virtio-crypto: add destroy session logic, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 05/14] crypto: add cryptodev-linux as a cryptodev backend, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 07/14] virtio-crypto: introduce virtio-crypto.h, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 14/14] virtio-crypto: add data virtqueue processing handler, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 13/14] virtio-crypto: get correct input data address for each request, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 10/14] virtio-crypto: set capacity of crypto legacy hardware, Gonglei, 2016/09/07
- [Qemu-devel] [PATCH v1 11/14] virtio-crypto: add control queue handler, Gonglei, 2016/09/07