Skip to content

Deny unbinds if user fence pending

Mika Kuoppala intel-xe 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe: Expose user fence from xe_sync_entrydrivers/gpu/drm/xe/xe_sync.c drivers/gpu/drm/xe/xe_sync.h drivers/gpu/drm/xe/xe_sync_types.h+53 -110 replies
2/2drm/xe: Deny unbinds if uapi ufence pendingdrivers/gpu/drm/xe/xe_vm.c drivers/gpu/drm/xe/xe_vm_types.h+44 -01 reply

Reviews trailers per patch

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

PatchMatthew Brost
1/2R-b
2/2R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/2] Deny unbinds if user fence pending

If we ever want to intercept OP_MAP through user fence, we need to make sure that sequences of OP_MAP and OP_UNMAP can be tracked without them coalescing and thus vanishing.

Enforce vm_bind_ioctl by enforcing wait on associated user fences on bind, before unbinding: If there is non signalled user fence pending when the unmap is attempted, deny it with -EBUSY.

[1] states that -EINVAL should be returned if the ufence was part of the previous OP_MAP inside this ioctl. This can be added if there is need to distinguish these apart. This series returns -EBUSY regardless if the OP_MAP was part of this or previous ioctl.

[1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1159

Cc: Thomas Hellström <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Joonas Lahtinen <[email protected]> Mika Kuoppala (2):
drm/xe: Expose user fence from xe_sync_entry drm/xe: Deny unbinds if uapi ufence pending

 drivers/gpu/drm/xe/xe_sync.c       | 58 ++++++++++++++++++++++++------
 drivers/gpu/drm/xe/xe_sync.h       |  4 +++
 drivers/gpu/drm/xe/xe_sync_types.h |  2 +-
 drivers/gpu/drm/xe/xe_vm.c         | 37 +++++++++++++++++++
 drivers/gpu/drm/xe/xe_vm_types.h   |  7 ++++
 5 files changed, 97 insertions(+), 11 deletions(-)
Signature · 1 line
2.34.1