From: sashiko-bot@kernel.org
To: "Raag Jadav" <raag.jadav@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v9 1/7] drm/xe/gt: Use GT ordered workqueue for wedging
Date: Fri, 16 Oct 2026 03:32:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-173672@kernel.org> (raw)
In-Reply-To: <20261016031559.427941-2-raag.jadav@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/xe: gt_wedge_worker memory access assertion fails when device is suspended
--
commit 375de707bf2e4590076210ea91f9aecb2bcce131
Author: Raag Jadav <raag.jadav@intel.com>
drm/xe/gt: Use GT ordered workqueue for wedging
This commit introduces a GT ordered workqueue for wedging to avoid tearing
down exec queues synchronously and disrupting the scheduler while jobs are
in-flight. It also uses the for_each_initialized_gt() macro to help avoid
races if the device is declared wedged in the probe sequence.
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index bc9bf6f0b5a79..27f32627a1f9b 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
[ ... ]
> @@ -1204,6 +1209,15 @@ struct xe_hw_engine *xe_gt_any_hw_engine(struct xe_gt *gt)
> return NULL;
> }
>
> +static void gt_wedge_worker(struct work_struct *w)
> +{
> + struct xe_gt *gt = container_of(w, typeof(*gt), wedge.worker);
> +
> + xe_device_assert_mem_access(gt_to_xe(gt));
[Severity: High]
Does this assertion safely hold in all contexts? The changelog mentions that
v9 drops the runtime PM guard because callers already hold a reference.
However, looking at the async callers that eventually invoke this worker,
they don't seem to actively hold a runtime PM reference that guarantees the
device is awake.
For example, when an AMC alert is handled:
drivers/gpu/drm/xe/xe_amc.c:xe_amc_work() {
...
case AMC_ALERT_CATERR:
dev_warn(amc->i2c->drm_dev, "AMC Alert: %s\n",
amc_alert[alert_reason]);
xe_device_declare_wedged(i2c_client_to_xe_device(client));
break;
...
}
Inside xe_device_declare_wedged(), the code uses xe_pm_runtime_get_noresume()
and then loops over GTs to call xe_gt_declare_wedged(), which queues this
worker. Since xe_pm_runtime_get_noresume() does not wake up a suspended
device, couldn't this result in gt_wedge_worker() executing while the device
is suspended, failing the xe_device_assert_mem_access() assertion and crashing
the kernel?
A similar pattern appears in
drivers/gpu/drm/xe/xe_pci_error.c:prepare_device_for_reset(), which also uses
xe_pm_runtime_get_noresume() before invoking the wedge path.
> + xe_uc_declare_wedged(>->uc);
> + xe_tlb_inval_reset(>->tlb_inval);
> +}
> +
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016031559.427941-1-raag.jadav@intel.com?part=1
next prev parent reply other threads:[~2026-10-16 3:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 3:15 [PATCH v9 0/7] Introduce xe_wedge Raag Jadav
2026-10-16 3:15 ` [PATCH v9 1/7] drm/xe/gt: Use GT ordered workqueue for wedging Raag Jadav
2026-10-16 3:32 ` sashiko-bot [this message]
2026-10-16 3:15 ` [PATCH v9 2/7] drm/xe: Drop xe_device_set_wedged_method() Raag Jadav
2026-10-16 3:15 ` [PATCH v9 3/7] drm/xe: Move xe_device_wedged_fini() registration to xe_device_probe_early() Raag Jadav
2026-10-16 3:15 ` [PATCH v9 4/7] drm/xe: Make xe_device_declare_wedged() IRQ safe Raag Jadav
2026-10-16 3:28 ` sashiko-bot
2026-10-16 3:15 ` [PATCH v9 5/7] drm/xe/pci_error: Flush GT wedge worker before bus reset Raag Jadav
2026-10-16 3:33 ` sashiko-bot
2026-10-16 3:15 ` [PATCH v9 6/7] drm/xe: Introduce xe_wedge Raag Jadav
2026-10-16 3:15 ` [PATCH v9 7/7] drm/xe/ras: Move xe_ras_process_errors() to xe_ras Raag Jadav
2026-10-16 3:36 ` sashiko-bot
2026-10-16 3:22 ` ✗ CI.checkpatch: warning for Introduce xe_wedge (rev8) Patchwork
2026-10-16 3:25 ` ✓ CI.KUnit: success " Patchwork
2026-10-16 4:03 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-16 13:02 ` ✓ 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=sashiko-outbox-173672@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