Re: [PATCH] of/device: add blacklist for iommu dma_ops
From: Jordan Crouse
Date: Mon Jun 03 2019 - 10:52:45 EST
> It shouldn't be a problem to hook something else up to the IOMMU
> subsystem. Hopefully it's something that people are going to standardize
> > 3) The automatic attach of DMA domain is also causing a different
> > problem for us on the GPU side, preventing us from supporting per-
> > context pagetables (since we end up with a disagreement about
> > which context bank is used between arm-smmu and the firmware).
> I'm not sure I understand this issue. Is the context bank hard-coded in
> the firmware somehow? Or is it possible to rewrite which one is going to
> be used at runtime? Do you switch out the actual page tables rather than
> the IOMMU domains for context switching?
We have a rather long history on this but the tl;dr is that the GPU microcode
switches the pagetables by rewriting TTBR0 on the fly (since this is
arm-smmu-v2 we have no better option) and yes, unfortunately it is hard coded
to use context bank 0.  is the current patchset to support all this,
including my own take on avoiding the dma-domain (all the cool kids have one).
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project