From: Matthew Brost <matthew.brost@intel.com>
To: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Michal Wajdeczko <michal.wajdeczko@intel.com>,
Tomasz Lis <tomasz.lis@intel.com>
Subject: Re: [PATCH v3 2/2] drm/xe/vf: Reset recovery_queued after issuing RESFIX_START
Date: Tue, 9 Dec 2025 21:39:25 -0800 [thread overview]
Message-ID: <aTkHjclBK1ly6Hsz@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251210052546.622809-6-satyanarayana.k.v.p@intel.com>
On Wed, Dec 10, 2025 at 05:25:49AM +0000, Satyanarayana K V P wrote:
> During VF_RESTORE or VF_RESUME, the GuC sends a migration interrupt and
> clears the RESFIX_START marker. If migration or resume occurs before the
> VF issues its own RESFIX_START, VF KMD may receive two back-to-back
> migration interrupts. VF then sends RESFIX_START to indicate the beginning
> of fixups and RESFIX_DONE to mark completion. However, the second
> RESFIX_START fails because the GuC is already in the RUNNING state.
>
> Clear the recovery_queued flag after sending a RESFIX_START message to
> ignore duplicated IRQs seen before we start actual recovery.
>
> This ensures the state is reset only after the fixup process begins,
> avoiding redundant work item queuing.
>
> Fixes: b5fbb94341a2 ("drm/xe/vf: Introduce RESFIX start marker support")
> Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> Cc: Tomasz Lis <tomasz.lis@intel.com>
>
> ---
> V2 -> V3:
> - Fixed review comments (Matt B).
>
> V1 -> V2:
> - Fixed review comments (Michal W).
> - Updated commit message.
> - Used scoped_guard for spin_lock/unlock_irq.
> ---
> drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> index 47612e67d462..b8b391cfc8eb 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> @@ -1171,10 +1171,6 @@ static bool vf_post_migration_shutdown(struct xe_gt *gt)
> return true;
> }
>
> - spin_lock_irq(>->sriov.vf.migration.lock);
> - gt->sriov.vf.migration.recovery_queued = false;
> - spin_unlock_irq(>->sriov.vf.migration.lock);
> -
> xe_guc_ct_flush_and_stop(>->uc.guc.ct);
> xe_guc_submit_pause_vf(>->uc.guc);
> xe_tlb_inval_reset(>->tlb_inval);
> @@ -1258,7 +1254,14 @@ static int vf_post_migration_resfix_done(struct xe_gt *gt, u16 marker)
>
> static int vf_post_migration_resfix_start(struct xe_gt *gt, u16 marker)
> {
> - return vf_resfix_start(gt, marker);
> + int err;
> +
> + err = vf_resfix_start(gt, marker);
> +
> + guard(spinlock_irq) (>->sriov.vf.migration.lock);
> + gt->sriov.vf.migration.recovery_queued = false;
> +
> + return err;
> }
>
> static u16 vf_post_migration_next_resfix_marker(struct xe_gt *gt)
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-12-10 5:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 5:25 [PATCH v3 0/2] Reset recovery_queued after issuing RESFIX_START Satyanarayana K V P
2025-12-10 5:25 ` [PATCH v3 1/2] drm/xe/vf: Fix queuing of recovery work Satyanarayana K V P
2025-12-10 5:25 ` [PATCH v3 2/2] drm/xe/vf: Reset recovery_queued after issuing RESFIX_START Satyanarayana K V P
2025-12-10 5:39 ` Matthew Brost [this message]
2025-12-11 13:41 ` Michal Wajdeczko
2025-12-11 4:32 ` ✓ CI.KUnit: success for Reset recovery_queued after issuing RESFIX_START (rev4) Patchwork
2025-12-11 5:34 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-11 11:42 ` ✗ Xe.CI.Full: failure " Patchwork
2025-12-11 11:46 ` K V P, Satyanarayana
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=aTkHjclBK1ly6Hsz@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.wajdeczko@intel.com \
--cc=satyanarayana.k.v.p@intel.com \
--cc=tomasz.lis@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