All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Francis <David.Francis@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: David Francis <David.Francis@amd.com>,
	David Yat Sin <david.yatsin@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH] drm/amdkfd: Correctly handle multi-xcc mqd size in CRIU restore
Date: Mon, 23 Nov 2026 14:25:32 -0500	[thread overview]
Message-ID: <20261123192532.2062064-1-David.Francis@amd.com> (raw)

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


             reply	other threads:[~2026-11-23 19:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 19:25 David Francis [this message]
2026-11-23 19:34 ` [PATCH] drm/amdkfd: Correctly handle multi-xcc mqd size in CRIU restore sashiko-bot
2026-11-23 20:14 ` Yat Sin, David

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=20261123192532.2062064-1-David.Francis@amd.com \
    --to=david.francis@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=david.yatsin@amd.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 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.