From: "Yadav, Arvind" <arvind.yadav@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
<intel-xe@lists.freedesktop.org>, <matthew.brost@intel.com>
Cc: <rodrigo.vivi@intel.com>, <badal.nilawar@intel.com>,
<himal.prasad.ghimiray@intel.com>,
<dnyaneshwar.bhadane@intel.com>, <mallesh.koujalagi@intel.com>
Subject: Re: [PATCH v4 2/4] drm/xe/guc: Report CGP protocol errors using SIGID
Date: Mon, 31 Aug 2026 11:08:04 +0530 [thread overview]
Message-ID: <82a95a75-7bb3-4a1f-8320-f95f73bcfc7b@intel.com> (raw)
In-Reply-To: <47ec309e-8529-497c-9401-6771d76a0a1d@intel.com>
On 28-08-2026 16:07, Michal Wajdeczko wrote:
>
> On 8/28/2026 11:58 AM, Arvind Yadav wrote:
>> Route selected GuC CGP protocol error logs through the structured SIGID
> what is CGP ?
CGP is Context Group Page. It is a KMD-managed page used to pass
multi-queue group updates to GuC.
>
>> logging helper.
>>
>> These paths were already reported as errors and return -EPROTO. Use the
>> GUC component, which maps to XE_SIGID_RUNTIME_FW, and pass -EPROTO as the
>> errno value.
>>
>> Keep this conversion separate from the reset-request failure path because
>> it reports GuC protocol/message validation errors, not GT_TDR recovery.
I will avoid adding SIGID logs in these handlers because malformed G2H
messages are already reported by the CT layer after the handler returns
`-EPROTO`.
I will drop the CGP SIGID conversion patch. As per you suggestion we can
send separate a small cleanup patch.
Thanks,
Arvind
>>
>> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>> Cc: Badal Nilawar <badal.nilawar@intel.com>
>> Cc: Matthew Brost <matthew.brost@intel.com>
>> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Suggested-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>> Signed-off-by: Arvind Yadav <arvind.yadav@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_guc_submit.c | 9 ++++-----
>> 1 file changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
>> index c1d469624215..0bd84360f38b 100644
>> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
>> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
>> @@ -3508,12 +3508,11 @@ int xe_guc_exec_queue_cgp_context_error_handler(struct xe_guc *guc, u32 *msg,
>> u32 len)
>> {
>> struct xe_gt *gt = guc_to_gt(guc);
>> - struct xe_device *xe = guc_to_xe(guc);
>> struct xe_exec_queue *q;
>> u32 guc_id = msg[2];
>>
>> if (unlikely(len != XE_GUC_EXEC_QUEUE_CGP_CONTEXT_ERROR_LEN)) {
> can you prepare other patch that will move that
>
> #define XE_GUC_EXEC_QUEUE_CGP_CONTEXT_ERROR_LEN
>
> to some GuC ABI header in the abi/ folder?
> it shouldn't be really defined here
>> - drm_err(&xe->drm, "Invalid length %u", len);
>> + xe_log_err(gt, GUC, -EPROTO, "Invalid CGP_CONTEXT_ERROR length %u\n", len);
>> return -EPROTO;
>> }
>>
>> @@ -3546,13 +3545,13 @@ int xe_guc_exec_queue_cgp_context_error_handler(struct xe_guc *guc, u32 *msg,
>> */
>> int xe_guc_exec_queue_cgp_sync_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
>> {
>> - struct xe_device *xe = guc_to_xe(guc);
>> + struct xe_gt *gt = guc_to_gt(guc);
>> struct xe_exec_queue_group *group;
>> struct xe_exec_queue *q, *upd_q;
>> u32 guc_id = msg[0];
>>
>> if (unlikely(len < 1)) {
> and add define for this magic 1
>
>> - drm_err(&xe->drm, "Invalid CGP_SYNC_DONE length %u", len);
>> + xe_log_err(gt, GUC, -EPROTO, "Invalid CGP_SYNC_DONE length %u\n", len);
>> return -EPROTO;
> and I guess we usually don't print any errors for malformed message
> at the G2H handler sides, as there should be a full error message
> generated by the CT layer after we return -EPROTO error
>
> see xe_guc_error_capture_handler
> see xe_guc_exec_queue_reset_handler
> see xe_guc_exec_queue_memory_cat_error_handler
> ...
>
>> }
>>
>> @@ -3561,7 +3560,7 @@ int xe_guc_exec_queue_cgp_sync_done_handler(struct xe_guc *guc, u32 *msg, u32 le
>> return -EPROTO;
>>
>> if (!xe_exec_queue_is_multi_queue_primary(q)) {
>> - drm_err(&xe->drm, "Unexpected CGP_SYNC_DONE response");
>> + xe_log_err(gt, GUC, -EPROTO, "Unexpected CGP_SYNC_DONE response\n");
> I'm wondering it this should be treated as EPROTO ?
> what if it is our (xe) fault ?
> maybe we should print some more details ?
>
>> return -EPROTO;
>> }
>>
next prev parent reply other threads:[~2026-08-31 5:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 9:57 [PATCH v4 0/4] drm/xe: Report GT TDR and VM rebind faults using SIGID Arvind Yadav
2026-08-28 9:58 ` [PATCH v4 1/4] drm/xe/guc: Report reset-request failure " Arvind Yadav
2026-08-28 10:28 ` Michal Wajdeczko
2026-08-31 6:11 ` Yadav, Arvind
2026-08-28 9:58 ` [PATCH v4 2/4] drm/xe/guc: Report CGP protocol errors " Arvind Yadav
2026-08-28 10:37 ` Michal Wajdeczko
2026-08-31 5:38 ` Yadav, Arvind [this message]
2026-08-28 9:58 ` [PATCH v4 3/4] drm/xe/svm: Report terminal page-fault failures " Arvind Yadav
2026-08-28 9:58 ` [PATCH v4 4/4] drm/xe/gt: Report GT reset and power " Arvind Yadav
2026-08-28 14:18 ` Michal Wajdeczko
2026-08-31 5:10 ` Yadav, Arvind
2026-08-28 10:06 ` ✓ CI.KUnit: success for drm/xe: Report GT TDR and VM rebind faults using SIGID (rev4) Patchwork
2026-08-28 11:09 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-28 11:48 ` ✓ 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=82a95a75-7bb3-4a1f-8320-f95f73bcfc7b@intel.com \
--to=arvind.yadav@intel.com \
--cc=badal.nilawar@intel.com \
--cc=dnyaneshwar.bhadane@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@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