Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Harrison <john.c.harrison@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <Intel-Xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/guc: Add support for NPK as a GuC log target
Date: Thu, 12 Jun 2025 16:43:01 -0700	[thread overview]
Message-ID: <d662c9b3-feeb-47b5-9b97-7fe9f3c726f0@intel.com> (raw)
In-Reply-To: <ipcuzymwpfnoikxo5jp4d4vgobed7ip3wp5ccrljvyprx27yob@bcmzpft4vsnm>

On 6/12/2025 3:05 PM, Lucas De Marchi wrote:
> On Wed, Jun 11, 2025 at 04:51:24PM -0700, John Harrison wrote:
>> On 6/11/2025 2:49 PM, Lucas De Marchi wrote:
>>> On Wed, Jun 11, 2025 at 02:05:53PM -0700, John.C.Harrison@Intel.com 
>>> wrote:
>>>> From: John Harrison <John.C.Harrison@Intel.com>
>>>>
>>>> The GuC has an option to write log data via NPK. This is basically a
>>>> magic IO address that GuC writes arbitrary data to and which can be
>>>> logged by a suitable hardware logger. This can allow retrieval of the
>>>> GuC log in hardware debug environments even when the system as a whole
>>>> dies horribly.
>>>>
>>>> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
>>>> ---
>>>> drivers/gpu/drm/xe/xe_guc.c    | 4 ++++
>>>> drivers/gpu/drm/xe/xe_module.c | 4 ++++
>>>> drivers/gpu/drm/xe/xe_module.h | 1 +
>>>> 3 files changed, 9 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>>>> index e16d19b44bcc..9c0e3113f7d5 100644
>>>> --- a/drivers/gpu/drm/xe/xe_guc.c
>>>> +++ b/drivers/gpu/drm/xe/xe_guc.c
>>>> @@ -35,6 +35,7 @@
>>>> #include "xe_guc_submit.h"
>>>> #include "xe_memirq.h"
>>>> #include "xe_mmio.h"
>>>> +#include "xe_module.h"
>>>> #include "xe_platform_types.h"
>>>> #include "xe_sriov.h"
>>>> #include "xe_uc.h"
>>>> @@ -74,6 +75,9 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc)
>>>>     else
>>>>         flags |= FIELD_PREP(GUC_LOG_VERBOSITY, 
>>>> GUC_LOG_LEVEL_TO_VERBOSITY(level));
>>>>
>>>> +    if (xe_modparam.guc_log_target)
>>>> +        flags |= FIELD_PREP(GUC_LOG_DESTINATION, 
>>>> xe_modparam.guc_log_target);
>>>
>>> is this supported across the board for all platforms and firmware
>>> versions? Otherwise, what'd happen if you have and old igfx and you are
>>> debugging a new dgfx? or vice-versa.
>> All platforms that have a GuC and all firmware builds that have been 
>> supported under Linux. North PeaK is part of the host chipset not the 
>> GuC or GT.
>
> so I imagine this only works in igfx? I'm mostly concerned about this
AFAIK, all platforms means all platforms. TGL, DG2, PVC, LNL, BMG, PTL, 
everything.

> being a module param and then you try to debug one card and get the
> other to do what you don't want (or crash, or refuse to load). For
> similar reason we've been adding these debug aids via configfs rather
> than module param.  If it's harmless, then.... well guc_log_level is
> already there, doesn't hurt much to have the other.
Yeah, Stuart mentioned the configfs thing. I'm going to take a look at 
doing it that way. My only concern with that is the learning curve to 
use configfs seems quite high. We can't just add a comment to an end 
user bug report saying "please set the module parameter". It would take 
quite a bit of explaining to get someone to set an option via configfs.

For this particular setting, it's not so much of a concern. As 
mentioned, this is not something any random end user can actually make 
use of. It requires some serious hardware to be attached to get the logs 
out. So someone using this is going to be more hack savvy than an 
average user.

John.

>
> Lucas De Marchi


  reply	other threads:[~2025-06-12 23:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 21:05 [PATCH 0/2] Clean up of GuC init data macros John.C.Harrison
2025-06-11 21:05 ` [PATCH 1/2] drm/xe/guc: Clean up of GuC 'CTL' defines John.C.Harrison
2025-06-11 22:04   ` Cavitt, Jonathan
2025-06-12 22:01   ` Lucas De Marchi
2025-06-11 21:05 ` [PATCH 2/2] drm/xe/guc: Add support for NPK as a GuC log target John.C.Harrison
2025-06-11 21:49   ` Lucas De Marchi
2025-06-11 23:51     ` John Harrison
2025-06-12 22:05       ` Lucas De Marchi
2025-06-12 23:43         ` John Harrison [this message]
2025-06-11 22:04   ` Cavitt, Jonathan
2025-06-11 23:57     ` John Harrison
2025-06-12 14:32       ` Cavitt, Jonathan
2025-06-12 17:49         ` John Harrison
2025-06-12 18:27           ` Cavitt, Jonathan
2025-06-12 18:47             ` John Harrison
2025-06-12 19:52               ` Cavitt, Jonathan
2025-06-12 19:30   ` Summers, Stuart
2025-06-11 21:11 ` ✓ CI.checkpatch: success for Clean up of GuC init data macros Patchwork
2025-06-11 21:12 ` ✓ CI.KUnit: " Patchwork
2025-06-11 21:23 ` ✓ CI.Build: " Patchwork
2025-06-11 21:25 ` ✓ CI.Hooks: " Patchwork
2025-06-11 21:27 ` ✓ CI.checksparse: " Patchwork
2025-06-11 22:19 ` ✓ Xe.CI.BAT: " Patchwork
2025-06-12  8:01 ` ✗ Xe.CI.Full: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-07-23 21:20 [PATCH 0/2] Clean up of GuC init data macros & add extra log option John.C.Harrison
2025-07-23 21:20 ` [PATCH 2/2] drm/xe/guc: Add support for NPK as a GuC log target John.C.Harrison
2025-07-24 16:01   ` Lucas De Marchi

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=d662c9b3-feeb-47b5-9b97-7fe9f3c726f0@intel.com \
    --to=john.c.harrison@intel.com \
    --cc=Intel-Xe@lists.freedesktop.org \
    --cc=lucas.demarchi@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