From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B88FC44516 for ; Fri, 17 Jul 2026 22:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lzde1ha+q0b3f53Hnca6aQ3EBESk3P8v7XvgdM60Feg=; b=f4qa1UnSuwe4qK0Mg9JjoWt6wH wBOSkzmxQHtmS4RAXFB3QKFetz4MfB/fzeGz8j0ugPHVgblx1hijbLhd5aAxkW2OJ1B8D66eF2GAL WqUzVYxBXiFSNx1+4wE7OSSOYF0DLKZ1NHUFYhl61J01Rs3OK1Ys55elLjd7DTyw8TfwTEHE/NhCG 0bPj4Y+B4YVIp8n20TzhnEdr8R0rlVXV4+e45okgRKTdmgQMPgTpD/veJQSzZBqAPDeJusRJiUvuS Pi1/NK7ruIW0BCm89L1Bh0/b1FrZl4JiSWk+Vz0Q2Ey8NQ0buteemfncOwv1PUD1WJPKsPVmKJP1b lZhvIVsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wkrCS-00000003Lwd-2hrc; Fri, 17 Jul 2026 22:38:32 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wkrCP-00000003Lvf-157b for kexec@lists.infradead.org; Fri, 17 Jul 2026 22:38:31 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 49F5F1D000D3; Fri, 17 Jul 2026 18:38:25 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Fri, 17 Jul 2026 18:38:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shazbot.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1784327905; x=1784414305; bh=lzde1ha+q0b3f53Hnca6aQ3EBESk3P8v7XvgdM60Feg=; b= Q6ij4R8I96GjEjcUD1qZKp+MktX/se/U67ruWFXVdRaCcuep0Hzsq0TptKEBdQ1k BbaUQZRd3kGFDFShK3JAyN3CAJUZp05WQeRgrsX+oXSmhODXf+gmzFO4k73+T8IT tvb++PH3ocHu7i8+drrSM9PqIL3/VN1hpPpn2GK6PX0YZMvjW2PleKtFfCpa9JZe ZpNKYcI/9DNAFjMaGR5zfayIPxn4VeEap2uoS7UqtigbgKNKLQEevJ6oDpBn4H7d W+91wm1iw1CnWBmsL3K03cMVPEtuErgCy6wNJ3yuTKZqeyBM8v5DZFRajTzN/Rr8 SVl/ZSWu4nmtD96mnaTE9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1784327905; x= 1784414305; bh=lzde1ha+q0b3f53Hnca6aQ3EBESk3P8v7XvgdM60Feg=; b=k 3p91ygZHntREhMvwRvvg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mail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Jul 2026 18:38:22 -0400 (EDT) Date: Fri, 17 Jul 2026 16:38:20 -0600 From: Alex Williamson To: David Matlack Cc: kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Adithya Jayachandran , Alexander Graf , Bjorn Helgaas , Chris Li , David Rientjes , Jacob Pan , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Leon Romanovsky , Lukas Wunner , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pranjal Shrivastava , Pratyush Yadav , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , Vipin Sharma , William Tu , Yi Liu , alex@shazbot.org Subject: Re: [PATCH v7 03/12] PCI: liveupdate: Track incoming preserved PCI devices Message-ID: <20260717163820.6bc8c13b@shazbot.org> In-Reply-To: <20260710212616.1351130-4-dmatlack@google.com> References: <20260710212616.1351130-1-dmatlack@google.com> <20260710212616.1351130-4-dmatlack@google.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260717_153829_788508_2C146C2E X-CRM114-Status: GOOD ( 18.85 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org On Fri, 10 Jul 2026 21:26:06 +0000 David Matlack wrote: > @@ -298,6 +377,87 @@ void pci_liveupdate_unpreserve(struct pci_dev *dev) > } > EXPORT_SYMBOL_GPL(pci_liveupdate_unpreserve); > > +static struct pci_flb_incoming *pci_liveupdate_flb_get_incoming(void) > +{ > + struct pci_flb_incoming *incoming = NULL; > + int ret; > + > + ret = liveupdate_flb_get_incoming(&pci_liveupdate_flb, (void **)&incoming); > + > + /* Live Update is not enabled. */ > + if (ret == -EOPNOTSUPP) > + return NULL; > + > + /* Live Update is enabled, but there is no incoming FLB data. */ > + if (ret == -ENODATA) > + return NULL; > + > + /* > + * Live Update is enabled and there is incoming FLB data, but none of it > + * matches pci_liveupdate_flb.compatible. > + * > + * This could mean that no PCI FLB data was passed by the previous > + * kernel, but it could also mean the previous kernel used a different > + * compatibility string (i.e. a different ABI). > + */ > + if (ret == -ENOENT) { > + pr_info_once("No incoming FLB matched %s\n", pci_liveupdate_flb.compatible); > + return NULL; > + } > + > + /* > + * There is incoming FLB data that matches pci_liveupdate_flb.compatible > + * but it cannot be retrieved. > + */ > + if (ret) > + panic("Failed to retrieve incoming FLB data (%d)\n", ret); > + > + return incoming; > +} I'm having trouble following the error escalation here. What's fundamentally the difference between FLB data being provided and not compatible (subtle log message) versus FLB data being provided and compatible but we cannot access it (panic!)? Don't both suggest devices are running but we can't get their FLB data to continue letting them run? The errno interpretation is also slightly different than the comment above liveupdate_flb_get_incoming(): * Return: 0 on success, or a negative errno on failure. -ENODATA means no * incoming FLB data, -ENOENT means specific flb not found in the incoming * data, -ENODEV if the FLB's module is unloading, and -EOPNOTSUPP when * live update is disabled or not configured. Thanks, Alex