Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Michal Mrozek" <michal.mrozek@intel.com>,
	"John Falkowski" <john.falkowski@intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Lahtinen Joonas" <joonas.lahtinen@intel.com>
Subject: [PATCH i-g-t 0/4] xe: watch queue event support and VM restart recovery
Date: Fri, 12 Jun 2026 13:06:15 +0200	[thread overview]
Message-ID: <20260612110619.103198-1-thomas.hellstrom@linux.intel.com> (raw)

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


             reply	other threads:[~2026-06-12 11:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 11:06 Thomas Hellström [this message]
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

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=20260612110619.103198-1-thomas.hellstrom@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=john.falkowski@intel.com \
    --cc=joonas.lahtinen@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=michal.mrozek@intel.com \
    --cc=rodrigo.vivi@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