Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v2 4/4] drm/xe/guc: Don't treat GuC generic CAT error as protocol error
Date: Tue, 5 Nov 2024 17:24:57 -0800	[thread overview]
Message-ID: <ZyrFaSYNzva2mZVp@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20241105204557.1991-1-michal.wajdeczko@intel.com>

On Tue, Nov 05, 2024 at 09:45:57PM +0100, Michal Wajdeczko wrote:
> GuC uses GUC_ID_UNKNOWN if it can not map the CAT fault to any
> context. We shouldn't treat that as G2H protocol error that would
> justify a GT reset, as it may happen due to some VF activity.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
> v2: replaced 16b GUC_ID_MAX with 32b GUC_ID_UNKNOWN
> ---
>  drivers/gpu/drm/xe/xe_guc_fwif.h   | 1 +
>  drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_fwif.h b/drivers/gpu/drm/xe/xe_guc_fwif.h
> index 08ffe59f22fa..057153f89b30 100644
> --- a/drivers/gpu/drm/xe/xe_guc_fwif.h
> +++ b/drivers/gpu/drm/xe/xe_guc_fwif.h
> @@ -17,6 +17,7 @@
>  #define G2H_LEN_DW_TLB_INVALIDATE		3
>  
>  #define GUC_ID_MAX			65535
> +#define GUC_ID_UNKNOWN			0xffffffff
>  
>  #define GUC_CONTEXT_DISABLE		0
>  #define GUC_CONTEXT_ENABLE		1
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 147000fd1177..614110dbb527 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -2023,6 +2023,15 @@ int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
>  
>  	guc_id = msg[0];
>  
> +	if (guc_id == GUC_ID_UNKNOWN) {
> +		/*
> +		 * GuC uses GUC_ID_UNKNOWN if it can not map the CAT fault to any PF/VF
> +		 * context. In such case only PF will be notified about that fault.
> +		 */
> +		xe_gt_err_ratelimited(gt, "Memory CAT error reported by GuC!\n");
> +		return 0;
> +	}
> +
>  	q = g2h_exec_queue_lookup(guc, guc_id);
>  	if (unlikely(!q))
>  		return -EPROTO;
> -- 
> 2.43.0
> 

  reply	other threads:[~2024-11-06  1:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 17:30 [PATCH 0/4] GuC: Improve handling of the malformed G2H Michal Wajdeczko
2024-11-05 17:30 ` [PATCH 1/4] drm/xe/guc: Log content of the failed G2H message Michal Wajdeczko
2024-11-05 19:30   ` Matthew Brost
2024-11-05 17:30 ` [PATCH 2/4] drm/xe/guc: Drop redundant logs about invalid G2H length Michal Wajdeczko
2024-11-05 19:31   ` Matthew Brost
2024-11-05 17:30 ` [PATCH 3/4] drm/xe/guc: Don't read data from G2H prior to length check Michal Wajdeczko
2024-11-05 19:36   ` Matthew Brost
2024-11-05 20:01     ` Michal Wajdeczko
2024-11-06  1:32       ` Matthew Brost
2024-11-05 17:30 ` [PATCH 4/4] drm/xe/guc: Don't treat GuC generic CAT error as protocol error Michal Wajdeczko
2024-11-05 20:13   ` Michal Wajdeczko
2024-11-05 20:45   ` [PATCH v2 " Michal Wajdeczko
2024-11-06  1:24     ` Matthew Brost [this message]
2024-11-05 17:38 ` ✓ CI.Patch_applied: success for GuC: Improve handling of the malformed G2H Patchwork
2024-11-05 17:38 ` ✓ CI.checkpatch: " Patchwork
2024-11-05 17:39 ` ✓ CI.KUnit: " Patchwork
2024-11-05 17:52 ` ✓ CI.Build: " Patchwork
2024-11-05 17:54 ` ✓ CI.Hooks: " Patchwork
2024-11-05 17:56 ` ✓ CI.checksparse: " Patchwork
2024-11-05 18:37 ` ✓ CI.BAT: " Patchwork
2024-11-05 20:51 ` ✓ CI.Patch_applied: success for GuC: Improve handling of the malformed G2H (rev2) Patchwork
2024-11-05 20:52 ` ✓ CI.checkpatch: " Patchwork
2024-11-05 20:53 ` ✓ CI.KUnit: " Patchwork
2024-11-05 21:04 ` ✓ CI.Build: " Patchwork
2024-11-05 21:07 ` ✓ CI.Hooks: " Patchwork
2024-11-05 21:08 ` ✓ CI.checksparse: " Patchwork
2024-11-05 21:36 ` ✓ CI.BAT: " Patchwork
2024-11-06 22:55 ` ✗ CI.FULL: failure for GuC: Improve handling of the malformed G2H Patchwork
2024-11-07  1:06 ` ✗ CI.FULL: failure for GuC: Improve handling of the malformed G2H (rev2) Patchwork
2024-11-07  9:21   ` Michal Wajdeczko

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=ZyrFaSYNzva2mZVp@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@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