Skip to content

io-pgtable-arm + drm/msm: Extend iova fault debugging

Rob Clark dri-devel linux-arm-kernel linux-arm-msm linux-iommu lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iommu/io-pgtable-arm: Add way to debug pgtable walkdrivers/iommu/io-pgtable-arm.c include/linux/io-pgtable.h+41 -81 reply
2/3drm/msm: Show all smmu info for iova fault devcore dumpsdrivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/adreno/adreno_gpu.c drivers/gpu/drm/msm/msm_gpu.h+19 -100 replies
3/3drm/msm: Extend gpu devcore dumps with pgtbl infodrivers/gpu/drm/msm/adreno/adreno_gpu.c drivers/gpu/drm/msm/msm_gpu.c drivers/gpu/drm/msm/msm_gpu.h +2 more+47 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] io-pgtable-arm + drm/msm: Extend iova fault debugging

From: Rob Clark <[email protected]>

This series extends io-pgtable-arm with a method to retrieve the page table entries traversed in the process of address translation, and then beefs up drm/msm gpu devcore dump to include this (and additional info) in the devcore dump.

The motivation is tracking down an obscure iova fault triggered crash on the address of the IB1 cmdstream. This is one of the few places where the GPU address written into the cmdstream is soley under control of the kernel mode driver, so I don't think it can be a userspace bug. The logged cmdstream from the devcore's I've looked at look correct, and the TTBR0 read back from arm-smmu agrees with the kernel emitted cmdstream. Unfortunately it happens infrequently enough (something like once per 1000hrs of usage, from what I can tell from our telemetry) that actually reproducing it with an instrumented debug kernel is not an option. So further spiffying out the devcore dumps and hoping we can spot a clue is the plan I'm shooting for.

See https://gitlab.freedesktop.org/drm/msm/-/issues/8 for more info on the issue I'm trying to debug.

v2: Fix an armv7/32b build error in the last patch

Rob Clark (3):
iommu/io-pgtable-arm: Add way to debug pgtable walk drm/msm: Show all smmu info for iova fault devcore dumps drm/msm: Extend gpu devcore dumps with pgtbl info

 drivers/gpu/drm/msm/adreno/a6xx_gpu.c   |  2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 35 +++++++++++++++++-----
 drivers/gpu/drm/msm/msm_gpu.c           | 10 +++++++
 drivers/gpu/drm/msm/msm_gpu.h           | 10 ++++++-
 drivers/gpu/drm/msm/msm_iommu.c         | 17 +++++++++++
 drivers/gpu/drm/msm/msm_mmu.h           |  2 ++
 drivers/iommu/io-pgtable-arm.c          | 40 ++++++++++++++++++++-----
 include/linux/io-pgtable.h              |  9 ++++++
 8 files changed, 107 insertions(+), 18 deletions(-)
Signature · 1 line
2.31.1