From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 B400F3264F1 for ; Fri, 10 Apr 2026 15:46:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775836008; cv=none; b=YyC6zbdUYS1Wf2qD7aKCHI4GM/6xfcx8az6aaYGvAtKd7A1XQS5MhYkiScm2Eoh05ftU9AOTeJl3D09ocl55geCA+tzdu6zm9k4EKHx4jHnmqbLZrCYyaE7FRrtaMhsvrdGU7Io/LEP6RIA9GYjG6yw0iTlEXrTOQiauipEvEgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775836008; c=relaxed/simple; bh=WAx1LNvioKRn28eM5697qiLc+7PET40BSEUYBAgccKM=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=G4kcq8lSW7Egj32p1bFx72GD3b8XAsLVeTfCH4p+o9M9OM8Gf53hIC3/qo3L4yiqJwIZYkmHVIeUB9PJ5cVbpbQ2a1ZNtD/m7jVmUvNP0juiMsFsLyWIAQ4OUmU5VtEsJy41Q8fl5zoMlJf+67K9g5+FYy9CbETyM/OHQR+WSM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=b40GNxG4; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="b40GNxG4" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ikqZi0GGq93XbugeL07Wq+YNYTcvQYQg5VkmtaMiWyg=; b=b40GNxG4iWbhVmc2yTZgHUkLjM DMY0cpkAinVX3YB+pBnxIvb+1SQFxPcovohFs7Xtsnzx1MImJKQZ5NGXQ3i6r8WRJ/Yb2XNMojT94 loYGpHeYGGFMWumDd5PmsdwnrY3QlmWmd2jJrh2vPAtEOJaJKjugq42MwISUDF3SMdAjw1QkL04rU DAiJrOXGeIwGoUScukPq1hLgAEgo8c2vqcewiGBWx+28HoiREukfJAMmCNokqiMCggbkqr4hjCJk4 SxRBJxnoq06CtGYKd7amw4yPAVtTJSYvF+ZFjlMyWoQOjO0INLV+ECkUgkmfMQf0sMH+JPgq2cbVv 3MtYFUmg==; Received: from [90.240.106.137] (helo=[192.168.0.101]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1wBE4C-00ESNz-JH; Fri, 10 Apr 2026 17:46:44 +0200 Message-ID: Date: Fri, 10 Apr 2026 16:46:44 +0100 Precedence: bulk X-Mailing-List: criu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] plugin/amdgpu: Add plugin to inventory even if there are no vmas To: David Francis , criu@lists.linux.dev References: <20260410144509.738903-1-David.Francis@amd.com> <20260410144509.738903-2-David.Francis@amd.com> Content-Language: en-GB From: Tvrtko Ursulin In-Reply-To: <20260410144509.738903-2-David.Francis@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/04/2026 15:45, David Francis wrote: > 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 > --- > 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); This is very similar to the patch I submitted and you reviewed. Just so happens I have to rebase since when I collected all r-b's the series does not apply any longer. I don't mind hugely if you take authorship but some sort of a acknowledgement tag would have been nice. Regards, Tvrtko