]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel
authorWill Deacon <will.deacon@arm.com>
Mon, 3 Jun 2019 21:16:00 +0000 (23:16 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 12:18:49 +0000 (14:18 +0200)
commit1fbb3eb2ccfcffe8499f7eae91fa1921277d7b46
tree0cdee4599d783e6562e6d5824cc34c052bc0fb5f
parenta6a630413508f6dbb642eecc4ef7f2c6a833af14
iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel

BugLink: https://bugs.launchpad.net/bugs/1828868
If we find that the SMMU is enabled during probe, we reset it by
re-initialising its registers and either enabling translation or placing
it into bypass based on the disable_bypass commandline option.

In the case of a kdump kernel, the SMMU won't have been shutdown cleanly
by the previous kernel and there may be concurrent DMA through the SMMU.
Rather than reset the SMMU to bypass, which would likely lead to rampant
data corruption, we can instead configure the SMMU to abort all incoming
transactions when we find that it is enabled from within a kdump kernel.

Reported-by: Sameer Goel <sgoel@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(backported from commit b63b3439b85609338e4faabd5d2588dbda137e5c)
[ dannf: trivial offset adjustment in #include section ]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/iommu/arm-smmu-v3.c