Skip to content

Commit 8d83252

Browse files
committed
iommu/arm-smmu-v3: Add missing S2FWB feature detection
commit 45e00e3 Author: Aneesh Kumar K.V (Arm) <[email protected]> Date: Tue Apr 8 09:03:51 2025 +0530 iommu/arm-smmu-v3: Add missing S2FWB feature detection Commit 67e4fe3 ("iommu/arm-smmu-v3: Use S2FWB for NESTED domains") introduced S2FWB usage but omitted the corresponding feature detection. As a result, vIOMMU allocation fails on FVP in arm_vsmmu_alloc(), due to the following check: if (!arm_smmu_master_canwbs(master) && !(smmu->features & ARM_SMMU_FEAT_S2FWB)) return ERR_PTR(-EOPNOTSUPP); This patch adds the missing detection logic to prevent allocation failure when S2FWB is supported. Fixes: 67e4fe3 ("iommu/arm-smmu-v3: Use S2FWB for NESTED domains") Signed-off-by: Aneesh Kumar K.V (Arm) <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Nicolin Chen <[email protected]> Reviewed-by: Pranjal Shrivastava <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]> (cherry picked from commit 45e00e3) Signed-off-by: Jerry Snitselaar <[email protected]> Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git JIRA: https://issues.redhat.com/browse/RHEL-89891
1 parent 078871b commit 8d83252

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4429,6 +4429,8 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
44294429
reg = readl_relaxed(smmu->base + ARM_SMMU_IDR3);
44304430
if (FIELD_GET(IDR3_RIL, reg))
44314431
smmu->features |= ARM_SMMU_FEAT_RANGE_INV;
4432+
if (FIELD_GET(IDR3_FWB, reg))
4433+
smmu->features |= ARM_SMMU_FEAT_S2FWB;
44324434

44334435
/* IDR5 */
44344436
reg = readl_relaxed(smmu->base + ARM_SMMU_IDR5);

0 commit comments

Comments
 (0)