linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2
@ 2020-04-09 23:33 Jordan Crouse
  2020-04-09 23:33 ` [PATCH v6 1/5] iommu: Add DOMAIN_ATTR_SPLIT_TABLES Jordan Crouse
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Jordan Crouse @ 2020-04-09 23:33 UTC (permalink / raw)
  To: iommu
  Cc: linux-arm-msm, robin.murphy, will, linux-arm-kernel,
	Abhinav Kumar, Akhil P Oommen, Alexios Zavras, Allison Randal,
	AngeloGioacchino Del Regno, Ben Dooks, Bjorn Andersson,
	Brian Masney, Daniel Vetter, David Airlie, Drew Davenport,
	Enrico Weigelt, Fabio Estevam, Georgi Djakov, Greg Kroah-Hartman,
	Jeffrey Hugo, Joerg Roedel, Joerg Roedel, Rob Clark,
	Sam Ravnborg, Sean Paul, Sharat Masetty, Thomas Gleixner,
	Thomas Zimmermann, Wambui Karuga, Wen Yang, dri-devel, freedreno,
	linux-kernel, tongtiangen, zhengbin

This is another iteration for the split pagetable support based on the
suggestions from Robin and Will [1].

Background: In order to support per-context pagetables the GPU needs to enable
split tables so that we can store global buffers in the TTBR1 space leaving the
GPU free to program the TTBR0 register with the address of a context specific
pagetable.

If the DOMAIN_ATTR_SPLIT_TABLES attribute is set on the domain before attaching,
the context bank assigned to the domain will be programmed to allow translations
in the TTBR1 space. Translations in the TTBR0 region will be disallowed because,
as Robin pointe out, having a un-programmed TTBR0 register is dangerous.

The driver can determine if TTBR1 was successfully programmed by querying
DOMAIN_ATTR_SPLIT_TABLES after attaching. The domain geometry will also be
updated to reflect the virtual address space for the TTBR1 range.

Upcoming changes will allow auxiliary domains to be attached to the device which
will enable and program TTBR0.

This patchset is based on top of linux-next-20200409

Change log:

v6: Cleanups for the arm-smmu TTBR1 patch from Will Deacon
v4: Only program TTBR1 when split pagetables are requested. TTBR0 will be
enabled later when an auxiliary domain is attached
v3: Remove the implementation specific and make split pagetable support
part of the generic configuration

[1] https://lists.linuxfoundation.org/pipermail/iommu/2020-January/041373.html


Jordan Crouse (5):
  iommu: Add DOMAIN_ATTR_SPLIT_TABLES
  iommu/arm-smmu: Add support for TTBR1
  drm/msm: Attach the IOMMU device during initialization
  drm/msm: Refactor address space initialization
  drm/msm/a6xx: Support split pagetables

 drivers/gpu/drm/msm/adreno/a2xx_gpu.c    | 16 ++++++++
 drivers/gpu/drm/msm/adreno/a3xx_gpu.c    |  1 +
 drivers/gpu/drm/msm/adreno/a4xx_gpu.c    |  1 +
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c    |  1 +
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c    | 51 ++++++++++++++++++++++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.c  | 23 ++++++++---
 drivers/gpu/drm/msm/adreno/adreno_gpu.h  |  8 ++++
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c  | 18 +++------
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 18 ++++-----
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c |  4 --
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 18 ++++-----
 drivers/gpu/drm/msm/msm_drv.h            |  8 +---
 drivers/gpu/drm/msm/msm_gem_vma.c        | 36 +++--------------
 drivers/gpu/drm/msm/msm_gpu.c            | 49 +----------------------
 drivers/gpu/drm/msm/msm_gpu.h            |  4 +-
 drivers/gpu/drm/msm/msm_gpummu.c         |  6 ---
 drivers/gpu/drm/msm/msm_iommu.c          | 18 +++++----
 drivers/gpu/drm/msm/msm_mmu.h            |  1 -
 drivers/iommu/arm-smmu.c                 | 48 ++++++++++++++++++----
 drivers/iommu/arm-smmu.h                 | 24 ++++++++---
 include/linux/iommu.h                    |  2 +
 21 files changed, 200 insertions(+), 155 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-06-17 20:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 23:33 [PATCH v6 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2 Jordan Crouse
2020-04-09 23:33 ` [PATCH v6 1/5] iommu: Add DOMAIN_ATTR_SPLIT_TABLES Jordan Crouse
2020-04-09 23:33 ` [PATCH v6 2/5] iommu/arm-smmu: Add support for TTBR1 Jordan Crouse
2020-05-18 14:59   ` Will Deacon
2020-05-20  1:53     ` Jordan Crouse
2020-05-20 12:29       ` Will Deacon
2020-04-09 23:33 ` [PATCH v6 3/5] drm/msm: Attach the IOMMU device during initialization Jordan Crouse
2020-04-09 23:33 ` [PATCH v6 4/5] drm/msm: Refactor address space initialization Jordan Crouse
2020-06-17 20:16   ` Eric Anholt
2020-06-17 20:37     ` Eric Anholt
2020-04-09 23:33 ` [PATCH v6 5/5] drm/msm/a6xx: Support split pagetables Jordan Crouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).