mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
cryptodev: add vhost support
Impliment the vhost-crypto's funtions, such as startup, stop and notification etc. Introduce an enum QCryptoCryptoDevBackendOptionsType in order to identify the cryptodev vhost backend is vhost-user or vhost-kernel-module (If exist). At this point, the cryptdoev-vhost-user works. 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:
parent
042cea274c
commit
5da73dabe8
7 changed files with 398 additions and 0 deletions
44
include/sysemu/cryptodev-vhost-user.h
Normal file
44
include/sysemu/cryptodev-vhost-user.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* QEMU Crypto Device Common Vhost User Implement
|
||||
*
|
||||
* Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
|
||||
*
|
||||
* Authors:
|
||||
* Gonglei <arei.gonglei@huawei.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CRYPTODEV_VHOST_USER_H
|
||||
#define CRYPTODEV_VHOST_USER_H
|
||||
|
||||
|
||||
/**
|
||||
* cryptodev_vhost_user_get_vhost:
|
||||
* @cc: the client object for each queue
|
||||
* @b: the cryptodev backend common vhost object
|
||||
* @queue: the queue index
|
||||
*
|
||||
* Gets a new cryptodev backend common vhost object based on
|
||||
* @b and @queue
|
||||
*
|
||||
* Returns: the cryptodev backend common vhost object
|
||||
*/
|
||||
CryptoDevBackendVhost *
|
||||
cryptodev_vhost_user_get_vhost(
|
||||
CryptoDevBackendClient *cc,
|
||||
CryptoDevBackend *b,
|
||||
uint16_t queue);
|
||||
|
||||
#endif /* CRYPTODEV_VHOST_USER_H */
|
Loading…
Add table
Add a link
Reference in a new issue