From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 CD3A927713 for ; Wed, 4 Feb 2026 00:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770163828; cv=none; b=rmb+dN6T5bFzp3EknZvnpnod9F1im+urmM1CbbE1Oy1V/aWuDNslqsvLLuM3y0hYESToIPdX22Rv190DgAIQXdKYsCEeLDFNP0ffPJ2X52dcHkuXg8Ms2vcA9vui0GTLC573eb4T+MSmS+BmoRjECwVGmkhpk6H1zgkgNkVWgew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770163828; c=relaxed/simple; bh=ESxIp4/yXKBosB0FyqK/1O/fQD+MS4ChEKPfTEhgPBo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lbC3CJ1Ut/RVnWQoks8GuXoa3ghlN8edh9epYvIQ4xf1wxfZfzR/U5yF15gnqs2vU6wLNRk5Qe21+A2/yRkibrWtqaWQ61rV7W5NMcUfSCBQej3EwhRgHe1rH1orblWYZkW8yl31Sst3on5MPQscJUjryueVKFmcLdPDGzCJqTU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ApRMKyWe; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ApRMKyWe" Message-ID: <7e49472c-4bbc-49fe-92c6-621e4675d882@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770163814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zPnG+2FnaGlQfzxXfIjWuGajlOFPpBxdoaiBCLVKvoU=; b=ApRMKyWeexGTzglygbcOHhU7Wfd4rnLeiMI+Jogeatu2nhRqIkK0lA//+bUOV3vFAbHCoJ mS0BsrYP93R9bxyxRU1fhniBcUvx2p4NhTCXzAkUT0zL/EyR+YUdOmdiWZC6zP6HhDzLGT UyQfu6GTd6zJWiBQ6KJq5hvzWsaEowg= Date: Tue, 3 Feb 2026 16:10:04 -0800 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 02/22] PCI: Add API to track PCI devices preserved across Live Update To: David Matlack Cc: Alex Williamson , Adithya Jayachandran , Alexander Graf , Alex Mastro , Alistair Popple , Andrew Morton , Ankit Agrawal , Bjorn Helgaas , Chris Li , David Rientjes , Jacob Pan , Jason Gunthorpe , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Kevin Tian , kexec@lists.infradead.org, kvm@vger.kernel.org, Leon Romanovsky , Leon Romanovsky , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Lukas Wunner , =?UTF-8?Q?Micha=C5=82_Winiarski?= , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pranjal Shrivastava , Pratyush Yadav , Raghavendra Rao Ananta , Rodrigo Vivi , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , =?UTF-8?Q?Thomas_Hellstr=C3=B6m?= , Tomita Moeko , Vipin Sharma , Vivek Kasireddy , William Tu , Yi Liu References: <20260129212510.967611-1-dmatlack@google.com> <20260129212510.967611-3-dmatlack@google.com> <44484594-5b5d-4237-993c-ac1e173ad62e@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Yanjun.Zhu" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 2/2/26 10:14 AM, David Matlack wrote: > On Sat, Jan 31, 2026 at 10:38 PM Zhu Yanjun wrote: >> 在 2026/1/29 13:24, David Matlack 写道: >>> Add an API to enable the PCI subsystem to track all devices that are >>> preserved across a Live Update, including both incoming devices (passed >>> from the previous kernel) and outgoing devices (passed to the next >>> kernel). >>> >>> Use PCI segment number and BDF to keep track of devices across Live >>> Update. This means the kernel must keep both identifiers constant across >>> a Live Update for any preserved device. VFs are not supported for now, >>> since that requires preserving SR-IOV state on the device to ensure the >>> same number of VFs appear after kexec and with the same BDFs. >>> >>> Drivers that preserve devices across Live Update can now register their >>> struct liveupdate_file_handler with the PCI subsystem so that the PCI >>> subsystem can allocate and manage File-Lifecycle-Bound (FLB) global data >>> to track the list of incoming and outgoing preserved devices. >>> >>> pci_liveupdate_register_fh(driver_fh) >>> pci_liveupdate_unregister_fh(driver_fh) >> Can the above 2 functions support the virtual devices? For example, >> bonding, veth, iSWAP and RXE. >> >> These virtual devices do not have BDF. As such, I am not sure if your >> patches take these virtual devices in to account. > No this patch series only supports PCI devices, since those are the > only devices so far we've needed to support. > > I am not familiar with any of the devices that you mentioned. If they > are virtual then does that mean it's all just software? In that case I > would be curious to know what problem is solved by preserving them in > the kernel, vs. tearing them down and rebuilding them across a Live > Udpate. Bonding, veth, rxe, and siw can be used in KVM environments. Although these are software-only virtual devices with no associated hardware, they may maintain state that is observable by userspace. As a result, Live Update should preserve their state across the update. Zhu Yanjun