All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: Correctly handle multi-xcc mqd size in CRIU restore
@ 2026-11-23 19:25 David Francis
  2026-11-23 19:34 ` sashiko-bot
  2026-11-23 20:14 ` Yat Sin, David
  0 siblings, 2 replies; 3+ messages in thread
From: David Francis @ 2026-11-23 19:25 UTC (permalink / raw)
  To: amd-gfx; +Cc: David Francis, David Yat Sin, Alex Deucher

kfd_criu_restore_queue validates that a CRIU restore has the
correct mqd size, but doesn't correctly handle that the mqd
will be scaled but the number of xccs.

Change the check to handle multiple xccs correctly.

Cc: David Yat Sin <david.yatsin@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Fixes: 47ea05f246be ("drm/amdkfd: Check bounds on CRIU restore queue type and mqd size")
Signed-off-by: David Francis <David.Francis@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index 6cc0365e9b11..6a9d7d31c8d4 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -1030,7 +1030,8 @@ int kfd_criu_restore_queue(struct kfd_process *p,
 		goto exit;
 	}
 
-	if (q_data->mqd_size != mqd_size_from_queue_type(pdd->dev->dqm, q_data->type)) {
+	if (q_data->mqd_size != mqd_size_from_queue_type(pdd->dev->dqm, q_data->type) *
+			NUM_XCC(pdd->dev->xcc_mask)) {
 		ret = -EINVAL;
 		goto exit;
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-23 20:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 19:25 [PATCH] drm/amdkfd: Correctly handle multi-xcc mqd size in CRIU restore David Francis
2026-11-23 19:34 ` sashiko-bot
2026-11-23 20:14 ` Yat Sin, David

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.