From nobody Tue Nov 4 07:15:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505092866327229.50983452579783; Sun, 10 Sep 2017 18:21:06 -0700 (PDT) Received: from localhost ([::1]:54866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drDPN-0003LQ-Ld for importer@patchew.org; Sun, 10 Sep 2017 21:21:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drDJE-00072H-IK for qemu-devel@nongnu.org; Sun, 10 Sep 2017 21:14:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drDJ9-0005d7-Qz for qemu-devel@nongnu.org; Sun, 10 Sep 2017 21:14:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2259) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1drDJ9-0005b6-5f for qemu-devel@nongnu.org; Sun, 10 Sep 2017 21:14:39 -0400 Received: from 172.30.72.60 (EHLO DGGEMS402-HUB.china.huawei.com) ([172.30.72.60]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DHB05987; Mon, 11 Sep 2017 09:10:54 +0800 (CST) Received: from localhost (10.177.246.209) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.301.0; Mon, 11 Sep 2017 09:10:47 +0800 From: "Longpeng(Mike)" To: , Date: Mon, 11 Sep 2017 09:10:33 +0800 Message-ID: <1505092240-10864-2-git-send-email-longpeng2@huawei.com> X-Mailer: git-send-email 1.8.4.msysgit.0 In-Reply-To: <1505092240-10864-1-git-send-email-longpeng2@huawei.com> References: <1505092240-10864-1-git-send-email-longpeng2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.246.209] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0204.59B5E2A0.00BC, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 7229957b809da7ae455ecd080660dbe8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 45.249.212.191 Subject: [Qemu-devel] [RFC 1/8] virtio-crypto: add new definations for multiplexing mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: weidong.huang@huawei.com, mst@redhat.com, jasowang@redhat.com, john.griffin@intel.com, Varun.Sethi@freescale.com, denglingli@chinamobile.com, arei.gonglei@hotmail.com, agraf@suse.de, arei.gonglei@huawei.com, "Longpeng\(Mike\)" , vincent.jardin@6wind.com, Ola.Liljedahl@arm.com, luonengjun@huawei.com, xin.zeng@intel.com, liang.j.ma@intel.com, stefanha@redhat.com, Jani.Kokkonen@huawei.com, pasic@linux.vnet.ibm.com, brian.a.keating@intel.com, wangxinxin.wang@huawei.com, cohuck@redhat.com, mike.caraman@nxp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Adds the defination of the control/operation header for multiplexing mode. Signed-off-by: Longpeng(Mike) --- include/standard-headers/linux/virtio_crypto.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/include/standard-headers/linux/virtio_crypto.h b/include/stand= ard-headers/linux/virtio_crypto.h index 5ff0b4e..987fb1e 100755 --- a/include/standard-headers/linux/virtio_crypto.h +++ b/include/standard-headers/linux/virtio_crypto.h @@ -38,6 +38,13 @@ #define VIRTIO_CRYPTO_SERVICE_MAC 2 #define VIRTIO_CRYPTO_SERVICE_AEAD 3 =20 +/* The features for virtio crypto device */ +#define VIRTIO_CRYPTO_F_MUX_MODE 0 +#define VIRTIO_CRYPTO_F_CIPHER_STATELESS_MODE 1 +#define VIRTIO_CRYPTO_F_HASH_STATELESS_MODE 2 +#define VIRTIO_CRYPTO_F_MAC_STATELESS_MODE 3 +#define VIRTIO_CRYPTO_F_AEAD_STATELESS_MODE 4 + #define VIRTIO_CRYPTO_OPCODE(service, op) (((service) << 8) | (op)) =20 struct virtio_crypto_ctrl_header { @@ -234,7 +241,7 @@ struct virtio_crypto_destroy_session_req { uint8_t padding[48]; }; =20 -/* The request of the control virtqueue's packet */ +/* The request of the control virtqueue's packet for non-MUX mode */ struct virtio_crypto_op_ctrl_req { struct virtio_crypto_ctrl_header header; =20 @@ -253,6 +260,11 @@ struct virtio_crypto_op_ctrl_req { } u; }; =20 +/* The request of the control virtqueue's packet for MUX mode */ +struct virtio_crypto_op_ctrl_req_mux { + struct virtio_crypto_ctrl_header header; +}; + struct virtio_crypto_op_header { #define VIRTIO_CRYPTO_CIPHER_ENCRYPT \ VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x00) @@ -390,7 +402,7 @@ struct virtio_crypto_aead_data_req { uint8_t padding[32]; }; =20 -/* The request of the data virtqueue's packet */ +/* The request of the data virtqueue's packet for non-MUX mode */ struct virtio_crypto_op_data_req { struct virtio_crypto_op_header header; =20 @@ -403,6 +415,11 @@ struct virtio_crypto_op_data_req { } u; }; =20 +/* The request of the data virtqueue's packet for MUX mode */ +struct virtio_crypto_op_data_req_mux { + struct virtio_crypto_op_header header; +}; + #define VIRTIO_CRYPTO_OK 0 #define VIRTIO_CRYPTO_ERR 1 #define VIRTIO_CRYPTO_BADMSG 2 --=20 1.8.3.1