Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2356217imm; Mon, 28 May 2018 06:38:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrkVA9A0/gvtgvmrs9uTVCEBRZU68b/bXXIO89xX9yVq2cQBfnfrmba8f1WPDChGJOoKqEz X-Received: by 2002:a65:4487:: with SMTP id l7-v6mr10443333pgq.194.1527514700639; Mon, 28 May 2018 06:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527514700; cv=none; d=google.com; s=arc-20160816; b=Ou+bFTbYfoXjx4tEdcRo7o3e6nl3ihCE/XGmTMNp1kSB3nwZEyUjgg60lQD+pBLkkQ mPUMlCmuzhYzruPKuvq1op2X7iBNEbya98nXgOFHlmfQoWD6fG+aFnTeGIJg3Xes8QbO 3XSLzFSQ0xsRB+YtiP3sHQUp/IM8mJjBLtBRFJPJig4JunfjGarT3E4txizONQHuy4CR jYoeDK6A0wGAAx4bBd8tB8XjOVM6/O5bF3ei6RDYUYKyOWuFAjs3b1FQTt5CmXThLk0Q vPW7BCE2nVMeD44oqPrTgKDVzf2OTQ5HiE429AAQFl1cmr+OtiJO7/NHKBfLsFhk0XGY 7C8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:from:cc :subject:to:dkim-signature:arc-authentication-results; bh=q3f6wA2edNQc2r1fFZ6XQRR6ex29aiJ1U8BduGAcei8=; b=QAO2JuVJ9BPi5/ox/lVOcXOItUWVSiJYBeQAadsilIzK6E3WypMXle3WEHYIY2QtlN 0Yl1EREIjdz3qBGJrd6QLmbkqNMtE8XNAGXLcAiW18V1689NRO6cVPm47zeeu7A4S8n0 8oiLxAmk2Zcle8IH8ZTW6oLhxpp1Eh4s1mdXwT3nCIBsSJVzok5AXpV+VqcojlkE8Qaz 7wPsZLC9vxeJcTOYB/upoGuLRFeFTVFzqjheU0W+ChKiwkZ4m53+0do7ekxmCeIJzOWF xMNEuoVylQ7acja54NsOo6shUARbuuu/0kEorlYe7xYY7g3PGRydJ5zkJbpZrYUmLW8W fUgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=AkqC22/B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c18-v6si4467985pgf.301.2018.05.28.06.38.05; Mon, 28 May 2018 06:38:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=AkqC22/B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165445AbeE1Nh0 (ORCPT + 99 others); Mon, 28 May 2018 09:37:26 -0400 Received: from smtprelay6.synopsys.com ([198.182.37.59]:50950 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163408AbeE1NhV (ORCPT ); Mon, 28 May 2018 09:37:21 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id BA9151E04A3 for ; Mon, 28 May 2018 15:37:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1527514639; bh=DP5Kemhw3/+4JU7DAQJ3sLDVI+YMVlHSVxMalfWwWw4=; h=To:Subject:CC:From:Date:From; b=AkqC22/BQJMrkewOqnpq78/2ItcXyv03itUqiX2d4Et7qhUJGZJ2Fkb2prmoBxjsB oRHZM8ISGDo455ZFQkT/VMKqLyFK8MlwmnxqhrHpnVgZPhFirczmx+Z80NHD8da55W R6X1MTl7PYKOhjRozclp37Dt4uejL2L39ha7OnVvPD3xmWRpG6BmzZ1y76RCOTcVIG hDpHL4fvacCVb3DVEymMHPOYRg52glAxMXe7NO4NWZvCG+Qe+FTX6iPHP6jJKyIpy+ /flJrxBT/ZkVYae6BUEOu6tPHRYwQzpoe139FAwmwN9kZTezX8sXniXwryknk2xYju poW+bccylt7HQ== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id 1A3CD50FC; Mon, 28 May 2018 06:37:19 -0700 (PDT) Received: from US01WEHTC1.internal.synopsys.com (10.12.239.236) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 28 May 2018 06:37:18 -0700 Received: from [10.0.2.15] (10.144.133.104) by us01wehtc1.internal.synopsys.com (10.12.239.231) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 28 May 2018 06:37:18 -0700 To: "Vinayak Holikatti ; \"James E.J. Bottomley\" ; \"Martin K. Petersen\"" Subject: [PATCH 0/5] scsi: ufs: UFS Host Controller crypto changes CC: , "linux-scsi@vger.kernel.org;Manjunath M Bettegowda ; Prabu Thangamuthu ; Tejas Joglekar ; Joao Pinto" From: Ladvine D Almeida Message-ID: <192fedba-4f7d-8230-2152-b618787fd934@synopsys.com> Date: Mon, 28 May 2018 14:37:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.144.133.104] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series enables the inline encryption capability of the UFS Host Controller. The Inline Encryption feature got considerable performance improvements over the SW algorithms and crypto accelarators that the crypto transformation on 512 bytes chunks in the device mapper layer can be avoided and bio can be submitted directly to the block device drivers which performs the encryption inline to hardware. The UFS Host Controller driver detects the crypto capability in the HW during the init stage and registers an algorithm to the Linux Kernel Cryptography Framework(LKCF). The UFS HC has multiple key slots in the hardware for storing the keys, the crypto support manages these key slots in hardware. The Inline Encryption support also requires enhancements in the block layer for associating the crypto information to the individual block I/O requests. Separate patch is sent to the block layer community for the same. Configuration and usage of the Inline Encryption support for the Disk Encryption requires minor enhancement in the DM-Crypt subsystem. The I/O requests are submitted directly with the crypto information to the block level device drivers without actually performing the transformation in this layer. Separate patch is sent to the device mapper layer community for the same. The feature is tested and performance comparisions are done with Synopsys UFS Controller IP on Synopsys HAPS-70 FPGA-based Prototyping solution. Ladvine D Almeida (5): scsi: ufs: Add crypto source file for UFS HC driver scsi: ufs: Add crypto header file for UFS HC driver scsi: ufs: Add Kconfig for UFS HC driver crypto support scsi: ufs: Add crypto masks for UFS HC driver scsi: ufs: Add hooks in UFS HC driver for crypto support drivers/scsi/ufs/Kconfig | 15 ++ drivers/scsi/ufs/Makefile | 6 +- drivers/scsi/ufs/ufshcd-crypto.c | 520 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshcd-crypto.h | 156 ++++++++++++ drivers/scsi/ufs/ufshcd.c | 63 ++++- drivers/scsi/ufs/ufshcd.h | 29 +++ drivers/scsi/ufs/ufshci.h | 2 + 7 files changed, 784 insertions(+), 7 deletions(-) create mode 100644 drivers/scsi/ufs/ufshcd-crypto.c create mode 100644 drivers/scsi/ufs/ufshcd-crypto.h -- 2.7.4