arm,smmu: backport "Disable stalling faults for all endpoints"
authorStefano Stabellini <stefanos@xilinx.com>
Sun, 14 Oct 2018 22:57:32 +0000 (15:57 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 29 Oct 2018 21:24:28 +0000 (14:24 -0700)
commitce75973a273f6cacce2b2b8ace1d3ab4b304c361
treefabf466247873ddb6716769672a67d223fdb391d
parentdafd936dddbd7978d4131275ad1112f64457bf64
arm,smmu: backport "Disable stalling faults for all endpoints"

Backport commit 3714ce1d6655098ee69ede632883e5874d67e4ab
"iommu/arm-smmu: Disable stalling faults for all endpoints" from the
Linux kernel. This works-around Erratum #842869.

Original commit message:

  Enabling stalling faults can result in hardware deadlock on poorly
  designed systems, particularly those with a PCI root complex upstream of
  the SMMU.

  Although it's not really Linux's job to save hardware integrators from
  their own misfortune, it *is* our job to stop userspace (e.g. VFIO
  clients) from hosing the system for everybody else, even if they might
  already be required to have elevated privileges.

  Given that the fault handling code currently executes entirely in IRQ
  context, there is nothing that can sensibly be done to recover from
  things like page faults anyway, so let's rip this code out for now and
  avoid the potential for deadlock.

Cc: <stable@vger.kernel.org>
Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices")
Reported-by: Matt Evans <matt.evans@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Acked-by: Julien Grall <julien.grall@arm.com>
docs/misc/arm/silicon-errata.txt
xen/drivers/passthrough/arm/smmu.c