[PATCH v4 0/3] Add configfs support for survivability mode

Riana Tauro riana.tauro at intel.com
Mon Apr 7 05:14:10 UTC 2025


Add configfs support for survivability mode

This series proposes to expose attributes via xe configfs
subsystem. Xe registers a configfs subsystem named 'xe' which
creates a directory under configfs. Userspace can then create 
directories for the devices they want to configure and 
set appropriate attributes

This is done by

mkdir /sys/kernel/config/xe/0000:03:00.0

echo 1 > sys/kernel/config/xe/0000:03:00.0/survivability_mode
echo 0000:03:00.0 > /sys/bus/pci/drivers/xe/bind

This is an alternative to introducing module param that causes
all the connected and supported GPU cards to enter survivability mode.
Manually entering survivability mode is useful when pcode does not
report failure, in field repairs and validation

Rev2: use config_groups (Lucas)
Rev3: fix review comments and kernel-docs (Lucas, Rodrigo)
Rev4: fix kernel-doc (Lucas)

Riana Tauro (3):
  drm/xe: Add configfs to enable survivability mode
  drm/xe: Add documentation for survivability mode
  drm/xe: Enable configfs support for survivability mode

 Documentation/gpu/xe/index.rst             |   1 +
 Documentation/gpu/xe/xe_configfs.rst       |  10 +
 Documentation/gpu/xe/xe_pcode.rst          |   7 +
 drivers/gpu/drm/xe/Makefile                |   1 +
 drivers/gpu/drm/xe/xe_configfs.c           | 250 +++++++++++++++++++++
 drivers/gpu/drm/xe/xe_configfs.h           |  24 ++
 drivers/gpu/drm/xe/xe_device.c             |   2 +-
 drivers/gpu/drm/xe/xe_module.c             |   5 +
 drivers/gpu/drm/xe/xe_pci.c                |  19 +-
 drivers/gpu/drm/xe/xe_survivability_mode.c |  69 ++++--
 drivers/gpu/drm/xe/xe_survivability_mode.h |   1 +
 11 files changed, 359 insertions(+), 30 deletions(-)
 create mode 100644 Documentation/gpu/xe/xe_configfs.rst
 create mode 100644 drivers/gpu/drm/xe/xe_configfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_configfs.h

-- 
2.47.1



More information about the Intel-xe mailing list