From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Mika Kuoppala" <mika.kuoppala@linux.intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>
Subject: [PATCH 0/2] Deny unbinds if user fence pending
Date: Thu, 15 Feb 2024 18:40:19 +0200 [thread overview]
Message-ID: <20240215164021.438913-1-mika.kuoppala@linux.intel.com> (raw)
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 <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
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 | 56 +++++++++++++++++++++++++-----
drivers/gpu/drm/xe/xe_sync.h | 4 +++
drivers/gpu/drm/xe/xe_sync_types.h | 2 +-
drivers/gpu/drm/xe/xe_vm.c | 35 +++++++++++++++++++
drivers/gpu/drm/xe/xe_vm_types.h | 7 ++++
5 files changed, 94 insertions(+), 10 deletions(-)
--
2.34.1
next reply other threads:[~2024-02-15 16:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 16:40 Mika Kuoppala [this message]
2024-02-15 16:40 ` [PATCH 1/2] drm/xe: Expose user fence from xe_sync_entry Mika Kuoppala
2024-02-15 17:13 ` Matthew Brost
2024-02-15 16:40 ` [PATCH 2/2] drm/xe: Deny unbinds if uapi ufence pending Mika Kuoppala
2024-02-15 17:21 ` Matthew Brost
2024-02-15 16:48 ` ✓ CI.Patch_applied: success for Deny unbinds if user fence pending Patchwork
2024-02-15 16:49 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-15 16:50 ` ✓ CI.KUnit: success " Patchwork
2024-02-15 17:00 ` ✓ CI.Build: " Patchwork
2024-02-15 17:00 ` ✓ CI.Hooks: " Patchwork
2024-02-15 17:02 ` ✓ CI.checksparse: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240215164021.438913-1-mika.kuoppala@linux.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox