All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Arvind Yadav <arvind.yadav@intel.com>
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	matthew.brost@intel.com, himal.prasad.ghimiray@intel.com,
	thomas.hellstrom@linux.intel.com, rodrigo.vivi@intel.com,
	riana.tauro@intel.com
Subject: Re: [PATCH 2/13] drm/xe: Separate AER reset state from device wedging
Date: Fri, 28 Aug 2026 13:36:36 +0200	[thread overview]
Message-ID: <apFyxAB1BYB0qtRh@black.igk.intel.com> (raw)
In-Reply-To: <20260827101801.1247654-3-arvind.yadav@intel.com>

Cc: Riana

On Thu, Aug 27, 2026 at 03:47:50PM +0530, Arvind Yadav wrote:
> PCI error recovery currently uses xe->wedged.flag to block driver
> access. This mixes a temporary AER reset with a permanent device wedge.
> 
> If the device wedges during AER recovery, the wedge is not seen as the
> first transition. The AER resume callback may then clear the flag and
> make the permanently wedged device appear usable again.
> 
> Keep the old device blocked while slot reset removes it, and block the
> new device until the AER resume callback.
> 
> The old AER path took a runtime PM reference to balance
> xe_device_wedged_fini(), which drops one when wedged.flag is set. AER no
> longer sets that flag, so keeping the Xe-owned reference would leak it.
> pcie_do_recovery() holds a PCI-core runtime PM reference across the
> error_detected, slot_reset and resume callbacks.

...

> +/*
> + * Return true when device access must be blocked either permanently because
> + * the device is wedged or temporarily while PCI error recovery is running.
> + *
> + * Do not use this helper for one-way wedged-device decisions such as DMA
> + * isolation, IRQ resume suppression or recovery-method reporting.
> + */
> +static inline bool xe_device_io_blocked(struct xe_device *xe)
> +{
> +	return xe_device_wedged(xe) || xe_device_is_in_reset(xe);
> +}

This is already documented below but still FYI:

The long term plan to reuse FLR flow[1] in AER path and move over from
'reset' states to temporary wedging.

Raag

[1] https://patchwork.freedesktop.org/series/162055/

> @@ -116,7 +116,6 @@ static pci_ers_result_t xe_pci_error_slot_reset(struct pci_dev *pdev)
>  	 * TODO: optimize by re-initializing only the hardware state and re-creating
>  	 * kernel BOs.
>  	 */
> -	xe_device_clear_in_reset(xe);
>  	pdev->driver->remove(pdev);
>  	devres_release_group(&pdev->dev, xe->devres_group);

  parent reply	other threads:[~2026-08-28 11:36 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 10:17 [PATCH 00/13] drm/xe: Isolate wedged devices from hardware access Arvind Yadav
2026-08-27 10:17 ` [PATCH 01/13] drm/xe/irq: Always free requested IRQs on uninstall Arvind Yadav
2026-08-27 10:39   ` Ghimiray, Himal Prasad
2026-08-31 20:30     ` Rodrigo Vivi
2026-09-01  9:32       ` Yadav, Arvind
2026-09-10  9:50   ` Thomas Hellström
2026-08-27 10:17 ` [PATCH 02/13] drm/xe: Separate AER reset state from device wedging Arvind Yadav
2026-08-27 10:36   ` sashiko-bot
2026-08-27 21:55   ` Andi Shyti
2026-08-28  3:32     ` Yadav, Arvind
2026-08-28 11:36   ` Raag Jadav [this message]
2026-09-10 10:07   ` Thomas Hellström
2026-08-27 10:17 ` [PATCH 03/13] drm/xe: Drop queued page faults when device I/O is blocked Arvind Yadav
2026-08-31 20:43   ` Rodrigo Vivi
2026-09-02  4:49     ` Yadav, Arvind
2026-09-02  5:30       ` Matthew Brost
2026-09-02  5:33         ` Matthew Brost
2026-08-27 10:17 ` [PATCH 04/13] drm/xe: Stop VM work " Arvind Yadav
2026-08-31 20:55   ` Rodrigo Vivi
2026-09-01  9:11     ` Yadav, Arvind
2026-09-02  5:40       ` Matthew Brost
2026-08-27 10:17 ` [PATCH 05/13] drm/xe: Send wedged notification from a worker Arvind Yadav
2026-08-27 22:12   ` Andi Shyti
2026-08-28  3:39     ` Yadav, Arvind
2026-08-27 10:17 ` [PATCH 06/13] drm/xe: Reuse one dummy page per BO after wedge Arvind Yadav
2026-08-27 10:30   ` sashiko-bot
2026-08-27 10:17 ` [PATCH 07/13] drm/xe: Invalidate existing VRAM mappings on wedge Arvind Yadav
2026-08-27 10:17 ` [PATCH 08/13] drm/xe/irq: Serialize IRQ suspend and resume Arvind Yadav
2026-08-31 21:06   ` Rodrigo Vivi
2026-09-01  9:07     ` Yadav, Arvind
2026-08-27 10:17 ` [PATCH 09/13] drm/xe: Isolate a wedged device before notifying userspace Arvind Yadav
2026-08-27 10:35   ` sashiko-bot
2026-08-27 10:17 ` [PATCH 10/13] drm/xe/ttm: Reject VRAM allocations on wedged devices Arvind Yadav
2026-08-31 21:03   ` Rodrigo Vivi
2026-09-01  8:19     ` Yadav, Arvind
2026-08-27 10:17 ` [PATCH 11/13] drm/xe/guc: Skip timeout recovery on a wedged device Arvind Yadav
2026-08-31 21:01   ` Rodrigo Vivi
2026-08-27 10:18 ` [PATCH 12/13] drm/xe: Skip PM notifier preparation for wedged devices Arvind Yadav
2026-08-31 21:00   ` Rodrigo Vivi
2026-09-01  7:03     ` Yadav, Arvind
2026-09-02 19:21       ` Rodrigo Vivi
2026-08-27 10:18 ` [PATCH 13/13] drm/xe: Block BO VM access when device I/O is unavailable Arvind Yadav
2026-08-27 10:30   ` sashiko-bot
2026-08-27 10:24 ` ✗ CI.checkpatch: warning for drm/xe: Isolate wedged devices from hardware access Patchwork
2026-08-27 10:26 ` ✓ CI.KUnit: success " Patchwork
2026-08-27 11:03 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-27 12:16 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-10 10:45 ` [PATCH 00/13] " Thomas Hellström

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=apFyxAB1BYB0qtRh@black.igk.intel.com \
    --to=raag.jadav@intel.com \
    --cc=arvind.yadav@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=thomas.hellstrom@linux.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 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.