From nobody Mon Feb 9 19:04:59 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E1F8375741; Thu, 30 Oct 2025 20:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.11 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761856398; cv=fail; b=Un1QF50+Pi75Bz2PpbiAcrJ+jm1f6J0St28FNuexke4W4VEOol0CvI+6+EzYYkwBvmDDY8pgorXwAdaegsXU80FoFNS+3+I2sH4IxLgWV+S81j5e/du4Q7qDFuKeXodKgmKrNHCk4Y3Ac2CCpVou2ZB+gt/PjXqOpad3W/BZ6gs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761856398; c=relaxed/simple; bh=v6xbXWD0KzEjibPG+13xoyiQBUmIoDH8KXr3RNZV/4w=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=SG6LoOBYSxNS3BDwT3ZCRWDkbYwZQ1DeNiYIQDZu6gTzCPFkcLWXhUCT1wiVw7YapQYO9m2UI1QpKJOIwLDe/MDb2vFdVd5ig12RYNUUf5wD+kS2dQ/5HYVkfHc66vPuWYTD6K+LJTMd0DwlIeuZmHXrZ2rpnKoPE0JhzL0DIQI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ERZqRhuz; arc=fail smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ERZqRhuz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761856396; x=1793392396; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=v6xbXWD0KzEjibPG+13xoyiQBUmIoDH8KXr3RNZV/4w=; b=ERZqRhuz8XBxqXbM5sstO1UbxV6dYLuDrqy0DscPE4hRWlzuzFe3vX6Z 93dzIwxCWUvZNWfJRMXEJgaoiRFXWzc2LOxo02zWEYwhZnkxg7w6/Gzur lwIvtZ4XAO8KqqyDTldSxCSt5gfLjHabWeoR0h/MeAF6/S4/OF4pL2nzG Dd2AZxgbrMvf7aX8EPXT8EEJ/V1dADzs3aE+hRgvYsxF7XzhD8HW3liAl Ao8iztrGejyIedXp4g4KUOTJIHnipCuYujXBi6tbE4aEzSiuoEDmF/IQg RQWlHcq6VG93diBxxrpwPDEl/yOw/RxxEUaK5NGP/1tqcMxigMgM7dJXt A==; X-CSE-ConnectionGUID: G9Fbe73nSRuvzLAnUn0l6g== X-CSE-MsgGUID: jpY9enxAQOKEUZWHIySQTQ== X-IronPort-AV: E=McAfee;i="6800,10657,11598"; a="74611407" X-IronPort-AV: E=Sophos;i="6.19,267,1754982000"; d="scan'208";a="74611407" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2025 13:33:15 -0700 X-CSE-ConnectionGUID: 64JvrQqNQriG1k47KE5tpA== X-CSE-MsgGUID: 3SGmOx58Q7e+MLQNq8b9xQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,267,1754982000"; d="scan'208";a="186791338" Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23]) by fmviesa010.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2025 13:33:15 -0700 Received: from ORSMSX903.amr.corp.intel.com (10.22.229.25) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Thu, 30 Oct 2025 13:33:14 -0700 Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27 via Frontend Transport; Thu, 30 Oct 2025 13:33:14 -0700 Received: from CH4PR04CU002.outbound.protection.outlook.com (40.107.201.28) by edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Thu, 30 Oct 2025 13:33:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d5TIm+/JMG9SF6pC6JvkkQL8JgeeQLuWz4g2idKOo3Qg6R3i2ZPFAepPLJ/Ko1TmsA0kvUb8Y32auO4UlsYSKSArStlkrH5CtdNy0JNOLAdTyY7mtur/QAod4bJ2071B1JNBmamE50MgXS2LCohEcf+dtMLFYrMbEe31AU3BTfYDgny+WeT9EUlicCJoemSg+IhVx0VX7RgY4J59XTcllROFGRoRjKW8BQ+TgdkMGX5V3A1mFjhM4UQkFSpJNbtAcLsvnTSxy0O03ed4wQzUw5WPqhU5dv1QK3rVtUvlIHs1NA0+W85foNeTLp41PYavABq1Vxh1Yf1IuKdqTb4JlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SA1fY9NdE+F8WVHOawUzkrjr9Q5+YoFpRU2NG8a3z8s=; b=tWua4EGHMLhuDvmwFxayysqgYj1nZtezTn5pqHvVHF2iixyHsEMHwvIS8C0vgeBVlqQGSOv8yrhGynLIjjIEvIHsHhPskA1Fy/BtnPT2q2Qn5bk34CVr12Sn9CbV6wd0WwArD6YbMoXY3DowKQGs5FWxQiVIk2t+0Z11O4spAZqyOTXJb4Jt4AVugE90cWCULoRUf4pODj0wba+Rcdy20ATFRaP8dhnz2MajDvAN93uDc++JZxRxvqPploaoNgx4dd0AtBrn8lxVFPFpjUJZjIu7KgvoTcxSXHms9AbCEv6zpLBBi1FcGAtxo9zNcMWR4bxo0APGw0S5xcVCV0FF+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) by CO1PR11MB4817.namprd11.prod.outlook.com (2603:10b6:303:98::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.14; Thu, 30 Oct 2025 20:33:12 +0000 Received: from DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::927a:9c08:26f7:5b39]) by DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::927a:9c08:26f7:5b39%5]) with mapi id 15.20.9275.011; Thu, 30 Oct 2025 20:33:12 +0000 From: =?UTF-8?q?Micha=C5=82=20Winiarski?= To: Alex Williamson , Lucas De Marchi , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Rodrigo Vivi , Jason Gunthorpe , Yishai Hadas , Kevin Tian , Shameer Kolothum , , , , Matthew Brost , "Michal Wajdeczko" CC: , Jani Nikula , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , Simona Vetter , "Lukasz Laguna" , Christoph Hellwig , =?UTF-8?q?Micha=C5=82=20Winiarski?= Subject: [PATCH v3 15/28] drm/xe/pf: Switch VF migration GuC save/restore to struct migration data Date: Thu, 30 Oct 2025 21:31:22 +0100 Message-ID: <20251030203135.337696-16-michal.winiarski@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251030203135.337696-1-michal.winiarski@intel.com> References: <20251030203135.337696-1-michal.winiarski@intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: VI1P195CA0064.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::17) To DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5373:EE_|CO1PR11MB4817:EE_ X-MS-Office365-Filtering-Correlation-Id: fd875de4-e27d-40f9-d0cb-08de17f38bb1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|366016|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?c1N5SzdUM1UzYlRvRklWcGFZQkxqdEM1N0NOS2JiemY4enlWeHlRWGdqdFB5?= =?utf-8?B?N2VNQzVqVXZ5UFhzRmhHNDkvTGFRaWlWYy9IcENrLzErY21JUDJBZHRDVUhl?= =?utf-8?B?VERiQnlJUVppR0xhV3V2alBvRWE3MjhTUFpQT3JSZENoYU05K1dIekdudVVi?= =?utf-8?B?cXJBU3V2RGFqVUxpT1AwT0tuYXBvbFJZSW1aV2pKVGJKcGZvR0h6MEVkMW1k?= =?utf-8?B?TE1VUHNNUmJwand5UUoxUnUrSXVINTNnUGcwdUhWclB6Y3NDRmhvMWR5NW92?= =?utf-8?B?L2hzWFdDa1B4bVhKcUEzNUFJVDAzekJQRmpEWnJTRnZrbGM5R3dpcis5c2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5NElpYU9IOUxPN09OK2hzMlZk?= =?utf-8?B?U3hQRit6SE4yOThCOHdyTTEwNU1yaHhDRkgzR2J1ZDJQdktUZ0tONklucGdo?= =?utf-8?B?b2JaSS9zcVBJd2ZZMFJwMFB6YWF2ODQ2VHV4YUIzSVpmYTBybmpZMWNpWW9p?= =?utf-8?B?SEdmYkdkNjFiK3R1OHgzbzBsOTFMWm53N3llN09PbmdUeFUyelVTZHUwQS9Y?= =?utf-8?B?Yk9OWDhRN1NPbHhWQ25ac25LN3d6Rk5wNldaR2laVkVIdmFyOTRlOUVOeEN4?= =?utf-8?B?clkxNU9KSnhTOElnand6cWdCdTZ0YVBOTzN0ZFZOKzc2a25YNWdqUnpHTUgx?= =?utf-8?B?MmtqZHMvTjg4UXltZlg2N1hwWWFidzZyVENLS2JmN2tVb1BHTExRTWREcUgy?= =?utf-8?B?eWErS2xDaVkrU2w5ZGtMNW5uYVQxSHhVTC9kVklkUnIyWWRtNmQyazk3SEpS?= =?utf-8?B?bmZuWStRN3RuM0RBM0gyTEtMd2FKcVpiZzlDYVVGSnZrVkcwS1gyNVRmMHJL?= =?utf-8?B?NGpoeGcvdS9wc1ZjMmV5R3RVeUllZkpvY0NIeEdGS3lubllIWlpQdnFrMlhS?= =?utf-8?B?RUxXUFpramE3RTFReWorbG11TDd3cytqMWRLbExjWFZEbnBTZU1ITy9FVGlU?= =?utf-8?B?ZTJ6TVRVYlQ4WVpRU1E5K1d6dWtwd2NoZytNb0c0Uk9oSmkySlFUWk1aMGti?= =?utf-8?B?dUdxdHNzTzZla1pDclVRN1A1MGVqYm1jNUphQitiQ3dqYnVTVGVKVHducXcv?= =?utf-8?Q?YiOh9LW4v4pguM5dnh31y5I7N5iZSs=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB5373.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(366016)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3lleDhPL1ZuV0ZDWVNnY1FUT2xqS2pIYVR5NDBPUFllbDhUM1dG?= =?utf-8?B?RFpma0NHdWE2djZ0ZmdIVmxScjd2Y1hXM00wNW5mNFJzTHE1MHJSbGxiTytZ?= =?utf-8?B?SXhvdWxPZXcvTng2YXRlZ0JCb255L3prT2p2SEpPU1R4MStsK3FQODdYRHVS?= =?utf-8?B?eW9tNFZEcUlWanR2dzl1eTRkdDdCeHRSQnBLeW9WZUM0aHhsY0R4aDdRaUp5?= =?utf-8?B?RFlOKzFPUjhDamE4UHh1ZXZGV0c4d3pEUWRjODZDTVJBNFpQQzBaSmhMN3lm?= =?utf-8?B?UzNrYkFMTE9relRIMnFNQVdtbUx0S0xNVC9BNUZ1VXJhQ0Yzdml2M2dDNXNj?= =?utf-8?B?L0JuK3hBZHJpVit3SEJ3V0VvNGVEVlRSUGdkZlVsTU5uR1BuZWVFVS9Bdnk3?= =?utf-8?B?ck13eVhQVFlwck1LZThWZURRQjFUeFNPMEtLOTRSVWFrUE90REZ6Wk9kQ0VD?= =?utf-8?B?bHc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: fd875de4-e27d-40f9-d0cb-08de17f38bb1 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2025 20:33:12.4018 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: q33GqEXiGs4OzzjIMwRihNYXDJyLJqxoQ9T+zmowHBuPF0SIgfRxuTMtl4LM/vik7xnlGlqogcsyoNYhG9+jd0inlPa/4RhfFrrUWBldIaI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4817 X-OriginatorOrg: intel.com In upcoming changes, the GuC VF migration data will be handled as part of separate SAVE/RESTORE states in VF control state machine. Now that the data is decoupled from both guc_state debugfs and PAUSE state, we can safely remove the struct xe_gt_sriov_state_snapshot and modify the GuC save/restore functions to operate on struct xe_sriov_migration_data. Signed-off-by: Micha=C5=82 Winiarski --- drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c | 265 +++++------------- drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.h | 13 +- .../drm/xe/xe_gt_sriov_pf_migration_types.h | 27 -- drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h | 4 - 4 files changed, 79 insertions(+), 230 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c b/drivers/gpu/dr= m/xe/xe_gt_sriov_pf_migration.c index a2db127982638..4a716e0a29fe4 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.c @@ -28,6 +28,17 @@ static struct xe_gt_sriov_migration_data *pf_pick_gt_mig= ration(struct xe_gt *gt, return >->sriov.pf.vfs[vfid].migration; } =20 +static void pf_dump_mig_data(struct xe_gt *gt, unsigned int vfid, + struct xe_sriov_migration_data *data) +{ + if (IS_ENABLED(CONFIG_DRM_XE_DEBUG_SRIOV)) { + print_hex_dump_bytes("mig_hdr: ", DUMP_PREFIX_OFFSET, + &data->hdr, sizeof(data->hdr)); + print_hex_dump_bytes("mig_data: ", DUMP_PREFIX_OFFSET, + data->vaddr, min(SZ_64, data->size)); + } +} + /* Return: number of dwords saved/restored/required or a negative error co= de on failure */ static int guc_action_vf_save_restore(struct xe_guc *guc, u32 vfid, u32 op= code, u64 addr, u32 ndwords) @@ -47,7 +58,7 @@ static int guc_action_vf_save_restore(struct xe_guc *guc,= u32 vfid, u32 opcode, } =20 /* Return: size of the state in dwords or a negative error code on failure= */ -static int pf_send_guc_query_vf_state_size(struct xe_gt *gt, unsigned int = vfid) +static int pf_send_guc_query_vf_mig_data_size(struct xe_gt *gt, unsigned i= nt vfid) { int ret; =20 @@ -56,8 +67,8 @@ static int pf_send_guc_query_vf_state_size(struct xe_gt *= gt, unsigned int vfid) } =20 /* Return: number of state dwords saved or a negative error code on failur= e */ -static int pf_send_guc_save_vf_state(struct xe_gt *gt, unsigned int vfid, - void *dst, size_t size) +static int pf_send_guc_save_vf_mig_data(struct xe_gt *gt, unsigned int vfi= d, + void *dst, size_t size) { const int ndwords =3D size / sizeof(u32); struct xe_guc *guc =3D >->uc.guc; @@ -85,8 +96,8 @@ static int pf_send_guc_save_vf_state(struct xe_gt *gt, un= signed int vfid, } =20 /* Return: number of state dwords restored or a negative error code on fai= lure */ -static int pf_send_guc_restore_vf_state(struct xe_gt *gt, unsigned int vfi= d, - const void *src, size_t size) +static int pf_send_guc_restore_vf_mig_data(struct xe_gt *gt, unsigned int = vfid, + const void *src, size_t size) { const int ndwords =3D size / sizeof(u32); struct xe_guc *guc =3D >->uc.guc; @@ -114,120 +125,67 @@ static bool pf_migration_supported(struct xe_gt *gt) return xe_sriov_pf_migration_supported(gt_to_xe(gt)); } =20 -static struct mutex *pf_migration_mutex(struct xe_gt *gt) +static int pf_save_vf_guc_mig_data(struct xe_gt *gt, unsigned int vfid) { - xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt))); - return >->sriov.pf.migration.snapshot_lock; -} - -static struct xe_gt_sriov_state_snapshot *pf_pick_vf_snapshot(struct xe_gt= *gt, - unsigned int vfid) -{ - xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt))); - xe_gt_assert(gt, vfid <=3D xe_sriov_pf_get_totalvfs(gt_to_xe(gt))); - lockdep_assert_held(pf_migration_mutex(gt)); - - return >->sriov.pf.vfs[vfid].snapshot; -} - -static unsigned int pf_snapshot_index(struct xe_gt *gt, struct xe_gt_sriov= _state_snapshot *snapshot) -{ - return container_of(snapshot, struct xe_gt_sriov_metadata, snapshot) - gt= ->sriov.pf.vfs; -} - -static void pf_free_guc_state(struct xe_gt *gt, struct xe_gt_sriov_state_s= napshot *snapshot) -{ - struct xe_device *xe =3D gt_to_xe(gt); - - drmm_kfree(&xe->drm, snapshot->guc.buff); - snapshot->guc.buff =3D NULL; - snapshot->guc.size =3D 0; -} - -static int pf_alloc_guc_state(struct xe_gt *gt, - struct xe_gt_sriov_state_snapshot *snapshot, - size_t size) -{ - struct xe_device *xe =3D gt_to_xe(gt); - void *p; - - pf_free_guc_state(gt, snapshot); - - if (!size) - return -ENODATA; - - if (size % sizeof(u32)) - return -EINVAL; - - if (size > SZ_2M) - return -EFBIG; - - p =3D drmm_kzalloc(&xe->drm, size, GFP_KERNEL); - if (!p) - return -ENOMEM; - - snapshot->guc.buff =3D p; - snapshot->guc.size =3D size; - return 0; -} - -static void pf_dump_guc_state(struct xe_gt *gt, struct xe_gt_sriov_state_s= napshot *snapshot) -{ - if (IS_ENABLED(CONFIG_DRM_XE_DEBUG_SRIOV)) { - unsigned int vfid __maybe_unused =3D pf_snapshot_index(gt, snapshot); - - xe_gt_sriov_dbg_verbose(gt, "VF%u GuC state is %zu dwords:\n", - vfid, snapshot->guc.size / sizeof(u32)); - print_hex_dump_bytes("state: ", DUMP_PREFIX_OFFSET, - snapshot->guc.buff, min(SZ_64, snapshot->guc.size)); - } -} - -static int pf_save_vf_guc_state(struct xe_gt *gt, unsigned int vfid) -{ - struct xe_gt_sriov_state_snapshot *snapshot =3D pf_pick_vf_snapshot(gt, v= fid); + struct xe_sriov_migration_data *data; size_t size; int ret; =20 - ret =3D pf_send_guc_query_vf_state_size(gt, vfid); + ret =3D pf_send_guc_query_vf_mig_data_size(gt, vfid); if (ret < 0) goto fail; + size =3D ret * sizeof(u32); - xe_gt_sriov_dbg_verbose(gt, "VF%u state size is %d dwords (%zu bytes)\n",= vfid, ret, size); =20 - ret =3D pf_alloc_guc_state(gt, snapshot, size); - if (ret < 0) + data =3D xe_sriov_migration_data_alloc(gt_to_xe(gt)); + if (!data) { + ret =3D -ENOMEM; goto fail; + } + + ret =3D xe_sriov_migration_data_init(data, gt->tile->id, gt->info.id, + XE_SRIOV_MIGRATION_DATA_TYPE_GUC, 0, size); + if (ret) + goto fail_free; =20 - ret =3D pf_send_guc_save_vf_state(gt, vfid, snapshot->guc.buff, size); + ret =3D pf_send_guc_save_vf_mig_data(gt, vfid, data->vaddr, size); if (ret < 0) - goto fail; + goto fail_free; size =3D ret * sizeof(u32); xe_gt_assert(gt, size); - xe_gt_assert(gt, size <=3D snapshot->guc.size); - snapshot->guc.size =3D size; + xe_gt_assert(gt, size <=3D data->size); + data->size =3D size; + data->remaining =3D size; + + xe_gt_sriov_dbg_verbose(gt, "VF%u GuC data save (%zu bytes)\n", vfid, siz= e); + pf_dump_mig_data(gt, vfid, data); + + ret =3D xe_gt_sriov_pf_migration_save_produce(gt, vfid, data); + if (ret) + goto fail_free; =20 - pf_dump_guc_state(gt, snapshot); return 0; =20 +fail_free: + xe_sriov_migration_data_free(data); fail: - xe_gt_sriov_dbg(gt, "Unable to save VF%u state (%pe)\n", vfid, ERR_PTR(re= t)); - pf_free_guc_state(gt, snapshot); + xe_gt_sriov_err(gt, "Failed to save VF%u GuC data (%pe)\n", + vfid, ERR_PTR(ret)); return ret; } =20 /** - * xe_gt_sriov_pf_migration_save_guc_state() - Take a GuC VF state snapsho= t. + * xe_gt_sriov_pf_migration_guc_size() - Get the size of VF GuC migration = data. * @gt: the &xe_gt * @vfid: the VF identifier * * This function is for PF only. * - * Return: 0 on success or a negative error code on failure. + * Return: size in bytes or a negative error code on failure. */ -int xe_gt_sriov_pf_migration_save_guc_state(struct xe_gt *gt, unsigned int= vfid) +ssize_t xe_gt_sriov_pf_migration_guc_size(struct xe_gt *gt, unsigned int v= fid) { - int err; + ssize_t size; =20 xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt))); xe_gt_assert(gt, vfid !=3D PFID); @@ -236,37 +194,15 @@ int xe_gt_sriov_pf_migration_save_guc_state(struct xe= _gt *gt, unsigned int vfid) if (!pf_migration_supported(gt)) return -ENOPKG; =20 - mutex_lock(pf_migration_mutex(gt)); - err =3D pf_save_vf_guc_state(gt, vfid); - mutex_unlock(pf_migration_mutex(gt)); - - return err; -} - -static int pf_restore_vf_guc_state(struct xe_gt *gt, unsigned int vfid) -{ - struct xe_gt_sriov_state_snapshot *snapshot =3D pf_pick_vf_snapshot(gt, v= fid); - int ret; - - if (!snapshot->guc.size) - return -ENODATA; - - xe_gt_sriov_dbg_verbose(gt, "restoring %zu dwords of VF%u GuC state\n", - snapshot->guc.size / sizeof(u32), vfid); - ret =3D pf_send_guc_restore_vf_state(gt, vfid, snapshot->guc.buff, snapsh= ot->guc.size); - if (ret < 0) - goto fail; - - xe_gt_sriov_dbg_verbose(gt, "restored %d dwords of VF%u GuC state\n", ret= , vfid); - return 0; + size =3D pf_send_guc_query_vf_mig_data_size(gt, vfid); + if (size >=3D 0) + size *=3D sizeof(u32); =20 -fail: - xe_gt_sriov_dbg(gt, "Failed to restore VF%u GuC state (%pe)\n", vfid, ERR= _PTR(ret)); - return ret; + return size; } =20 /** - * xe_gt_sriov_pf_migration_restore_guc_state() - Restore a GuC VF state. + * xe_gt_sriov_pf_migration_guc_save() - Save VF GuC migration data. * @gt: the &xe_gt * @vfid: the VF identifier * @@ -274,10 +210,8 @@ static int pf_restore_vf_guc_state(struct xe_gt *gt, u= nsigned int vfid) * * Return: 0 on success or a negative error code on failure. */ -int xe_gt_sriov_pf_migration_restore_guc_state(struct xe_gt *gt, unsigned = int vfid) +int xe_gt_sriov_pf_migration_guc_save(struct xe_gt *gt, unsigned int vfid) { - int ret; - xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt))); xe_gt_assert(gt, vfid !=3D PFID); xe_gt_assert(gt, vfid <=3D xe_sriov_pf_get_totalvfs(gt_to_xe(gt))); @@ -285,75 +219,43 @@ int xe_gt_sriov_pf_migration_restore_guc_state(struct= xe_gt *gt, unsigned int vf if (!pf_migration_supported(gt)) return -ENOPKG; =20 - mutex_lock(pf_migration_mutex(gt)); - ret =3D pf_restore_vf_guc_state(gt, vfid); - mutex_unlock(pf_migration_mutex(gt)); - - return ret; + return pf_save_vf_guc_mig_data(gt, vfid); } =20 -#ifdef CONFIG_DEBUG_FS -/** - * xe_gt_sriov_pf_migration_read_guc_state() - Read a GuC VF state. - * @gt: the &xe_gt - * @vfid: the VF identifier - * @buf: the user space buffer to read to - * @count: the maximum number of bytes to read - * @pos: the current position in the buffer - * - * This function is for PF only. - * - * This function reads up to @count bytes from the saved VF GuC state buff= er - * at offset @pos into the user space address starting at @buf. - * - * Return: the number of bytes read or a negative error code on failure. - */ -ssize_t xe_gt_sriov_pf_migration_read_guc_state(struct xe_gt *gt, unsigned= int vfid, - char __user *buf, size_t count, loff_t *pos) +static int pf_restore_vf_guc_state(struct xe_gt *gt, unsigned int vfid, + struct xe_sriov_migration_data *data) { - struct xe_gt_sriov_state_snapshot *snapshot; - ssize_t ret; + int ret; =20 - xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt))); - xe_gt_assert(gt, vfid !=3D PFID); - xe_gt_assert(gt, vfid <=3D xe_sriov_pf_get_totalvfs(gt_to_xe(gt))); + xe_gt_assert(gt, data->size); =20 - if (!pf_migration_supported(gt)) - return -ENOPKG; + xe_gt_sriov_dbg_verbose(gt, "VF%u GuC data restore (%llu bytes)\n", vfid,= data->size); + pf_dump_mig_data(gt, vfid, data); =20 - mutex_lock(pf_migration_mutex(gt)); - snapshot =3D pf_pick_vf_snapshot(gt, vfid); - if (snapshot->guc.size) - ret =3D simple_read_from_buffer(buf, count, pos, snapshot->guc.buff, - snapshot->guc.size); - else - ret =3D -ENODATA; - mutex_unlock(pf_migration_mutex(gt)); + ret =3D pf_send_guc_restore_vf_mig_data(gt, vfid, data->vaddr, data->size= ); + if (ret < 0) + goto fail; + + return 0; =20 +fail: + xe_gt_sriov_err(gt, "Failed to restore VF%u GuC data (%pe)\n", + vfid, ERR_PTR(ret)); return ret; } =20 /** - * xe_gt_sriov_pf_migration_write_guc_state() - Write a GuC VF state. + * xe_gt_sriov_pf_migration_guc_restore() - Restore VF GuC migration data. * @gt: the &xe_gt * @vfid: the VF identifier - * @buf: the user space buffer with GuC VF state - * @size: the size of GuC VF state (in bytes) * * This function is for PF only. * - * This function reads @size bytes of the VF GuC state stored at user space - * address @buf and writes it into a internal VF state buffer. - * - * Return: the number of bytes used or a negative error code on failure. + * Return: 0 on success or a negative error code on failure. */ -ssize_t xe_gt_sriov_pf_migration_write_guc_state(struct xe_gt *gt, unsigne= d int vfid, - const char __user *buf, size_t size) +int xe_gt_sriov_pf_migration_guc_restore(struct xe_gt *gt, unsigned int vf= id, + struct xe_sriov_migration_data *data) { - struct xe_gt_sriov_state_snapshot *snapshot; - loff_t pos =3D 0; - ssize_t ret; - xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt))); xe_gt_assert(gt, vfid !=3D PFID); xe_gt_assert(gt, vfid <=3D xe_sriov_pf_get_totalvfs(gt_to_xe(gt))); @@ -361,21 +263,8 @@ ssize_t xe_gt_sriov_pf_migration_write_guc_state(struc= t xe_gt *gt, unsigned int if (!pf_migration_supported(gt)) return -ENOPKG; =20 - mutex_lock(pf_migration_mutex(gt)); - snapshot =3D pf_pick_vf_snapshot(gt, vfid); - ret =3D pf_alloc_guc_state(gt, snapshot, size); - if (!ret) { - ret =3D simple_write_to_buffer(snapshot->guc.buff, size, &pos, buf, size= ); - if (ret < 0) - pf_free_guc_state(gt, snapshot); - else - pf_dump_guc_state(gt, snapshot); - } - mutex_unlock(pf_migration_mutex(gt)); - - return ret; + return pf_restore_vf_guc_state(gt, vfid, data); } -#endif /* CONFIG_DEBUG_FS */ =20 /** * xe_gt_sriov_pf_migration_size() - Total size of migration data from all= components within a GT. @@ -599,10 +488,6 @@ int xe_gt_sriov_pf_migration_init(struct xe_gt *gt) if (!pf_migration_supported(gt)) return 0; =20 - err =3D drmm_mutex_init(&xe->drm, >->sriov.pf.migration.snapshot_lock); - if (err) - return err; - totalvfs =3D xe_sriov_pf_get_totalvfs(xe); for (n =3D 1; n <=3D totalvfs; n++) { struct xe_gt_sriov_migration_data *migration =3D pf_pick_gt_migration(gt= , n); diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.h b/drivers/gpu/dr= m/xe/xe_gt_sriov_pf_migration.h index 4f2f2783339c3..b3c18e369df79 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.h +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration.h @@ -15,8 +15,10 @@ struct xe_sriov_migration_data; #define XE_GT_SRIOV_PF_MIGRATION_GUC_DATA_MAX_SIZE SZ_8M =20 int xe_gt_sriov_pf_migration_init(struct xe_gt *gt); -int xe_gt_sriov_pf_migration_save_guc_state(struct xe_gt *gt, unsigned int= vfid); -int xe_gt_sriov_pf_migration_restore_guc_state(struct xe_gt *gt, unsigned = int vfid); +ssize_t xe_gt_sriov_pf_migration_guc_size(struct xe_gt *gt, unsigned int v= fid); +int xe_gt_sriov_pf_migration_guc_save(struct xe_gt *gt, unsigned int vfid); +int xe_gt_sriov_pf_migration_guc_restore(struct xe_gt *gt, unsigned int vf= id, + struct xe_sriov_migration_data *data); =20 ssize_t xe_gt_sriov_pf_migration_size(struct xe_gt *gt, unsigned int vfid); =20 @@ -34,11 +36,4 @@ int xe_gt_sriov_pf_migration_restore_produce(struct xe_g= t *gt, unsigned int vfid struct xe_sriov_migration_data * xe_gt_sriov_pf_migration_save_consume(struct xe_gt *gt, unsigned int vfid); =20 -#ifdef CONFIG_DEBUG_FS -ssize_t xe_gt_sriov_pf_migration_read_guc_state(struct xe_gt *gt, unsigned= int vfid, - char __user *buf, size_t count, loff_t *pos); -ssize_t xe_gt_sriov_pf_migration_write_guc_state(struct xe_gt *gt, unsigne= d int vfid, - const char __user *buf, size_t count); -#endif - #endif diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration_types.h b/drivers/= gpu/drm/xe/xe_gt_sriov_pf_migration_types.h index 84be6fac16c8b..75d8b94cbbefb 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration_types.h +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_migration_types.h @@ -6,24 +6,7 @@ #ifndef _XE_GT_SRIOV_PF_MIGRATION_TYPES_H_ #define _XE_GT_SRIOV_PF_MIGRATION_TYPES_H_ =20 -#include #include -#include - -/** - * struct xe_gt_sriov_state_snapshot - GT-level per-VF state snapshot data. - * - * Used by the PF driver to maintain per-VF migration data. - */ -struct xe_gt_sriov_state_snapshot { - /** @guc: GuC VF state snapshot */ - struct { - /** @guc.buff: buffer with the VF state */ - u32 *buff; - /** @guc.size: size of the buffer (must be dwords aligned) */ - u32 size; - } guc; -}; =20 /** * struct xe_gt_sriov_migration_data - GT-level per-VF migration data. @@ -35,14 +18,4 @@ struct xe_gt_sriov_migration_data { struct ptr_ring ring; }; =20 -/** - * struct xe_gt_sriov_pf_migration - GT-level data. - * - * Used by the PF driver to maintain non-VF specific per-GT data. - */ -struct xe_gt_sriov_pf_migration { - /** @snapshot_lock: protects all VFs snapshots */ - struct mutex snapshot_lock; -}; - #endif diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h b/drivers/gpu/drm/xe= /xe_gt_sriov_pf_types.h index 812e74d3f8f80..667b8310478d4 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h @@ -31,9 +31,6 @@ struct xe_gt_sriov_metadata { /** @version: negotiated VF/PF ABI version */ struct xe_gt_sriov_pf_service_version version; =20 - /** @snapshot: snapshot of the VF state data */ - struct xe_gt_sriov_state_snapshot snapshot; - /** @migration: per-VF migration data. */ struct xe_gt_sriov_migration_data migration; }; @@ -61,7 +58,6 @@ struct xe_gt_sriov_pf { struct xe_gt_sriov_pf_service service; struct xe_gt_sriov_pf_control control; struct xe_gt_sriov_pf_policy policy; - struct xe_gt_sriov_pf_migration migration; struct xe_gt_sriov_spare_config spare; struct xe_gt_sriov_metadata *vfs; }; --=20 2.50.1