OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH v1 00/14] virtio-crypto: introduce framework and device emulation


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




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]