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 v2 2/2] drm/xe/vf: Reset recovery_queued after issuing RESFIX_START
Date: Mon, 8 Dec 2025 13:16:06 -0800 [thread overview]
Message-ID: <aTdAFjR0kkXNCwkV@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20251208072739.336647-6-satyanarayana.k.v.p@intel.com>
On Mon, Dec 08, 2025 at 07:27:42AM +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>
> Cc: Tomasz Lis <tomasz.lis@intel.com>
>
> ---
> 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..23ab25e407dc 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);
> +
> + scoped_guard(spinlock_irq, >->sriov.vf.migration.lock)
Also you can just use guard here, but fine either way.
> + gt->sriov.vf.migration.recovery_queued = false;
> +
> + return err;
Extra space.
Matt
> }
>
> static u16 vf_post_migration_next_resfix_marker(struct xe_gt *gt)
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-12-08 21:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 7:27 [PATCH v2 0/2] Reset recovery_queued after issuing RESFIX_START Satyanarayana K V P
2025-12-08 7:27 ` [PATCH v2 1/2] drm/xe/vf: Avoid queuing migration recovery if queued or teardown is active Satyanarayana K V P
2025-12-08 21:11 ` Michal Wajdeczko
2025-12-08 21:14 ` Matthew Brost
2025-12-08 7:27 ` [PATCH v2 2/2] drm/xe/vf: Reset recovery_queued after issuing RESFIX_START Satyanarayana K V P
2025-12-08 21:16 ` Matthew Brost [this message]
2025-12-08 8:02 ` ✓ CI.KUnit: success for Reset recovery_queued after issuing RESFIX_START (rev2) Patchwork
2025-12-08 9:04 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-08 9:42 ` ✗ 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=aTdAFjR0kkXNCwkV@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