From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Sousa, Gustavo" <gustavo.sousa@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Lin, Shuicheng" <shuicheng.lin@intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Roper, Matthew D" <matthew.d.roper@intel.com>,
"Brost, Matthew" <matthew.brost@intel.com>,
"Wajdeczko, Michal" <michal.wajdeczko@intel.com>,
"Nerlige Ramappa, Umesh" <umesh.nerlige.ramappa@intel.com>,
"Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
Subject: Re: [PATCH 1/9] drm/xe: Rename survivability_mode to enable_survivability_mode
Date: Mon, 4 May 2026 14:32:04 +0000 [thread overview]
Message-ID: <b5cccfd551ebb70487e0f2766d838ed4597b2173.camel@intel.com> (raw)
In-Reply-To: <87bjeve215.fsf@intel.com>
On Mon, 2026-05-04 at 10:29 -0300, Gustavo Sousa wrote:
> Stuart Summers <stuart.summers@intel.com> writes:
>
> > Rename the survivability_mode field in struct xe_config_device to
> > enable_survivability_mode to be consistent with the enable_psmi
> > naming
> > convention used for similar boolean config flags.
> >
> > Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> > Assisted-by: Copilot:claude-opus-4.7
> > ---
> > drivers/gpu/drm/xe/xe_configfs.c | 39 +++++++++++-------
> > ----
> > drivers/gpu/drm/xe/xe_configfs.h | 4 +--
> > drivers/gpu/drm/xe/xe_survivability_mode.c | 2 +-
> > 3 files changed, 23 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_configfs.c
> > b/drivers/gpu/drm/xe/xe_configfs.c
> > index 32102600a148..69abc69ec0f3 100644
> > --- a/drivers/gpu/drm/xe/xe_configfs.c
> > +++ b/drivers/gpu/drm/xe/xe_configfs.c
> > @@ -58,7 +58,7 @@
> > * │ └── ...
> > * :
> > * └── 0000:03:00.0
> > - * ├── survivability_mode
> > + * ├── enable_survivability_mode
> > * ├── gt_types_allowed
> > * ├── engines_allowed
> > * └── enable_psmi
> > @@ -79,7 +79,7 @@
> > * Enable survivability mode on supported cards. This setting only
> > takes
> > * effect when probing the device. Example to enable it::
> > *
> > - * # echo 1 >
> > /sys/kernel/config/xe/0000:03:00.0/survivability_mode
> > + * # echo 1 >
> > /sys/kernel/config/xe/0000:03:00.0/enable_survivability_mode
>
> I think we have not documented our configfs structure in the kernel
> ABI
> documentation. Are we supposed to do that? Is that not yet done
> because we do not consider our configfs stable enough to be
> classified
> as proper ABI?
>
> In this example, we would be potentially changing what some would
> call
> ABI, hence my questions above.
Yeah this is something I wanted to discuss here too. I kind of just
blindly alphabetized things here, but we might want to sort by data
type or something else. also, we only have a few parameters here, but
I'd like to set this up to support a much larger set of parameters on
the debug side - we need much finer grained support for things like
power-on for instance. And I'd like a way that easily scales here.
Also I agree on the documentation.. I'll make sure to add that in the
next patch once we conclude on the approach here.
Thanks,
Stuart
>
> --
> Gustavo Sousa
>
> > *
> > * This attribute can only be set before binding to the device.
> > *
> > @@ -260,7 +260,7 @@ struct xe_config_group_device {
> > u64 engines_allowed;
> > struct wa_bb
> > ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
> > struct wa_bb
> > ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
> > - bool survivability_mode;
> > + bool enable_survivability_mode;
> > bool enable_psmi;
> > struct {
> > unsigned int max_vfs;
> > @@ -279,7 +279,7 @@ struct xe_config_group_device {
> > static const struct xe_config_device device_defaults = {
> > .gt_types_allowed = U64_MAX,
> > .engines_allowed = U64_MAX,
> > - .survivability_mode = false,
> > + .enable_survivability_mode = false,
> > .enable_psmi = false,
> > .sriov = {
> > .max_vfs = XE_DEFAULT_MAX_VFS,
> > @@ -357,20 +357,21 @@ static bool is_bound(struct
> > xe_config_group_device *dev)
> > return ret;
> > }
> >
> > -static ssize_t survivability_mode_show(struct config_item *item,
> > char *page)
> > +static ssize_t enable_survivability_mode_show(struct config_item
> > *item, char *page)
> > {
> > struct xe_config_device *dev = to_xe_config_device(item);
> >
> > - return sprintf(page, "%d\n", dev->survivability_mode);
> > + return sprintf(page, "%d\n", dev-
> > >enable_survivability_mode);
> > }
> >
> > -static ssize_t survivability_mode_store(struct config_item *item,
> > const char *page, size_t len)
> > +static ssize_t enable_survivability_mode_store(struct config_item
> > *item, const char *page,
> > + size_t len)
> > {
> > struct xe_config_group_device *dev =
> > to_xe_config_group_device(item);
> > - bool survivability_mode;
> > + bool enable_survivability_mode;
> > int ret;
> >
> > - ret = kstrtobool(page, &survivability_mode);
> > + ret = kstrtobool(page, &enable_survivability_mode);
> > if (ret)
> > return ret;
> >
> > @@ -378,7 +379,7 @@ static ssize_t survivability_mode_store(struct
> > config_item *item, const char *pa
> > if (is_bound(dev))
> > return -EBUSY;
> >
> > - dev->config.survivability_mode = survivability_mode;
> > + dev->config.enable_survivability_mode =
> > enable_survivability_mode;
> >
> > return len;
> > }
> > @@ -815,7 +816,7 @@ CONFIGFS_ATTR(, ctx_restore_post_bb);
> > CONFIGFS_ATTR(, enable_psmi);
> > CONFIGFS_ATTR(, engines_allowed);
> > CONFIGFS_ATTR(, gt_types_allowed);
> > -CONFIGFS_ATTR(, survivability_mode);
> > +CONFIGFS_ATTR(, enable_survivability_mode);
> >
> > static struct configfs_attribute *xe_config_device_attrs[] = {
> > &attr_ctx_restore_mid_bb,
> > @@ -823,7 +824,7 @@ static struct configfs_attribute
> > *xe_config_device_attrs[] = {
> > &attr_enable_psmi,
> > &attr_engines_allowed,
> > &attr_gt_types_allowed,
> > - &attr_survivability_mode,
> > + &attr_enable_survivability_mode,
> > NULL,
> > };
> >
> > @@ -847,7 +848,7 @@ static bool xe_config_device_is_visible(struct
> > config_item *item,
> > {
> > struct xe_config_group_device *dev =
> > to_xe_config_group_device(item);
> >
> > - if (attr == &attr_survivability_mode) {
> > + if (attr == &attr_enable_survivability_mode) {
> > if (!dev->desc->is_dgfx || dev->desc->platform <
> > XE_BATTLEMAGE)
> > return false;
> > }
> > @@ -1098,7 +1099,7 @@ static void dump_custom_dev_config(struct
> > pci_dev *pdev,
> > PRI_CUSTOM_ATTR("%llx", gt_types_allowed);
> > PRI_CUSTOM_ATTR("%llx", engines_allowed);
> > PRI_CUSTOM_ATTR("%d", enable_psmi);
> > - PRI_CUSTOM_ATTR("%d", survivability_mode);
> > + PRI_CUSTOM_ATTR("%d", enable_survivability_mode);
> > PRI_CUSTOM_ATTR("%u", sriov.admin_only_pf);
> >
> > #undef PRI_CUSTOM_ATTR
> > @@ -1128,20 +1129,20 @@ void xe_configfs_check_device(struct
> > pci_dev *pdev)
> > }
> >
> > /**
> > - * xe_configfs_get_survivability_mode - get configfs survivability
> > mode attribute
> > + * xe_configfs_get_enable_survivability_mode - get configfs
> > survivability mode attribute
> > * @pdev: pci device
> > *
> > - * Return: survivability_mode attribute in configfs
> > + * Return: enable_survivability_mode attribute in configfs
> > */
> > -bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
> > +bool xe_configfs_get_enable_survivability_mode(struct pci_dev
> > *pdev)
> > {
> > struct xe_config_group_device *dev =
> > find_xe_config_group_device(pdev);
> > bool mode;
> >
> > if (!dev)
> > - return device_defaults.survivability_mode;
> > + return device_defaults.enable_survivability_mode;
> >
> > - mode = dev->config.survivability_mode;
> > + mode = dev->config.enable_survivability_mode;
> > config_group_put(&dev->group);
> >
> > return mode;
> > diff --git a/drivers/gpu/drm/xe/xe_configfs.h
> > b/drivers/gpu/drm/xe/xe_configfs.h
> > index 07d62bf0c152..517de4946d35 100644
> > --- a/drivers/gpu/drm/xe/xe_configfs.h
> > +++ b/drivers/gpu/drm/xe/xe_configfs.h
> > @@ -18,7 +18,7 @@ struct pci_dev;
> > int xe_configfs_init(void);
> > void xe_configfs_exit(void);
> > void xe_configfs_check_device(struct pci_dev *pdev);
> > -bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
> > +bool xe_configfs_get_enable_survivability_mode(struct pci_dev
> > *pdev);
> > bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev);
> > bool xe_configfs_media_gt_allowed(struct pci_dev *pdev);
> > u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
> > @@ -37,7 +37,7 @@ bool xe_configfs_admin_only_pf(struct pci_dev
> > *pdev);
> > static inline int xe_configfs_init(void) { return 0; }
> > static inline void xe_configfs_exit(void) { }
> > static inline void xe_configfs_check_device(struct pci_dev *pdev)
> > { }
> > -static inline bool xe_configfs_get_survivability_mode(struct
> > pci_dev *pdev) { return false; }
> > +static inline bool
> > xe_configfs_get_enable_survivability_mode(struct pci_dev *pdev) {
> > return false; }
> > static inline bool xe_configfs_primary_gt_allowed(struct pci_dev
> > *pdev) { return true; }
> > static inline bool xe_configfs_media_gt_allowed(struct pci_dev
> > *pdev) { return true; }
> > static inline u64 xe_configfs_get_engines_allowed(struct pci_dev
> > *pdev) { return U64_MAX; }
> > diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c
> > b/drivers/gpu/drm/xe/xe_survivability_mode.c
> > index db64cac39c94..7c85bdb267af 100644
> > --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
> > +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
> > @@ -377,7 +377,7 @@ bool xe_survivability_mode_is_requested(struct
> > xe_device *xe)
> > if (!IS_DGFX(xe) || IS_SRIOV_VF(xe) || xe->info.platform <
> > XE_BATTLEMAGE)
> > return false;
> >
> > - survivability_mode =
> > xe_configfs_get_survivability_mode(pdev);
> > + survivability_mode =
> > xe_configfs_get_enable_survivability_mode(pdev);
> > /* Enable survivability mode if set via configfs */
> > if (survivability_mode)
> > return true;
> > --
> > 2.43.0
next prev parent reply other threads:[~2026-05-04 14:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 4:43 [PATCH 0/9] Add new debug infrastructure for configfs Stuart Summers
2026-05-04 4:43 ` [PATCH 1/9] drm/xe: Rename survivability_mode to enable_survivability_mode Stuart Summers
2026-05-04 13:29 ` Gustavo Sousa
2026-05-04 14:32 ` Summers, Stuart [this message]
2026-05-04 14:38 ` Summers, Stuart
2026-05-04 14:40 ` Summers, Stuart
2026-05-04 18:31 ` Rodrigo Vivi
2026-05-04 18:38 ` Summers, Stuart
2026-05-04 4:43 ` [PATCH 2/9] drm/xe: Sort xe_config_device fields and defaults alphabetically Stuart Summers
2026-05-04 13:58 ` Gustavo Sousa
2026-05-04 14:38 ` Summers, Stuart
2026-05-04 15:47 ` Lin, Shuicheng
2026-05-04 15:54 ` Summers, Stuart
2026-05-04 4:43 ` [PATCH 3/9] drm/xe: Split out configfs data structures Stuart Summers
2026-05-04 4:52 ` Summers, Stuart
2026-05-04 8:47 ` Jani Nikula
2026-05-04 14:24 ` Summers, Stuart
2026-05-04 21:48 ` Matthew Brost
2026-05-04 21:51 ` Summers, Stuart
2026-05-04 4:43 ` [PATCH 4/9] drm/xe: Add a new debug focused configfs group Stuart Summers
2026-05-04 15:42 ` Gustavo Sousa
2026-05-04 15:50 ` Summers, Stuart
2026-05-04 17:28 ` Gustavo Sousa
2026-05-04 17:44 ` Summers, Stuart
2026-05-04 19:04 ` Gustavo Sousa
2026-05-05 21:45 ` Summers, Stuart
2026-05-04 4:43 ` [PATCH 5/9] drm/xe: Move debug configfs entries to xe_configfs_debug.c Stuart Summers
2026-05-04 4:43 ` [PATCH 6/9] drm/xe/guc: Add configfs support for guc_log_level Stuart Summers
2026-05-05 23:54 ` Daniele Ceraolo Spurio
2026-05-04 4:43 ` [PATCH 7/9] drm/xe/guc: Add support for NPK as a GuC log target Stuart Summers
2026-05-04 4:43 ` [PATCH 8/9] drm/xe: Add infrastructure for debug configfs parameters Stuart Summers
2026-05-04 4:43 ` [PATCH 9/9] drm/xe: Migrate existing debug configfs entries to params infrastructure Stuart Summers
2026-05-04 4:54 ` [PATCH 0/9] Add new debug infrastructure for configfs Summers, Stuart
2026-05-04 5:30 ` ✗ CI.checkpatch: warning for " Patchwork
2026-05-04 5:32 ` ✓ CI.KUnit: success " Patchwork
2026-05-04 6:44 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-04 8:42 ` ✗ Xe.CI.FULL: failure " 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=b5cccfd551ebb70487e0f2766d838ed4597b2173.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=shuicheng.lin@intel.com \
--cc=umesh.nerlige.ramappa@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