From: David Francis <David.Francis@amd.com>
To: <criu@lists.linux.dev>
Cc: <tvrtko.ursulin@igalia.com>, David Francis <David.Francis@amd.com>
Subject: [PATCH 1/3] plugin/amdgpu: Add plugin to inventory even if there are no vmas
Date: Fri, 10 Apr 2026 10:45:07 -0400 [thread overview]
Message-ID: <20260410144509.738903-2-David.Francis@amd.com> (raw)
In-Reply-To: <20260410144509.738903-1-David.Francis@amd.com>
The amdgpu plugin is added to the plugin inventory as the first
vma map is dumped. But it's completely possible for a process to
have driver files open but no vma maps. In this case, we still
will need the plugin on restore.
Add the plugin to the inventory whenever a device file is dumped.
Signed-off-by: David Francis <David.Francis@amd.com>
---
plugins/amdgpu/amdgpu_plugin.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/plugins/amdgpu/amdgpu_plugin.c b/plugins/amdgpu/amdgpu_plugin.c
index e3ba0de64..89ab10dac 100644
--- a/plugins/amdgpu/amdgpu_plugin.c
+++ b/plugins/amdgpu/amdgpu_plugin.c
@@ -1439,6 +1439,15 @@ int amdgpu_plugin_dump_file(int fd, int id)
if (ret)
return ret;
+ if (!plugin_added_to_inventory) {
+ ret = add_inventory_plugin(CR_PLUGIN_DESC.name);
+ if (ret) {
+ pr_err("Failed to add AMDGPU plugin to inventory image\n");
+ return ret;
+ }
+ plugin_added_to_inventory = true;
+ }
+
ret = record_dumped_fd(fd, true);
if (ret)
return ret;
@@ -1543,6 +1552,15 @@ int amdgpu_plugin_dump_file(int fd, int id)
if (ret)
goto exit;
+ if (!plugin_added_to_inventory) {
+ ret = add_inventory_plugin(CR_PLUGIN_DESC.name);
+ if (ret) {
+ pr_err("Failed to add AMDGPU plugin to inventory image\n");
+ goto exit;
+ }
+ plugin_added_to_inventory = true;
+ }
+
exit:
xfree((void *)args.devices);
xfree((void *)args.bos);
--
2.34.1
next prev parent reply other threads:[~2026-04-10 14:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 14:45 [PATCH 0/3] Patches to allow amdgpu restore without kfd file David Francis
2026-04-10 14:45 ` David Francis [this message]
2026-04-10 15:46 ` [PATCH 1/3] plugin/amdgpu: Add plugin to inventory even if there are no vmas Tvrtko Ursulin
2026-04-10 16:15 ` Francis, David
2026-04-10 14:45 ` [PATCH 2/3] plugin/amdgpu: Add topology dump file David Francis
2026-04-16 14:54 ` Tvrtko Ursulin
2026-04-16 18:26 ` Francis, David
2026-04-17 9:07 ` Tvrtko Ursulin
2026-04-17 13:21 ` Francis, David
2026-04-22 13:58 ` Tvrtko Ursulin
2026-04-10 14:45 ` [PATCH 3/3] plugins/amdgpu: Make next_fd without kfd David Francis
2026-04-10 15:42 ` [PATCH 0/3] Patches to allow amdgpu restore without kfd file Tvrtko Ursulin
2026-04-10 15:46 ` Francis, David
2026-04-10 16:04 ` Tvrtko Ursulin
2026-04-10 16:12 ` Francis, 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=20260410144509.738903-2-David.Francis@amd.com \
--to=david.francis@amd.com \
--cc=criu@lists.linux.dev \
--cc=tvrtko.ursulin@igalia.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