Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Raag Jadav" <raag.jadav@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/xe/pci_error: Allow debugging PCI errors
Date: Tue, 18 Aug 2026 10:42:21 +0000	[thread overview]
Message-ID: <20260818104221.7952C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818103050.493252-1-raag.jadav@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unconditional device wedging and disconnection on recoverable non-fatal AER errors when debugging mode is enabled.
--

--- Patch [1]: [PATCH v2] drm/xe/pci_error: Allow debugging PCI errors ---
commit 26ac63dc9350283e2a915daf342c236caf34f680
Author: Raag Jadav <raag.jadav@intel.com>

drm/xe/pci_error: Allow debugging PCI errors

This commit updates the PCI error handling path to disconnect the device
and prevent a bus reset when the XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET
debug mode is enabled. This preserves the device state so it is available
to the user for debugging.

> diff --git a/drivers/gpu/drm/xe/xe_pci_error.c b/drivers/gpu/drm/xe/xe_pci_error.c
> index e41af2ac7f23b..98aa26275ad66 100644
> --- a/drivers/gpu/drm/xe/xe_pci_error.c
> +++ b/drivers/gpu/drm/xe/xe_pci_error.c
> @@ -83,6 +83,12 @@ static pci_ers_result_t xe_pci_error_mmio_enabled(struct pci_dev *pdev)
>  	xe_info(xe, "PCI error: MMIO enabled\n");
>  	action = xe_ras_process_errors(xe);
>  
> +	/* User wants to debug the error, prevent reset */
> +	if (xe->wedged.mode == XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET) {
> +		xe_device_declare_wedged(xe);
> +		return PCI_ERS_RESULT_DISCONNECT;
> +	}

[Severity: Medium]
Does this code unnecessarily wedge the device on recoverable errors? 

When XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET is enabled, any non-fatal AER 
that reaches xe_pci_error_mmio_enabled() will unconditionally wedge the 
device here. This happens even if xe_ras_process_errors(xe) successfully 
handles the error and returns XE_RAS_RECOVERY_ACTION_RECOVERED in the 
action variable.

Since the commit message specifically mentions preventing bus resets for 
debugging, should this disconnect and wedge logic only be triggered if 
action == XE_RAS_RECOVERY_ACTION_RESET?

> +
>  	return ras_action_to_pci_result(pdev, action);
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260818103050.493252-1-raag.jadav@intel.com?part=1

  parent reply	other threads:[~2026-08-18 10:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 10:30 [PATCH v2] drm/xe/pci_error: Allow debugging PCI errors Raag Jadav
2026-08-18 10:39 ` ✓ CI.KUnit: success for drm/xe/pci_error: Allow debugging PCI errors (rev2) Patchwork
2026-08-18 10:42 ` sashiko-bot [this message]
2026-08-18 12:31 ` ✓ CI.KUnit: success for drm/xe/pci_error: Allow debugging PCI errors (rev3) Patchwork
2026-08-18 13:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-18 14:41 ` ✗ Xe.CI.FULL: failure " 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=20260818104221.7952C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=raag.jadav@intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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