All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Raag Jadav" <raag.jadav@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v10 6/9] drm/xe/pci_error: Flush GT wedge worker before bus reset
Date: Fri, 16 Oct 2026 07:44:15 +0000	[thread overview]
Message-ID: <sashiko-outbox-173958@kernel.org> (raw)
In-Reply-To: <20261016072623.457392-7-raag.jadav@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/xe: flush_work() in PCI error recovery triggers MMIO on suspended device
--

commit a372afc80ddd4997ba73485e586ca48280dbd14b
Author: Raag Jadav <raag.jadav@intel.com>

drm/xe/pci_error: Flush GT wedge worker before bus reset
    
This commit flushes the GT wedge worker synchronously to avoid side
effects during PCI bus reset.

> diff --git a/drivers/gpu/drm/xe/xe_pci_error.c b/drivers/gpu/drm/xe/xe_pci_error.c
> index e1b9dc5f0a6dc..a5c8fd67738cf 100644
> --- a/drivers/gpu/drm/xe/xe_pci_error.c
> +++ b/drivers/gpu/drm/xe/xe_pci_error.c
> @@ -30,8 +30,10 @@ static void prepare_device_for_reset(struct pci_dev *pdev)
>  
>  	xe_device_set_in_reset(xe);
>  
> -	for_each_gt(gt, xe, id)
> +	for_each_gt(gt, xe, id) {
>  		xe_gt_declare_wedged(gt);
> +		flush_work(&gt->wedge.worker);

[Severity: High]
Does flushing the wedge worker here trigger unauthorized MMIO accesses on
a suspended device?

If the device is runtime suspended (D3hot), prepare_device_for_reset()
takes a PM reference earlier in the function via xe_pm_runtime_get_noresume()
which does not wake up the device.

By synchronously flushing the wedge worker here, it executes in this suspended
context. The worker unconditionally calls xe_device_assert_mem_access() (which
fails because the device is suspended) and proceeds to perform MMIO accesses
such as xe_guc_softreset().

Accessing MMIO on a D3hot device can cause PCI master aborts, NMI system
crashes, or hardware hangs.

> +	}
>  
>  	pci_disable_device(pdev);
>  }

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

  reply	other threads:[~2026-10-16  7:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  7:25 [PATCH v10 0/9] Introduce xe_wedge Raag Jadav
2026-10-16  7:25 ` [PATCH v10 1/9] drm/xe/gt: Use GT ordered workqueue for wedging Raag Jadav
2026-10-16  7:50   ` sashiko-bot
2026-10-16  7:25 ` [PATCH v10 2/9] drm/xe: Drop xe_device_set_wedged_method() Raag Jadav
2026-10-16  7:25 ` [PATCH v10 3/9] drm/xe/hw_error: Guard csc_hw_error_work() with runtime PM Raag Jadav
2026-10-16  7:43   ` sashiko-bot
2026-10-16  7:25 ` [PATCH v10 4/9] drm/xe: Move xe_device_wedged_fini() registration to xe_device_probe_early() Raag Jadav
2026-10-16  7:25 ` [PATCH v10 5/9] drm/xe: Make xe_device_declare_wedged() IRQ safe Raag Jadav
2026-10-16  7:26 ` [PATCH v10 6/9] drm/xe/pci_error: Flush GT wedge worker before bus reset Raag Jadav
2026-10-16  7:44   ` sashiko-bot [this message]
2026-10-16  7:26 ` [PATCH v10 7/9] drm/xe/amc: Guard xe_amc_work() with runtime PM Raag Jadav
2026-10-16  7:36   ` sashiko-bot
2026-10-16  7:26 ` [PATCH v10 8/9] drm/xe: Introduce xe_wedge Raag Jadav
2026-10-16  7:34   ` sashiko-bot
2026-10-16  7:26 ` [PATCH v10 9/9] drm/xe/ras: Move xe_ras_process_errors() to xe_ras Raag Jadav
2026-10-16  7:52   ` sashiko-bot
2026-10-16  8:05 ` ✗ CI.checkpatch: warning for Introduce xe_wedge (rev9) Patchwork
2026-10-16  8:06 ` ✗ CI.KUnit: 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=sashiko-outbox-173958@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.