Thread (51 messages) 51 messages, 7 authors, 2020-11-11

Re: [PATCH v7 18/24] iommu/arm-smmu-v3: Add support for Hardware Translation Table Update

From: Jean-Philippe Brucker <hidden>
Date: 2020-09-16 14:11:52
Also in: linux-arm-kernel, linux-iommu, linux-mm, linux-pci

On Fri, Aug 28, 2020 at 05:28:22PM +0800, Zenghui Yu wrote:
On 2020/5/20 1:54, Jean-Philippe Brucker wrote:
quoted
@@ -4454,6 +4470,12 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
  			smmu->features |= ARM_SMMU_FEAT_E2H;
  	}
+	if (reg & (IDR0_HA | IDR0_HD)) {
+		smmu->features |= ARM_SMMU_FEAT_HA;
+		if (reg & IDR0_HD)
+			smmu->features |= ARM_SMMU_FEAT_HD;
+	}
+
nitpick:

As per the IORT spec (DEN0049D, 3.1.1.2 SMMUv3 node, Table 10), the
"HTTU Override" flag of the SMMUv3 node can override the value in
SMMU_IDR0.HTTU. You may want to check this bit before selecting the
{HA,HD} features and shout if there is a mismatch between firmware and
the SMMU implementation. Just like how ARM_SMMU_FEAT_COHERENCY is
selected.
Thanks for pointing this out, I didn't know about these flags but have
added them to the patch now.

Thanks,
Jean
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help