]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu-v3: Ensure we sync STE when only changing config field
authorWill Deacon <will.deacon@arm.com>
Thu, 5 Oct 2017 15:49:37 +0000 (16:49 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 20 Oct 2017 15:54:54 +0000 (16:54 +0100)
commite29f6caa832b23ec9c9c8103e4dd8d10a6632acf
tree3fad49b1b7f2997b08071d94e00295a09831f4e5
parentca8a9ec1ad647fb38a5bcbcb4ffdedb1614a018d
iommu/arm-smmu-v3: Ensure we sync STE when only changing config field

The SMMUv3 architecture permits caching of data structures deemed to be
"reachable" by the SMU, which includes STEs marked as invalid. When
transitioning an STE to a bypass/fault configuration at init or detach
time, we mistakenly elide the CMDQ_OP_CFGI_STE operation in some cases,
therefore potentially leaving the old STE state cached in the SMMU.

This patch fixes the problem by ensuring that we perform the
CMDQ_OP_CFGI_STE operation irrespective of the validity of the previous
STE.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reported-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c