On Mon, 2026-11-02 at 11:21 +0530, Tauro, Riana wrote:
> On 30-10-2026 22:47, Alan Previn wrote:
> > When user requests to enter survivabilty via configfs, or if
> > check_boot_failure is hit inside xe_survivability_mode_is_requested,
> > no indication is published. This patch adds some awareness in dmesg.
> > 
> >   v3 : Limit message to xe_survivability_mode_is_requested. (Riana)
> >   v2 : Remove / modify messages to reflect underlying behavior. (Sashiko)
> > 
> > Signed-off-by: Alan Previn <[email protected]>
> > ---
> >   drivers/gpu/drm/xe/xe_survivability_mode.c | 10 ++++++++--
> >   1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c 
> > b/drivers/gpu/drm/xe/xe_survivability_mode.c
> > index d73cdad0b3a9..344b402eb728 100644
> > --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
> > +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
> > @@ -413,13 +413,19 @@ bool xe_survivability_mode_is_requested(struct 
> > xe_device *xe)
> >   
> >     survivability_mode = xe_configfs_get_survivability_mode(pdev);
> >     /* Enable survivability mode if set via configfs */
> > -   if (survivability_mode)
> > +   if (survivability_mode) {
> > +           xe_log_info(xe, SURVIVABILITY, "Boot mode requested.");
> >             return true;
> > +   }
> >   
> >     data = xe_mmio_read32(mmio, PCODE_SCRATCH(0));
> >     survivability->boot_status = REG_FIELD_GET(BOOT_STATUS, data);
> >   
> > -   return check_boot_failure(xe);
> > +   if (check_boot_failure(xe)) {
> > +           xe_log_err_fatal(pdev, SURVIVABILITY, 0, "Boot Mode 
> > enabled!\n");
> > +           return true;
> > +   }
> > +   return false;
> >   }
> 
> Can we also remove logs from enable_boot_survivability_mode to avoid 
> redundant logs.
> 
> Thanks
> Riana

alan: sure - i can do that - it would also mean enable_boot_survivability_mode 
would
have no more reason to call check_boot_failure.

alan: Also, looking at the baseline code and thinking about a way to ensure all 
of the following might require refactoring the calling layour in xe_device.c
1. no duplicated messages
2. AND,..  no silence when we ARE attempting to go into survivability
3. AND,... no sliecne if we succeeding OR failing actually entering 
survivability mode

this is primarily because xe_device_probe_early calls 
xe_survivability_mode_is_requested AND if that
returns true, the same code proceeds to call xe_survivability_mode_boot_enable 
which calls
xe_survivability_mode_is_requested again. But if we dont put a message in 
xe_survivability_mode_is_requested,
we end up getting silence in some cases not all cases. I think we might wanna 
need a bit more of a
refactor if u absolutey want to ensure all 3 conditions i listed abov. 
alternatively, we could add
a param into xe_survivability_mode_is_requested such as  "bool silent_check" 
but I dont like the idea
as it may end up getting wrongly used (if future changes are made) unless 
someone goes thru every possible
callstack again. So not an intuitive/scalable option.

let me try to refactor on next version.
..alan

Reply via email to