Skip to content

drm/ttm, amdgpu: fix crashes due to shadow page table evictions

Nicolai Hähnle amd-gfx dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/ttm: add evict parameter to ttm_bo_driver::move_notifydrivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/amd/amdgpu/amdgpu_object.h drivers/gpu/drm/nouveau/nouveau_bo.c +7 more+22 -83 replies
2/5drm/amd/amdgpu: move eviction counting to amdgpu_bo_move_notifydrivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+4 -41 reply
3/5drm/amd/amdgpu: add amdgpu_bo_gpu_accessible helper functiondrivers/gpu/drm/amd/amdgpu/amdgpu_object.h+9 -01 reply
4/5drm/amd/amdgpu: add check that shadow page directory is GPU-accessibledrivers/gpu/drm/amd/amdgpu/amdgpu_gem.c+8 -31 reply
5/5drm/amd/amdgpu: add check that shadow page tables are GPU-accessibledrivers/gpu/drm/amd/amdgpu/amdgpu_gem.c+6 -33 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchChunming Zhou
1/5A-b
2/5A-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] drm/ttm, amdgpu: fix crashes due to shadow page table evictions

Fix a bunch of related crashes in amdgpu that occur when shadow page tables are kicked out of the GART.

One of the issues was that during command submission, we rely on a device-global evictions counter to skip some of the work of page-table validation. The driver was never informed of evictions from GART, so this series adds an evict parameter to ttm_bo_driver::move_notify.

There's still the evict parameter on ttm_bo_driver::move which is used by radeon and nouveau for the call to ttm_bo_move_accel_cleanup. The 'evict' parameter there should probably be more accurately called 'wait', but unless that wait can always be avoided, the evict parameter on ttm_bo_driver::move needs to stay.

Please review!
Nicolai

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c    | 20 ++++++++++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |  5 +++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 12 +++++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c    |  4 ----
 drivers/gpu/drm/nouveau/nouveau_bo.c       |  3 ++-
 drivers/gpu/drm/qxl/qxl_ttm.c              |  1 +
 drivers/gpu/drm/radeon/radeon_object.c     |  1 +
 drivers/gpu/drm/radeon/radeon_object.h     |  1 +
 drivers/gpu/drm/ttm/ttm_bo.c               |  8 ++++----
 drivers/gpu/drm/virtio/virtgpu_ttm.c       |  1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c     |  1 +
 include/drm/ttm/ttm_bo_driver.h            | 10 ++++++++--
 12 files changed, 49 insertions(+), 18 deletions(-)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx