[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260129074247.GA89457@sol>
Date: Wed, 28 Jan 2026 23:42:47 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: "zheng.gong" <zheng.gong@...sung.com>
Cc: linux-scsi@...r.kernel.org, avri.altman@....com, bvanassche@....org,
quic_cang@...cinc.com, alim.akhtar@...sung.com,
martin.petersen@...cle.com, linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH v4 0/3] scsi: ufs: Add crypto_keyslot_remap support
On Thu, Jan 29, 2026 at 02:17:58PM +0800, zheng.gong wrote:
> Hi Eric,
>
> Thank you for ur kind question. I understand your concern.
> the confusion arises from the coexistence of two different UFS drivers on Exynos platforms.
>
> There are two distinct UFS host controller implementations on Samsung Exynos:
> - ufs-exynos.c
> - ufs-exynosautovX.c
>
> But ufs-exynosautovX is not mainlined, which:
> - Uses a hardware crypto engine that does support keyslots
> - Assigns keyslots to VMs (e.g., QNX, Linux, Android)
> - Needs to remap logical keyslot + VM-specific offset at request time
>
> We added a minimal, DT-based remap in ufs-exynos.c not because mobile uses it, but to:
> - Prove that the hook has a real, upstream-mergeable use pattern
> - Show that the mechanism can be used by actual platform
>
> It is a generic, not tied to one usecase.
>
> As for how we use it in our platform.
>
> In our driver, we implement as like:
>
> void exynos_ufs_fmp_crypto_keyslot_remap(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> {
> struct exynosauto_ufs *ufs = to_exynosauto_ufs(hba);
> u32 vm_id = ufs->iov->vm_id;
> u32 offset = vm_id * UFS_KEYSLOTS;
>
> if (lrbp->crypto_key_slot >= 0)
> lrbp->crypto_key_slot += offset;
> }
>
> We have tested this on ExynosAuto V920 platform with:
> 4 virtual machines: QNX, Linux, Linux, Android.
> Each VM has its own UFS VH and keyslot range as per allocation.
> Inline encryption is enabled for all VMs. offset is configured in dt for each VH node.
>
> Despite driver resides in our out-of-tree exynosauto-modules and cannot be upstreamed easily,
> but the use case is real and actively used in production platform.
>
> To help move this forward, could you please let us know what additional
> information or changes would be needed to make this patch acceptable?
>
> If it is not plausible for mainline, do u have any suggestion in terms of this kind of case?
Well, you should start working on upstreaming support for the platform
that needs this feature.
Until that is done, this patch series won't go anywhere.
- Eric
Powered by blists - more mailing lists