[PATCH v2] drm/xe/vf: Enable CCS save/restore only on supported GUC versions

Michal Wajdeczko michal.wajdeczko at intel.com
Thu Aug 21 07:34:47 UTC 2025



On 8/20/2025 1:48 PM, Satyanarayana K V P wrote:
> CCS save/restore is supported starting with GuC compatibility version
> 1.23.0. Gate the feature on the GuC firmware version and keep it disabled
> on older or unsupported versions.
> 
> Fixes: f3009272ff2e ("drm/xe/vf: Create contexts for CCS read write")
> Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> 
> ---
> V1 -> V2:
> - Fixed review comments (Michal)
> ---
>  drivers/gpu/drm/xe/xe_sriov_vf_ccs.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> index 4872e43eb440..9ace6f83c0ec 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> @@ -10,6 +10,7 @@
>  #include "xe_device.h"
>  #include "xe_exec_queue.h"
>  #include "xe_exec_queue_types.h"
> +#include "xe_guc.h"
>  #include "xe_guc_submit.h"
>  #include "xe_lrc.h"
>  #include "xe_migrate.h"
> @@ -258,6 +259,7 @@ static void xe_sriov_vf_ccs_fini(void *arg)
>  int xe_sriov_vf_ccs_init(struct xe_device *xe)
>  {
>  	struct xe_tile *tile = xe_device_get_root_tile(xe);
> +	struct xe_guc *guc = &tile->primary_gt->uc.guc;
>  	enum xe_sriov_vf_ccs_rw_ctxs ctx_id;
>  	struct xe_tile_vf_ccs *ctx;
>  	struct xe_exec_queue *q;
> @@ -268,6 +270,11 @@ int xe_sriov_vf_ccs_init(struct xe_device *xe)
>  	xe_assert(xe, !IS_DGFX(xe));
>  	xe_assert(xe, xe_device_has_flat_ccs(xe));
>  
> +	if (GUC_SUBMIT_VER(guc) < MAKE_GUC_VER(1, 23, 0)) {
> +		xe_sriov_info(xe, "CCS s/r is not supported by this Guc version\n");

maybe "notice" level is more appropriate here?

also it would be good to tell the user what is the min expected ABI version that is required here

and "s/r" might be hard to understand

s/Guc/GuC

and since CCS S/R would be badly broken, do we really want to allow running migration recovery and then investigate random errors?

what about updating vf_migration_supported() to avoid recovery at all?


> +		return 0;
> +	}
> +
>  	for_each_ccs_rw_ctx(ctx_id) {
>  		ctx = &tile->sriov.vf.ccs[ctx_id];
>  		ctx->ctx_id = ctx_id;



More information about the Intel-xe mailing list