Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/4] xe: watch queue event support and VM restart recovery
@ 2026-06-12 11:06 Thomas Hellström
  2026-06-12 11:06 ` [PATCH i-g-t 1/4] lib/xe: add xe_vm_restart ioctl helper Thomas Hellström
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Thomas Hellström @ 2026-06-12 11:06 UTC (permalink / raw)
  To: igt-dev
  Cc: Thomas Hellström, Matthew Brost, Maarten Lankhorst,
	Michal Mrozek, John Falkowski, Rodrigo Vivi, Lahtinen Joonas

This series adds IGT support for two new Xe kernel interfaces: the watch
queue event notification mechanism and the VM restart IOCTL.

The watch queue allows a userspace process to subscribe to device-scoped
events delivered through a pipe — notably VM errors caused by memory
pressure.  The VM restart IOCTL lets userspace synchronously trigger a
re-run of the preempt-rebind worker to recover a VM after such an error.

Together they enable a fault-tolerance loop: a listener thread receives
VM error events carrying an error code and VM id; when the error is
-ENOMEM or -ENOSPC the test can immediately attempt to restart the
affected VM rather than letting it stay faulted.

The xe_exec_compute_mode test is extended to demonstrate this: it
subscribes to file events at fixture time, logs all notifications, and
automatically calls VM restart on memory-pressure errors.

Thomas Hellström (4):
  lib/xe: add xe_vm_restart ioctl helper
  lib/xe: add xe_watch listener for watch queue events
  tests/intel/xe_exec_compute_mode: Add a listener for file events
  tests/intel/xe_exec_compute_mode: Restart VM on ENOMEM/ENOSPC errors

 include/drm-uapi/xe_drm.h          |  84 +++++++++++
 include/drm-uapi/xe_drm_events.h   |  71 +++++++++
 lib/meson.build                    |   1 +
 lib/xe/xe_ioctl.c                  |  44 ++++++
 lib/xe/xe_ioctl.h                  |   2 +
 lib/xe/xe_watch.c                  | 221 +++++++++++++++++++++++++++++
 lib/xe/xe_watch.h                  |  80 +++++++++++
 tests/intel/xe_exec_compute_mode.c |  92 +++++++++++-
 8 files changed, 591 insertions(+), 4 deletions(-)
 create mode 100644 include/drm-uapi/xe_drm_events.h
 create mode 100644 lib/xe/xe_watch.c
 create mode 100644 lib/xe/xe_watch.h

-- 
2.54.0


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

end of thread, other threads:[~2026-06-12 14:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 11:06 [PATCH i-g-t 0/4] xe: watch queue event support and VM restart recovery Thomas Hellström
2026-06-12 11:06 ` [PATCH i-g-t 1/4] lib/xe: add xe_vm_restart ioctl helper Thomas Hellström
2026-06-12 14:38   ` Kamil Konieczny
2026-06-12 11:06 ` [PATCH i-g-t 2/4] lib/xe: add xe_watch listener for watch queue events Thomas Hellström
2026-06-12 11:06 ` [PATCH i-g-t 3/4] tests/intel/xe_exec_compute_mode: Add a listener for file events Thomas Hellström
2026-06-12 11:06 ` [PATCH i-g-t 4/4] tests/intel/xe_exec_compute_mode: Restart VM on ENOMEM/ENOSPC errors Thomas Hellström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox