Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Tauro, Riana" <riana.tauro@intel.com>,
	"Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	"Aravind Iddamsetty" <aravind.iddamsetty@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v4 22/32] drm/xe/survivability: Report 'Boot Mode enabled' status using SIGID
Date: Fri, 14 Aug 2026 12:40:58 +0200	[thread overview]
Message-ID: <9b18aaad-9844-4e54-804e-b8fe20c8eb43@intel.com> (raw)
In-Reply-To: <fa82aca7-1cc8-460e-b7b0-3d11c1729f7d@intel.com>



On 8/14/2026 12:20 PM, Tauro, Riana wrote:
> 
> On 14-08-2026 15:36, Michal Wajdeczko wrote:
>>
>> On 8/14/2026 8:31 AM, Tauro, Riana wrote:
>>> On 13-08-2026 16:31, Michal Wajdeczko wrote:
>>>> On 8/13/2026 12:52 PM, Mallesh, Koujalagi wrote:
>>>>> On 13-08-2026 12:44 am, Michal Wajdeczko wrote:
>>>>>> Report 'Boot Mode' status or failure using various xe_log() helpers.
>>>>>>
>>>>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>>>>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>>>>> Cc: Riana Tauro <riana.tauro@intel.com>
>>>>>> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
>>>>>> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>>>>>> ---
>>>>>>     drivers/gpu/drm/xe/xe_survivability_mode.c | 21 +++++++++++++--------
>>>>>>     1 file changed, 13 insertions(+), 8 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
>>>>>> index 2d8c532157fd..ebd288986c11 100644
>>>>>> --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
>>>>>> +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
>>>>>> @@ -304,14 +304,13 @@ static int create_survivability_sysfs(struct pci_dev *pdev)
>>>>>>       static int enable_boot_survivability_mode(struct pci_dev *pdev)
>>>>>>     {
>>>>>> -    struct device *dev = &pdev->dev;
>>>>>>         struct xe_device *xe = pdev_to_xe_device(pdev);
>>>>>>         struct xe_survivability *survivability = &xe->survivability;
>>>>>> -    int ret = 0;
>>>>>> +    int ret;
>>>>>>           ret = create_survivability_sysfs(pdev);
>>>>>>         if (ret)
>>>>>> -        return ret;
>>>>>> +        goto failed;
>>>>>>           /* Make sure xe_heci_gsc_init() and xe_i2c_probe() are aware of survivability */
>>>>>>         survivability->mode = true;
>>>>>> @@ -323,19 +322,25 @@ static int enable_boot_survivability_mode(struct pci_dev *pdev)
>>>>>>         if (survivability->fdo_mode) {
>>>>>>             ret = xe_nvm_init(xe);
>>>>>>             if (ret)
>>>>>> -            goto err;
>>>>>> +            goto failed;
>>>>>>         }
>>>>>>           ret = xe_i2c_probe(xe);
>>>>>>         if (ret)
>>>>>> -        goto err;
>>>>>> +        goto failed;
>>>>>>     -    dev_err(dev, "In Survivability Mode\n");
>>>>>> +    if (check_boot_failure(xe))
>>>>>> +        xe_log_comp_fatal(pdev, SURVIVABILITY,
>>>>>> +                  &survivability->boot_status,
>>>>>> +                  sizeof(survivability->boot_status),
>>>>>> +                  "Boot Mode enabled!\n");
>>> Do we need this check? This function is only called if it is a boot failure.
>> are you sure?
>>
>> in xe_device_probe_early() there is:
>>
>>     err = xe_pcode_probe_early(xe);
>>     if (err || xe_survivability_mode_is_requested(xe)) {
>>         err = xe_survivability_mode_boot_enable(xe);
>>
>> and xe_survivability_mode_is_requested() may return true based
>> on the xe_configfs_get_survivability_mode() settings
> 
> 
> Configfs also is provided for users to enable boot survivability mode.
> So one log should be sufficient.

there will be still one log entry but it will be with different
severity based on the configfs vs bootstatus origin

> 
> If we do need to add a blob instead of error no we should go ahead with all
> the scratch registers as they contain the error details instead of just boot status.
> Can't we just add 0 for now and come up with something that we can decode in future.?

including boot_status value here was requested by Mallesh in [1]

and logging all boot status registers is already done in [2] but
only if boot mode was not triggered by configfs

[1] https://patchwork.freedesktop.org/patch/743324/?series=171022&rev=3#comment_1372191
[2] https://patchwork.freedesktop.org/patch/746002/?series=171022&rev=4


> 
> 
>>
>>> We can have a error log with the type here. We don't need if else.
>> based on [1] all survivability mode SIGID are FATAL
>> and based on 21] it was an arch choice to go with info level for all
>>
>> but IMO if the boot mode was selected via configfs it doesn't
>> make sense to call it FATAL, but if there was real problem detected
>> we should make it FATAL (like we do with failed PROBE)
>>
>> [1] https://patchwork.freedesktop.org/patch/732271/?series=168333&rev=1
>> [2] https://patchwork.freedesktop.org/patch/743324/?series=171022&rev=3#comment_1373731
>>
>>> How about something like this? and remove else
>>>
>>>
>>> <3> xe 0000:03:00.0: [drm] *ERROR* SIGID=<N> FATAL (01000000) SURVIVABILITY: mode=Boot
> 
> I am still trying to understand this series. Apologies if it is wrong, i tried to generate log using AI.
> 
>>                                                        ^^^^^^^^
>> boot_status is u8 so it will be at most (01)
>>
>> and I don't think we should be so cryptic in the user facing error messages
>>
>>>>> In case of fatal, will make sense to return "0" OR we can add return as -ENXIO right? any thoughts?
>>> Mallesh, you cannot change return codes here. This defeats the purpose of survivability mode
>>>
>>>> you're a reviewer here ;)
>>>>
>>>> but seriously, enable_boot_survivability_mode() is called from
>>>> xe_survivability_mode_boot_enable() which says:
>>>>
>>>>    * Return: 0 if boot survivability mode is enabled or not requested, negative error
>>>>    * code otherwise.
>>>>
>>>> so returning 0 as success code in enabling boot mode is the correct one
>>>> returning -ENXIO will be no different than failing to enter boot mode
>>>>
>>>> @Riana, this is your code, can you please confirm that
>>>>
>>>>> After handling fatal case
>>>>>
>>>>> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>>>>>
>>>>>> +    else
>>>>>> +        xe_log_info(pdev, SURVIVABILITY, "Boot Mode enabled!\n");
>>>>>>           return 0;
>>>>>>     -err:
>>>>>> -    dev_err(dev, "Failed to enable Survivability Mode\n");
>>>>>> +failed:
>>>>>> +    xe_log_err_fatal(pdev, SURVIVABILITY, ret, "Failed to enable Boot Mode!\n");
>>> Can we retain the previous dmesg?
>> there will be already "SURVIVABILITY: " prefix included,
>> so IMO instead of generic:
>>
>>    [drm] *ERROR* SIGID=103 (-EXXX) SURVIVABILITY: Failed to enable Survivability Mode
>>
>> it's better to have more clearer message:
>>
>>    [drm] *ERROR* SIGID=103 (-EXXX) SURVIVABILITY: Failed to enable Boot Mode!
> 
> Boot Mode and Runtime mode doesn't sound right. 

both "Boot Mode" and "Runtime mode" were existing names in the code ;)

> But i don't have any better suggestions here due
> to repetition.Since its message and can be changed . Will replace it if i can come up with something better in
> the future.

I take it as an ack-by then

> 
> Thanks
> Riana
> 
> 
>>
>>> Thanks
>>> Riana
>>>
>>>>>>         survivability->mode = false;
>>>>>>         return ret;
>>>>>>     }


  reply	other threads:[~2026-08-14 10:41 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 19:14 [PATCH v4 00/32] drm/xe: Add structured SIGID error logging infrastructure Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 01/32] drm/xe: Introduce xe_any helpers Michal Wajdeczko
2026-08-12 19:29   ` sashiko-bot
2026-08-13 16:51   ` Rodrigo Vivi
2026-08-13 23:37   ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 02/32] drm/xe/log: Add structured SIGID error logging infrastructure Michal Wajdeczko
2026-08-13 13:33   ` Mallesh, Koujalagi
2026-08-13 13:57     ` Michal Wajdeczko
2026-08-13 13:42   ` Nilawar, Badal
2026-08-13 19:00     ` Rodrigo Vivi
2026-08-14 13:05       ` Nilawar, Badal
2026-08-13 20:38     ` Michal Wajdeczko
2026-08-14 13:19       ` Nilawar, Badal
2026-08-13 18:51   ` Rodrigo Vivi
2026-08-14 13:32   ` Nilawar, Badal
2026-08-12 19:14 ` [PATCH v4 03/32] drm/xe/log: Introduce structured component/location identifiers Michal Wajdeczko
2026-08-13 17:20   ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 04/32] drm/xe/log: Add component/location decorations to dmesg Michal Wajdeczko
2026-08-14  0:00   ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 05/32] drm/xe/log: Add SIGID log helpers for severity Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 06/32] drm/xe/log: Add SIGID log helpers for location Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 07/32] drm/xe/log: Add SIGID log helpers for location & severity Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 08/32] drm/xe/log: Add SIGID log helpers for components Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 09/32] drm/xe/log: Add SIGID log helpers for component & severity Michal Wajdeczko
2026-08-13  4:38   ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 10/32] drm/xe/log: Add SIGID log helpers for errno-only Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 11/32] drm/xe/log: Index all SIGID printk messages Michal Wajdeczko
2026-08-12 19:35   ` sashiko-bot
2026-08-13 12:31   ` Mallesh, Koujalagi
2026-08-13 12:54     ` Michal Wajdeczko
2026-08-13 13:29       ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 12/32] drm/xe/log: Add hardware error signatures Michal Wajdeczko
2026-08-13  5:03   ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 13/32] drm/xe/log: Extend components list with hardware items Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 14/32] drm/xe/ras: Check RAS and LOG component definitions Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 15/32] drm/xe/kunit: Setup driver data in the test device Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 16/32] drm/xe/tests: Add Kunit tests for xe_log Michal Wajdeczko
2026-08-14 13:36   ` Nilawar, Badal
2026-08-12 19:14 ` [PATCH v4 17/32] drm/xe/tests: Add kunit tests for xe_any Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 18/32] drm/xe: Report 'probe blocked' error using SIGID Michal Wajdeczko
2026-08-13  6:26   ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 19/32] drm/xe: Report all probe errors " Michal Wajdeczko
2026-08-13  6:50   ` Mallesh, Koujalagi
2026-08-13  9:12     ` Michal Wajdeczko
2026-08-13  9:58       ` Mallesh, Koujalagi
2026-08-13 10:09         ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 20/32] drm/xe/survivability: Report 'boot status' " Michal Wajdeczko
2026-08-13  8:38   ` Mallesh, Koujalagi
2026-08-13  9:28     ` Michal Wajdeczko
2026-08-13 10:07       ` Mallesh, Koujalagi
2026-08-13 10:18         ` Michal Wajdeczko
2026-08-14 10:46           ` Tauro, Riana
2026-08-14 13:38             ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 21/32] drm/xe/survivability: Report 'sysfs failure' error " Michal Wajdeczko
2026-08-13  8:54   ` Mallesh, Koujalagi
2026-08-14 10:34   ` Tauro, Riana
2026-08-14 13:32     ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 22/32] drm/xe/survivability: Report 'Boot Mode enabled' status " Michal Wajdeczko
2026-08-13 10:52   ` Mallesh, Koujalagi
2026-08-13 11:01     ` Michal Wajdeczko
2026-08-14  6:31       ` Tauro, Riana
2026-08-14 10:06         ` Michal Wajdeczko
2026-08-14 10:20           ` Tauro, Riana
2026-08-14 10:40             ` Michal Wajdeczko [this message]
2026-08-14 10:51               ` Tauro, Riana
2026-08-14 13:17                 ` Michal Wajdeczko
2026-08-14 12:40         ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 23/32] drm/xe/survivability: Report 'Runtime " Michal Wajdeczko
2026-08-13 11:40   ` Mallesh, Koujalagi
2026-08-13 12:46     ` Michal Wajdeczko
2026-08-13 13:16       ` Mallesh, Koujalagi
2026-08-14  7:06       ` Tauro, Riana
2026-08-14 10:18         ` Michal Wajdeczko
2026-08-14 10:27           ` Tauro, Riana
2026-08-14 13:26             ` Michal Wajdeczko
2026-08-14 13:00         ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 24/32] drm/xe: Report 'device wedged' errors " Michal Wajdeczko
2026-08-12 22:28   ` Rodrigo Vivi
2026-08-13 11:56   ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 25/32] drm/xe/pcode: Report 'Mailbox failed' error " Michal Wajdeczko
2026-08-13 12:10   ` Bhadane, Dnyaneshwar
2026-08-13 12:35     ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 26/32] drm/xe/pcode: Report 'timeout, retrying' " Michal Wajdeczko
2026-08-12 19:51   ` sashiko-bot
2026-08-13 16:46   ` Umesh Nerlige Ramappa
2026-08-13 18:42     ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 27/32] drm/xe/pcode: Report 'initialization timedout' " Michal Wajdeczko
2026-08-12 19:49   ` sashiko-bot
2026-08-13 18:40   ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 28/32] drm/xe/guc: Report 'GuC mmio' errors " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 29/32] drm/xe/gt: Report 'reset failed' " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 30/32] drm/xe/gt: Report 'Fault response' pagefault error " Michal Wajdeczko
2026-08-13 18:37   ` Rodrigo Vivi
2026-08-13 19:46     ` Michal Wajdeczko
2026-08-13 22:12       ` Daniele Ceraolo Spurio
2026-08-14 10:30         ` Michal Wajdeczko
2026-08-14 12:49           ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 31/32] drm/xe/gt: Report 'Queue full' " Michal Wajdeczko
2026-08-13 17:25   ` Rodrigo Vivi
2026-08-12 19:14 ` [PATCH v4 32/32] drm/xe/pci: Report 'cannot re-enable' " Michal Wajdeczko
2026-08-13 17:21   ` Rodrigo Vivi
2026-08-12 19:22 ` ✗ CI.checkpatch: warning for drm/xe: Add structured SIGID error logging infrastructure (rev4) Patchwork
2026-08-12 19:24 ` ✓ CI.KUnit: success " Patchwork
2026-08-12 20:34 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-13  2:47 ` ✗ Xe.CI.FULL: " 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=9b18aaad-9844-4e54-804e-b8fe20c8eb43@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=aravind.iddamsetty@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mallesh.koujalagi@intel.com \
    --cc=riana.tauro@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