From patchwork Tue Sep 20 15:47:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Zeng X-Patchwork-Id: 9341963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1F207607EE for ; Tue, 20 Sep 2016 15:54:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FEEC297B6 for ; Tue, 20 Sep 2016 15:54:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0334F2989B; Tue, 20 Sep 2016 15:54:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A7D00297B6 for ; Tue, 20 Sep 2016 15:54:26 +0000 (UTC) Received: from localhost ([::1]:36255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmNNJ-0000lB-Jf for patchwork-qemu-devel@patchwork.kernel.org; Tue, 20 Sep 2016 11:54:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmNJj-0006lg-25 for qemu-devel@nongnu.org; Tue, 20 Sep 2016 11:50:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmNJe-0006rQ-LM for qemu-devel@nongnu.org; Tue, 20 Sep 2016 11:50:41 -0400 Received: from mga04.intel.com ([192.55.52.120]:54544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmNJe-0006r7-AO for qemu-devel@nongnu.org; Tue, 20 Sep 2016 11:50:38 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 20 Sep 2016 08:50:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,368,1470726000"; d="scan'208";a="11444558" Received: from qat-server-102.sh.intel.com ([10.239.52.137]) by orsmga005.jf.intel.com with ESMTP; 20 Sep 2016 08:50:30 -0700 From: Xin Zeng To: arei.gonglei@huawei.com, qemu-devel@nongnu.org, virtio-dev@lists.oasis-open.org Date: Tue, 20 Sep 2016 23:47:10 +0800 Message-Id: <1474386430-80014-1-git-send-email-xin.zeng@intel.com> X-Mailer: git-send-email 1.9.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.120 Subject: [Qemu-devel] [PATCH] virtio crypto device specification 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: agraf@suse.de, Ola.Liljedahl@arm.com, brian.a.keating@intel.com, claudio.fontana@huawei.com, mst@redhat.com, xin.zeng@intel.com, hanweidong@huawei.com, luonengjun@huawei.com, peter.huangpeng@huawei.com, john.griffin@intel.com, mike.caraman@nxp.com, liang.j.ma@intel.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, Varun.Sethi@freescale.com, Jani.Kokkonen@huawei.com, denglingli@chinamobile.com, weidong.huang@huawei.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fix spelling mistakes of keywords to make xelatex happy: filed--->field Signed-off-by: Xin Zeng --- virtio-crypto.tex | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/virtio-crypto.tex b/virtio-crypto.tex index ac1fc0a..c3554e3 100644 --- a/virtio-crypto.tex +++ b/virtio-crypto.tex @@ -159,7 +159,7 @@ More algorithms will be defined in the future. \begin{itemize*} \item The driver MUST read the ready \field{status} from the bottom bit of status to check whether the hardware-backed implementation is ready or not, and the driver MUST reread it after the device reset. -\item The driver MUST NOT transmit any packets to the device if the ready \filed{status} is not set. +\item The driver MUST NOT transmit any packets to the device if the ready \field{status} is not set. \item The driver MAY read \field{max_dataqueues} field to discover the number of data queues the device supports. \item The driver MUST read \field{crypto_services} field to discover which services the device is able to offer. \item The driver MUST read the detailed algorithms fields based on \field{crypto_services} field. @@ -634,7 +634,7 @@ The driver MUST set \field{src_data}.\field{flag} to ~VIRTIO_CRYPTO_IOVEC_F_NEXT \devicenormative{\subparagraph}{HASH Service Operation}{Device Types / Crypto Device / Device Operation / Data Virtqueue / HASH Service Operation} -The device MUST copy the results of HASH operations to the guest memory recorded by \field{digest_result_addr} filed in struct virtio_crypto_hash_input. +The device MUST copy the results of HASH operations to the guest memory recorded by \field{digest_result_addr} field in struct virtio_crypto_hash_input. The device MUST set \field{status} in strut virtio_crypto_hash_input: VIRTIO_CRYPTO_OP_OK: success; VIRTIO_CRYPTO_OP_ERR: creation failed or device error; VIRTIO_CRYPTO_OP_NOTSUPP: not support. \paragraph{MAC Service Operation}\label{sec:Device Types / Crypto Device / Device Operation / Data Virtqueue / MAC Service Operation} @@ -685,7 +685,7 @@ The driver MUST set \field{hash_output}.\field{src_data}.\field{flag} to ~VIRTIO \devicenormative{\subparagraph}{MAC Service Operation}{Device Types / Crypto Device / Device Operation / Data Virtqueue / MAC Service Operation} -The device MUST copy the results of MAC operations to the guest memory recorded by \field{digest_result_addr} filed in struct virtio_crypto_mac_input. +The device MUST copy the results of MAC operations to the guest memory recorded by \field{digest_result_addr} field in struct virtio_crypto_mac_input. The device MUST set \field{status} in strut virtio_crypto_mac_input: VIRTIO_CRYPTO_OP_OK: success; VIRTIO_CRYPTO_OP_ERR: creation failed or device error; VIRTIO_CRYPTO_OP_NOTSUPP: not support. \paragraph{Symmetric algorithms Operation}\label{sec:Device Types / Crypto Device / Device Operation / Data Virtqueue / Symmetric algorithms Operation} @@ -813,9 +813,9 @@ The device MUST parse the virtio_crypto_sym_data_req based on the \field{op_code The device SHOULD only parse fields of struct virtio_crypto_cipher_data_req in struct virtio_crypto_sym_data_req if the created session is VIRTIO_CRYPTO_SYM_OP_CIPHER type. The device MUST parse fields of both struct virtio_crypto_cipher_data_req and struct virtio_crypto_mac_data_req in struct virtio_crypto_sym_data_req if the created session is of the VIRTIO_CRYPTO_SYM_OP_ALGORITHM_CHAINING operation type and in the VIRTIO_CRYPTO_SYM_HASH_MODE_AUTH mode. -The device MUST copy the result of cryptographic operation to the guest memory recorded by \filed{dst_data}.\field{addr} filed in struct virtio_crypto_cipher_input in plain CIPHER mode. -The device MUST copy the result of HASH/MAC operation to the guest memory recorded by \filed{digest_result_addr} filed in struct virtio_crypto_alg_chain_data_input is of the VIRTIO_CRYPTO_SYM_OP_ALGORITHM_CHAINING type. -The device MUST set the \filed{status} field in strut virtio_crypto_cipher_input or virtio_crypto_alg_chain_data_input structure: +The device MUST copy the result of cryptographic operation to the guest memory recorded by \field{dst_data}.\field{addr} field in struct virtio_crypto_cipher_input in plain CIPHER mode. +The device MUST copy the result of HASH/MAC operation to the guest memory recorded by \field{digest_result_addr} field in struct virtio_crypto_alg_chain_data_input is of the VIRTIO_CRYPTO_SYM_OP_ALGORITHM_CHAINING type. +The device MUST set the \field{status} field in strut virtio_crypto_cipher_input or virtio_crypto_alg_chain_data_input structure: VIRTIO_CRYPTO_OP_OK: success; VIRTIO_CRYPTO_OP_ERR: creation failed or device error; VIRTIO_CRYPTO_OP_NOTSUPP: not supported. \subparagraph{Steps of Operation}\label{sec:Device Types / Crypto Device / Device Operation / Data Virtqueue / Symmetric algorithms Operation / Steps of Operation} @@ -936,7 +936,7 @@ The driver MUST set \field{src_data}.\field{flag} to ~VIRTIO_CRYPTO_IOVEC_F_NEXT \devicenormative{\subparagraph}{AEAD Service Operation}{Device Types / Crypto Device / Device Operation / Data Virtqueue / AEAD Service Operation} The device MUST parse the virtio_crypto_aead_data_req based on the \field{op_code} in general header. -The device MUST copy the result of cryptographic operation to the guest memory recorded by \filed{dst_data}.\field{addr} filed in struct virtio_crypto_aead_input. -The device MUST copy the digest result to the guest memory recorded by \filed{digest_result_addr} filed in struct virtio_crypto_aead_input. -The device MUST set the \filed{status} field in strut virtio_crypto_aead_input: VIRTIO_CRYPTO_OP_OK: success; VIRTIO_CRYPTO_OP_ERR: creation failed or device error; VIRTIO_CRYPTO_OP_NOTSUPP: not supported. +The device MUST copy the result of cryptographic operation to the guest memory recorded by \field{dst_data}.\field{addr} field in struct virtio_crypto_aead_input. +The device MUST copy the digest result to the guest memory recorded by \field{digest_result_addr} field in struct virtio_crypto_aead_input. +The device MUST set the \field{status} field in strut virtio_crypto_aead_input: VIRTIO_CRYPTO_OP_OK: success; VIRTIO_CRYPTO_OP_ERR: creation failed or device error; VIRTIO_CRYPTO_OP_NOTSUPP: not supported. When the \field{op_code} is VIRTIO_CRYPTO_AEAD_DECRYPT, the device MUST verify and return the verification result to the driver, and if the verification result is incorrect, VIRTIO_CRYPTO_OP_BADMSG (bad message) MUST be returned to the driver. \ No newline at end of file