Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Michał Winiarski" <michal.winiarski@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/xe/pf: Add support for VF Pause abort event
Date: Fri, 26 Jun 2026 09:12:26 +0200	[thread overview]
Message-ID: <d10306e5-c38b-4097-ae98-409ea78f80d9@intel.com> (raw)
In-Reply-To: <20260624095634.1250956-2-michal.winiarski@intel.com>



On 6/24/2026 11:56 AM, Michał Winiarski wrote:
> GuC can notify the PF that the VF Pause has been aborted.
> Handle it on the PF side by moving the VF into PAUSE_FAILED state.
> 
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
> ---
>  drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h |  2 ++
>  drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c    | 14 ++++++++++++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
> index d9f21202e1a9f..8665b8c5b7336 100644
> --- a/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
> @@ -229,6 +229,7 @@
>   *  |   |       |   - _`GUC_PF_NOTIFY_VF_FLR_DONE` = 2                         |
>   *  |   |       |   - _`GUC_PF_NOTIFY_VF_PAUSE_DONE` = 3                       |
>   *  |   |       |   - _`GUC_PF_NOTIFY_VF_FIXUP_DONE` = 4                       |
> + *  |   |       |   - _`GUC_PF_NOTIFY_VF_PAUSE_ABORTED` = 5                    |
>   *  +---+-------+--------------------------------------------------------------+
>   */
>  #define GUC_ACTION_GUC2PF_VF_STATE_NOTIFY		0x5106u
> @@ -242,6 +243,7 @@
>  #define   GUC_PF_NOTIFY_VF_FLR_DONE			2u
>  #define   GUC_PF_NOTIFY_VF_PAUSE_DONE			3u
>  #define   GUC_PF_NOTIFY_VF_FIXUP_DONE			4u
> +#define   GUC_PF_NOTIFY_VF_PAUSE_ABORTED		5u
>  
>  /**
>   * DOC: VF2GUC_MATCH_VERSION
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c
> index 65f015d0ede51..82957c596b683 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c
> @@ -1953,6 +1953,17 @@ static void pf_handle_vf_pause_done(struct xe_gt *gt, u32 vfid)
>  	pf_enter_vf_pause_guc_done(gt, vfid);
>  }
>  
> +static void pf_handle_vf_pause_aborted(struct xe_gt *gt, u32 vfid)
> +{
> +	if (!pf_exit_pause_wait_guc(gt, vfid)) {
> +		xe_gt_sriov_dbg(gt, "Received out of order 'VF%u PAUSE aborted'\n", vfid);
> +		pf_enter_vf_mismatch(gt, vfid);
> +		return;
> +	}
> +
> +	pf_enter_vf_pause_failed(gt, vfid);

hmm, after PAUSE sequence was aborted by the GuC, the GuC seems
to keep the VF in a MIDPAUSE state, while our PAUSE_FAILED state
actually exits the WIP state (which is good IMO) so we will be
able to initiate PAUSE action again - question whether that will
be accepted by GuC or not ... but if not, we will return to the
PAUSE_FAILED state again (this is already covered)

but we should update our PAUSE state machine diagram with this
new transition, rest LGTM


> +}
> +
>  static int pf_handle_vf_event(struct xe_gt *gt, u32 vfid, u32 eventid)
>  {
>  	xe_gt_sriov_dbg_verbose(gt, "received VF%u event %#x\n", vfid, eventid);
> @@ -1972,6 +1983,9 @@ static int pf_handle_vf_event(struct xe_gt *gt, u32 vfid, u32 eventid)
>  		break;
>  	case GUC_PF_NOTIFY_VF_FIXUP_DONE:
>  		break;
> +	case GUC_PF_NOTIFY_VF_PAUSE_ABORTED:
> +		pf_handle_vf_pause_aborted(gt, vfid);
> +		break;
>  	default:
>  		xe_gt_sriov_notice(gt, "unrecognized VF%u event %#x\n", vfid, eventid);
>  	}


  reply	other threads:[~2026-06-26  7:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  9:56 [PATCH 1/3] drm/xe/pf: Do not return an error for unrecognized VF events Michał Winiarski
2026-06-24  9:56 ` [PATCH 2/3] drm/xe/pf: Add support for VF Pause abort event Michał Winiarski
2026-06-26  7:12   ` Michal Wajdeczko [this message]
2026-06-24  9:56 ` [PATCH 3/3] drm/xe/pf: Add the definition of VF resfix " Michał Winiarski
2026-06-24 12:02   ` K V P, Satyanarayana
2026-06-24 10:02 ` ✗ CI.checkpatch: warning for series starting with [1/3] drm/xe/pf: Do not return an error for unrecognized VF events Patchwork
2026-06-24 10:03 ` ✓ CI.KUnit: success " Patchwork
2026-06-24 11:59 ` [PATCH 1/3] " K V P, Satyanarayana
2026-06-24 12:19 ` ✓ Xe.CI.BAT: success for series starting with [1/3] " Patchwork
2026-06-24 13:32 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-25 21:21 ` [PATCH 1/3] " Michal Wajdeczko
2026-06-25 21:42   ` Daniele Ceraolo Spurio
2026-06-25 23:03     ` Michal Wajdeczko
2026-06-25 23:35       ` Daniele Ceraolo Spurio
2026-06-26  7:41         ` Michal Wajdeczko

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=d10306e5-c38b-4097-ae98-409ea78f80d9@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.winiarski@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