From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) (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 07442360EE8; Fri, 17 Jul 2026 22:38:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784327910; cv=none; b=ZiSCMaDsAM9Npcifuv1/A89oA+xplQMjpF5mREBNKGsN2VHKJvxwjLS+pq2n3DMN84Xk9Y4GODUcW43GSfBchQ+u30DYWB1IwrfTPO0bHqyShDv6J0DOA8tXsT6FqoIE+gaB/IGBZfUUhHluUe1nsp4Ywy8BvEt5pKJ8ULUoVqM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784327910; c=relaxed/simple; bh=yq1Czgb6ofwfFEnr0tYwQy/7RJDtT0SVTab5/wZxJKM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KTRYBsbKCBSyWmLWloLWTOeyscbSx5HCd6eMyrDkbqufcr/zHQtimRuX9oYt6Yvfi81fRxKOuBQml0gBTXoOZkkeHMAzmmfE3PohjeDmkbU4ctxWO9XfbdnshMnzi/eLjs3Ng1uDXRCW6St4+QYgORGS+5+CBIU9eGkyoUuTqk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org; spf=pass smtp.mailfrom=shazbot.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b=Q6ij4R8I; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=k3p91ygZ; arc=none smtp.client-ip=202.12.124.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shazbot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b="Q6ij4R8I"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="k3p91ygZ" 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=1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x2kd0cxpUZNVlu21VpRgek0q9oT6X6hbADH6goWPsiBbg3eWlEy3qQ X-ME-Proxy: Feedback-ID: i03f14258:Fastmail 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) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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