From nobody Mon Feb 9 09:46:41 2026 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C134358D38 for ; Thu, 29 Jan 2026 03:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769656833; cv=none; b=h3/doWZt3KkaFRVF42htg99vlZlX+d7k+4jeuvtyX0lb0V7cqnG8p9bH0lVIWeIu1KYgDTe4FZkG9g+JSiohM409kCAPQRYDBT2lq7v9U84y2PqeBJQNK+uUJUfcKYiF/UIatNY0zY2DqAJNbqMSgX1U1cq4MXuoeD8f8iTRy7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769656833; c=relaxed/simple; bh=3b6wIYgewbLW+NSlJo3hwLCgNV7d/iwK2UN4TDIMNug=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=TXWjnjfWIxw31r6bQFDzmdmjcXOW75Mngc0uL9wt8PCF3RHX+l8IpCrmQYtu4AIbqNOC7VarYWAsLUl3we1Wqthj/3+Q/aVi7+wRdVbT3Z/fpMem+bxPdwbScXpCxWkuU2nYs8F6iFhVumrfm6MmfiwkTng6iDd3Y3zoigmeghA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=SJh2ndmI; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="SJh2ndmI" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20260129032024epoutp01d92f26afd3ad72e58ece7103bfb11559~PFYFrqtT80266802668epoutp01W for ; Thu, 29 Jan 2026 03:20:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20260129032024epoutp01d92f26afd3ad72e58ece7103bfb11559~PFYFrqtT80266802668epoutp01W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1769656824; bh=qi/SRWVOW0xIZ/a8mTLL5M3ulFk+K1NrsEeMRhZKiBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SJh2ndmI1dSqA1eSAKKjODdFHXIlKgPMRHj5o+sXtxghkdnBpWlJ9UwrYoBlPyEnv GkpLHlADSw2dwK3joLiZ6HDy2RnVyxjFtn81eDasUI2JLA88jvrApDWjj+Y2UueXC4 QP9L6aLktS9B9GIzSgCxqn/LIUW07HD6Wcq5EvcE= Received: from epsnrtp01.localdomain (unknown [182.195.42.153]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPS id 20260129032023epcas5p2ee4435a7037ee12befc694ace1a570d7~PFYFWd6_z2717327173epcas5p2G; Thu, 29 Jan 2026 03:20:23 +0000 (GMT) Received: from epcas5p1.samsung.com (unknown [182.195.38.95]) by epsnrtp01.localdomain (Postfix) with ESMTP id 4f1ksx73dTz6B9m4; Thu, 29 Jan 2026 03:20:21 +0000 (GMT) Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20260129031040epcas5p1446e3f496de82836acdf78a400e6b116~PFPlx-9-l1290312903epcas5p15; Thu, 29 Jan 2026 03:10:40 +0000 (GMT) Received: from testpc12933.samsungds.net (unknown [109.105.129.33]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260129031039epsmtip14f9cbc0f17ada1fa045d80d07f079a2e~PFPksbWuw0450604506epsmtip1N; Thu, 29 Jan 2026 03:10:38 +0000 (GMT) From: "zheng.gong" To: linux-scsi@vger.kernel.org Cc: avri.altman@wdc.com, bvanassche@acm.org, quic_cang@quicinc.com, alim.akhtar@samsung.com, martin.petersen@oracle.com, ebiggers@kernel.org, linux-kernel@vger.kernel.org, "zheng.gong" Subject: [PATCH v4 1/3] scsi: ufs: crypto: Add ufs_hba_variant_ops::crypto_keyslot_remap Date: Thu, 29 Jan 2026 11:10:31 +0800 Message-ID: <20260129031033.3428295-2-zheng.gong@samsung.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260129031033.3428295-1-zheng.gong@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260129031040epcas5p1446e3f496de82836acdf78a400e6b116 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P cpgsPolicy: CPGSC10-505,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260129031040epcas5p1446e3f496de82836acdf78a400e6b116 References: <20251112031035.GA2832160@google.com> <20260129031033.3428295-1-zheng.gong@samsung.com> Add a new variant operation crypto_keyslot_remap to allow platform-specific remapping of crypto keyslot indices before sending requests to the UFS controller. This is required on platforms that partition the UFS crypto engine's keyslots among multiple domains (e.g.virtual machines), where each domain has a keyslot offset. To support this, pass the UFS HBA pointer to ufshcd_prepare_lrbp_crypto(), so the callback can access platform context. This functionality is used on Samsung ExynosAuto UFS platforms, where keyslot allocation is per-VM and a runtime offset is applied based on the VM ID. Signed-off-by: zheng.gong --- drivers/ufs/core/ufshcd-crypto.h | 10 ++++++++-- drivers/ufs/core/ufshcd.c | 9 +++++---- include/ufs/ufshcd.h | 6 ++++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/ufs/core/ufshcd-crypto.h b/drivers/ufs/core/ufshcd-cry= pto.h index 89bb97c14c15..6dcba6817590 100644 --- a/drivers/ufs/core/ufshcd-crypto.h +++ b/drivers/ufs/core/ufshcd-crypto.h @@ -13,7 +13,8 @@ =20 #ifdef CONFIG_SCSI_UFS_CRYPTO =20 -static inline void ufshcd_prepare_lrbp_crypto(struct request *rq, +static inline void ufshcd_prepare_lrbp_crypto(struct ufs_hba *hba, + struct request *rq, struct ufshcd_lrb *lrbp) { if (!rq || !rq->crypt_keyslot) { @@ -22,6 +23,10 @@ static inline void ufshcd_prepare_lrbp_crypto(struct req= uest *rq, } =20 lrbp->crypto_key_slot =3D blk_crypto_keyslot_index(rq->crypt_keyslot); + + if (hba && hba->vops && hba->vops->crypto_keyslot_remap) + return hba->vops->crypto_keyslot_remap(hba, lrbp); + lrbp->data_unit_num =3D rq->crypt_ctx->bc_dun[0]; } =20 @@ -74,7 +79,8 @@ void ufshcd_crypto_register(struct ufs_hba *hba, struct r= equest_queue *q); =20 #else /* CONFIG_SCSI_UFS_CRYPTO */ =20 -static inline void ufshcd_prepare_lrbp_crypto(struct request *rq, +static inline void ufshcd_prepare_lrbp_crypto(struct ufs_hba *hba, + struct request *rq, struct ufshcd_lrb *lrbp) { } =20 static inline void diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 8339fec975b9..7417c6bec81a 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -2902,20 +2902,21 @@ static void ufshcd_comp_scsi_upiu(struct ufs_hba *h= ba, struct ufshcd_lrb *lrbp) ufshcd_prepare_utp_scsi_cmd_upiu(lrbp, upiu_flags); } =20 -static void __ufshcd_setup_cmd(struct ufshcd_lrb *lrbp, struct scsi_cmnd *= cmd, u8 lun, int tag) +static void __ufshcd_setup_cmd(struct ufs_hba *hba, struct ufshcd_lrb *lrb= p, + struct scsi_cmnd *cmd, u8 lun, int tag) { memset(lrbp->ucd_req_ptr, 0, sizeof(*lrbp->ucd_req_ptr)); =20 lrbp->cmd =3D cmd; lrbp->task_tag =3D tag; lrbp->lun =3D lun; - ufshcd_prepare_lrbp_crypto(cmd ? scsi_cmd_to_rq(cmd) : NULL, lrbp); + ufshcd_prepare_lrbp_crypto(hba, cmd ? scsi_cmd_to_rq(cmd) : NULL, lrbp); } =20 static void ufshcd_setup_scsi_cmd(struct ufs_hba *hba, struct ufshcd_lrb *= lrbp, struct scsi_cmnd *cmd, u8 lun, int tag) { - __ufshcd_setup_cmd(lrbp, cmd, lun, tag); + __ufshcd_setup_cmd(hba, lrbp, cmd, lun, tag); lrbp->intr_cmd =3D !ufshcd_is_intr_aggr_allowed(hba); lrbp->req_abort_skip =3D false; =20 @@ -3083,7 +3084,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host= , struct scsi_cmnd *cmd) static void ufshcd_setup_dev_cmd(struct ufs_hba *hba, struct ufshcd_lrb *l= rbp, enum dev_cmd_type cmd_type, u8 lun, int tag) { - __ufshcd_setup_cmd(lrbp, NULL, lun, tag); + __ufshcd_setup_cmd(hba, lrbp, NULL, lun, tag); lrbp->intr_cmd =3D true; /* No interrupt aggregation */ hba->dev_cmd.type =3D cmd_type; } diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index 9425cfd9d00e..86b7bcc1da33 100644 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -336,6 +336,10 @@ struct ufs_pwr_mode_info { * @config_esi: called to config Event Specific Interrupt * @config_scsi_dev: called to configure SCSI device parameters * @freq_to_gear_speed: called to map clock frequency to the max supported= gear speed + * @crypto_keyslot_remap: called to adjust the keyslot index before sending + * a request to the UFS controller. This allows the platform to apply a + * hardware-specific keyslot offset or other mapping logic to determine + * the correct keyslot for inline encryption. */ struct ufs_hba_variant_ops { const char *name; @@ -385,6 +389,8 @@ struct ufs_hba_variant_ops { int (*config_esi)(struct ufs_hba *hba); void (*config_scsi_dev)(struct scsi_device *sdev); u32 (*freq_to_gear_speed)(struct ufs_hba *hba, unsigned long freq); + void (*crypto_keyslot_remap)(struct ufs_hba *hba, + struct ufshcd_lrb *lrbp); }; =20 /* clock gating state */ --=20 2.50.1 From nobody Mon Feb 9 09:46:41 2026 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A04934CFC2 for ; Thu, 29 Jan 2026 03:20:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769656830; cv=none; b=nQCvCaDzc9KHZL8Yo+Q1SK8GVLxVYctZYoKYBrGXg7SL/HLj/faj/d3P8ma5DohS48AfXpsaCGY10PuckafVZ6+IsxAuY5TUjM8UNi80bMptvUZCbeW/iYaUezZ1RsG8yCXP+uzh43ACqTIx3CiAX2sTJzvHxEGhJ4GYfQ4I04U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769656830; c=relaxed/simple; bh=1Ii7V88DAH2WXmP8Gyx8c+QC52EAWiHFOqy2t8sbY8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=YYRSw9HLaOQkBMOb6djWfpUjwRQz7vPVt8zzrpVgyYJDTWvCh0I/wbuzbnF44mSA7ZdCVrtJinZPsgaKEryg3Bt1TyqCcVNMbCqEl15jO8T26sEIKXCcCqMKmpYJG45VpoOQFaPWVAWzVVtul4POYaojEFfMxtetDZt+6G6TjmY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=Y2Id7XJm; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="Y2Id7XJm" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20260129032026epoutp0474bd90094bb6509e027378955aa78998~PFYIOWeVs0352303523epoutp04d for ; Thu, 29 Jan 2026 03:20:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20260129032026epoutp0474bd90094bb6509e027378955aa78998~PFYIOWeVs0352303523epoutp04d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1769656826; bh=+zoEUws75av8unKfrjyl9GLv3I0yHKz+75I7bVXnS9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y2Id7XJmYlIgASjDRF7jF1ZHpSUcsMSv2KmLPdmFeUUnzuMkvQ3Rnjh9Osy4oxuZ1 KpxW3zGWU3oDXMH+IdavbaHWUQssB7g7Zy9bTPj8mN3S1RuvCD7kDEp6O4Mz5RE3qa OYxHU60P+8eU2NQG5aCKj7qzFfFYRaHjBNecCPu8= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260129032026epcas5p1f04820c0786365a8321feefcb12341cd~PFYH76uFg0140301403epcas5p1l; Thu, 29 Jan 2026 03:20:26 +0000 (GMT) Received: from epcas5p4.samsung.com (unknown [182.195.38.93]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4f1kt14CYBz3hhTF; Thu, 29 Jan 2026 03:20:25 +0000 (GMT) Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20260129031043epcas5p36dc864415f55b44ededa232c17d33f39~PFPpQmO-_1803918039epcas5p3X; Thu, 29 Jan 2026 03:10:43 +0000 (GMT) Received: from testpc12933.samsungds.net (unknown [109.105.129.33]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260129031042epsmtip1e2d533838c079fa2d219495b248bf3c4~PFPoHds3H0411304113epsmtip1v; Thu, 29 Jan 2026 03:10:42 +0000 (GMT) From: "zheng.gong" To: linux-scsi@vger.kernel.org Cc: avri.altman@wdc.com, bvanassche@acm.org, quic_cang@quicinc.com, alim.akhtar@samsung.com, martin.petersen@oracle.com, ebiggers@kernel.org, linux-kernel@vger.kernel.org, "zheng.gong" Subject: [PATCH v4 2/3] scsi: ufs: exynos: Support crypto keyslot remapping via DT Date: Thu, 29 Jan 2026 11:10:32 +0800 Message-ID: <20260129031033.3428295-3-zheng.gong@samsung.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260129031033.3428295-1-zheng.gong@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260129031043epcas5p36dc864415f55b44ededa232c17d33f39 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P cpgsPolicy: CPGSC10-505,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260129031043epcas5p36dc864415f55b44ededa232c17d33f39 References: <20251112031035.GA2832160@google.com> <20260129031033.3428295-1-zheng.gong@samsung.com> Add support for crypto keyslot remapping in the exynos UFS driver using the device tree property 'ufs-keyslot-offset'. This allows platforms to apply a fixed offset to the logical keyslot, enabling secure inline encryption in virtualized or multi-domain environments. The implementation is generic and optional which only active if the DT property is present. Signed-off-by: zheng.gong --- drivers/ufs/host/ufs-exynos.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 70d195179eba..dc63900ebbee 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1437,6 +1437,19 @@ static int exynos_ufs_fmp_fill_prdt(struct ufs_hba *= hba, return 0; } =20 +static void exynos_ufs_fmp_crypto_keyslot_remap(struct ufs_hba *hba, + struct ufshcd_lrb *lrbp) +{ + struct device_node *np =3D hba->dev->of_node; + u32 offset; + + /* If dt property is not present, use identity mapping still.*/ + if (of_property_read_u32(np, "ufs-keyslot-offset", &offset) =3D=3D 0) { + if (lrbp->crypto_key_slot >=3D 0) + lrbp->crypto_key_slot +=3D offset; + } +} + #else /* CONFIG_SCSI_UFS_CRYPTO */ =20 static void exynos_ufs_fmp_init(struct ufs_hba *hba, struct exynos_ufs *uf= s) @@ -1449,6 +1462,8 @@ static void exynos_ufs_fmp_resume(struct ufs_hba *hba) =20 #define exynos_ufs_fmp_fill_prdt NULL =20 +#define exynos_ufs_fmp_crypto_keyslot_remap NULL + #endif /* !CONFIG_SCSI_UFS_CRYPTO */ =20 static int exynos_ufs_init(struct ufs_hba *hba) @@ -2013,6 +2028,7 @@ static const struct ufs_hba_variant_ops ufs_hba_exyno= s_ops =3D { .suspend =3D exynos_ufs_suspend, .resume =3D exynos_ufs_resume, .fill_crypto_prdt =3D exynos_ufs_fmp_fill_prdt, + .crypto_keyslot_remap =3D exynos_ufs_fmp_crypto_keyslot_remap, }; =20 static struct ufs_hba_variant_ops ufs_hba_exynosauto_vh_ops =3D { --=20 2.50.1 From nobody Mon Feb 9 09:46:41 2026 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 735753590AF for ; Thu, 29 Jan 2026 03:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769656833; cv=none; b=ppqC8llYuMJN/D9E8mjcLFovivAHQu/Z5gqFLZlkFAlOJ3fjZijcCn4hNPKoWYqyqpOsD5jRR4bdVOS+y5bC2ilH3YyrB68Hs3vRn1dF3/EwUs5mtEvMLhVrCBFuGPPMiT3fU7t56Em623n3fEjb3NlXkwUgM+cdWzlSkr7/gPk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769656833; c=relaxed/simple; bh=r1zZE+GFEgHS9vmoV/VN0hnRqc/Nv5C4HJKaBSOzL68=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=q7LoVcHCKz6umr5sWu77z9P84ZeBAlTIhhOTgeB/DdMy+OUiVD05OkYqE2XCn/FDIl4DA3xf3kwA+zAgyDq71KbP0Q7TE/n4teuwIlgz+LvYMlclNQEidKukpwneVqTzai+bA/S+Nv2sNG0HQHxFWzknq6ZgxWnVNoMSaWU/Cag= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=r4rWb7WG; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="r4rWb7WG" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20260129032029epoutp013af30adb65ee6e81afebf2d5a609fe16~PFYLBZosP0277302773epoutp01Q for ; Thu, 29 Jan 2026 03:20:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20260129032029epoutp013af30adb65ee6e81afebf2d5a609fe16~PFYLBZosP0277302773epoutp01Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1769656829; bh=BKwBvGTDSaYD6Jv5WgtOt+tOGgb83G4qiTZTJ/o76pY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r4rWb7WGRtPCqvefkoqhq9MAWlA1zA8PMI70ORtX7Iw0PmncQ3+mNlbrpL80vvsmx 6qtHFeFBa2QA5TmjhuUEBE+0OAeAbfFUHzwAFvpam4Se06ISJ/I5DjGoy217AlWcrl itwqE9u+G+vr2jzaKQZs04VOd3Gdv5nXo7PaKmg4= Received: from epsnrtp02.localdomain (unknown [182.195.42.154]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPS id 20260129032029epcas5p4f70191b8b27d31e1e31b0698609fe213~PFYKrbDwq0559805598epcas5p4O; Thu, 29 Jan 2026 03:20:29 +0000 (GMT) Received: from epcas5p2.samsung.com (unknown [182.195.38.92]) by epsnrtp02.localdomain (Postfix) with ESMTP id 4f1kt449Kmz2SSKf; Thu, 29 Jan 2026 03:20:28 +0000 (GMT) Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20260129031046epcas5p2e13b31bc0b4c47b82020e08c45cb32ca~PFPrwIEEu2896328963epcas5p2M; Thu, 29 Jan 2026 03:10:46 +0000 (GMT) Received: from testpc12933.samsungds.net (unknown [109.105.129.33]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260129031045epsmtip17448d004f7400b2b0da9061c72d99843~PFPqw-bZV0450604506epsmtip1S; Thu, 29 Jan 2026 03:10:45 +0000 (GMT) From: "zheng.gong" To: linux-scsi@vger.kernel.org Cc: avri.altman@wdc.com, bvanassche@acm.org, quic_cang@quicinc.com, alim.akhtar@samsung.com, martin.petersen@oracle.com, ebiggers@kernel.org, linux-kernel@vger.kernel.org, "zheng.gong" Subject: [PATCH v4 3/3] dt-bindings: ufs: Add binding for ufs-keyslot-offset Date: Thu, 29 Jan 2026 11:10:33 +0800 Message-ID: <20260129031033.3428295-4-zheng.gong@samsung.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260129031033.3428295-1-zheng.gong@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CMS-MailID: 20260129031046epcas5p2e13b31bc0b4c47b82020e08c45cb32ca X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P cpgsPolicy: CPGSC10-505,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260129031046epcas5p2e13b31bc0b4c47b82020e08c45cb32ca References: <20251112031035.GA2832160@google.com> <20260129031033.3428295-1-zheng.gong@samsung.com> Document the new 'ufs-keyslot-offset' dt property used to configure a fixed offset for crypto keyslot remapping in UFS host controllers. This is useful in virtualized or multi-domain environments where keyslot layout is partitioned (e.g., per-VM isolation). If the property is not present, the keyslot is used as-is (identity mapping). The binding is used by the exynos UFS driver to support secure inline encryption in domain-isolated scenarios. Signed-off-by: zheng.gong --- .../devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml = b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml index b4e744ebffd1..0ed60bbd959e 100644 --- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml @@ -72,6 +72,11 @@ properties: =20 dma-coherent: true =20 + ufs-keyslot-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Offset added to logical crypto keyslot for multi-domain isolation. + required: - compatible - reg --=20 2.50.1