From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f44.google.com (mail-dl1-f44.google.com [74.125.82.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F7C23BB10D for ; Fri, 5 Jun 2026 06:11:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780639892; cv=none; b=by+RFlxaCK07tbBbB9gE7MY99HW5Y8lrhoybR/BqkEHA15oYx3gBy2pIRU8VtHTNrgwUlgEIe9VJrcyLfTJOOG/LaM9585uv7wEhdFdyyvwCflu8q37IiE9Vi3/IWvZj2HqAcwPYGXQTxkj/2earFxlgOH8va/fcSVw/m9gUWmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780639892; c=relaxed/simple; bh=bDPSYW4sbBXupjVGuQ9fNmCdsAtmh74koaGYMZY927s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TePFetPrelwk0X9v7HkoK4UQXoCYDHMgdm0PghzNeRciMLfM068bLL7V9lYp/kGVA+aVozMyfhcSmmtsW0bM9/UdFrR8d8krusNaqgl+nlYc/EfGzV18omallu9GhIikB86J+/Rkp4TZg1+d+iaGNcRd22NNVoLFc73j5CrR/Aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ac8UwFJC; arc=none smtp.client-ip=74.125.82.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ac8UwFJC" Received: by mail-dl1-f44.google.com with SMTP id a92af1059eb24-133362c30cfso9160c88.0 for ; Thu, 04 Jun 2026 23:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780639890; x=1781244690; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+JACYJJsZuvAWWpivo6XAMCeidn10mj5aCjcUHoRua0=; b=ac8UwFJCMdi8cGmFT7lTPe2kToZwck/hosTgZ+nKsa2tc3jel7u2SOWhFUd13Vu1Gz 1Wx5PK7EpnoGe0kgKQjmZx+yX9Z+MEHvvZqIAboO4H7HnLpSqgRM8QHIt9BoFK4apFck /QvePhnw8yE2v01+0MWo56rAT57153ut56VKfl61YS9fIJoS56EY4BQeRIYxaZr/mZN1 SqzbaWHnME3f0V8LtomNdkd4EsflEW0F28b7ZFsn/uH8IVXXDPM+o8qdcXQ5GM/jAIDV aCcdMAJ/IoiB8vRivJ71j1+QlZQPCyC/0u92BfVhNKefBYk6+CgwIR5wabnWBalm6D22 jsxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780639890; x=1781244690; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+JACYJJsZuvAWWpivo6XAMCeidn10mj5aCjcUHoRua0=; b=jScsHm29B3ZZnIsfO0NSU+gUKA2T1zyjyg/awlcZcJFn+BQt1Emx7YjnRgGYnaXqaB Ry17euV9t9HU2yItouCkmM8l9Gs5SEYLGtV59Ux8cgF2i7f3zC2Q8gTNulEqs97pYtfq gvtIBbDtt1dDs1pyyHao/QHMQcWATG9SNBSGfQs5FUyBAm2S1MlxAmPI1OkwPK+hClnd W0EhCr/uk6tnEIEjCLl9Z66drHTt6VQfM3J+Pb+eLLBXcsMtkbQuPR+dLCQwds1VZX8I 41YWfcCsp/fEO4gKleb6l8jkvHEnRkrH0/7gmrZ5E1NlF0WDDU98BDQLCzvJZHFy0ReU PnOA== X-Forwarded-Encrypted: i=1; AFNElJ/BFEh77I0iZ/KxQKBYZzOAXsTLZ45IR8HMqMlTZhMGlIcNo9Jnih5cmaQg4794REuziI05me/pVSOgB/o=@vger.kernel.org X-Gm-Message-State: AOJu0YwE60MMxEKBKeocCPd5O63CT5H9n8klIJruWnLsWVmgCMpkHrkU uDBsbGwMOowL4VRxEDeCPj7+QkVSh8OP/jRPlsJkwWIvXP+t67UVHG0WM5/plLnF8Q== X-Gm-Gg: Acq92OEAnxeZL3iFF26bw3z4pwzUlGRyiZA2T1LpvuSZKk3AYa6b2r9W6DXgJfHok3p jwG5GC7oaOU0FNfkO/iDInq9yeGO4jDuc2hdHJ80nD/HkuKb0rZFAm5y63/rrn25mUeBicuStA+ eMWrATkMYQx/X/XWPWAvru+1+D0pm1pj+1LHNVPcbI2G4dJ2EB05LZoh5NbEqzhY1TJ7uV3JaP3 33GNjoH9QjKGlWB1a5WMGDEDXLc1jpKEizw5imCS6/ATlvmk9+rEoNFF64O764kGmi46hn/E6Cy 3W4nCjodqp8AJSAuMQS9GuTgmTNiwa9QXI9yDrOc7FoWoJNnxClSWuu6X98MUFlcgq4VeWi7Das oCGkT1k1LpA4eseOcdL/rz0bmc8AYlvVWrcB+OtiN5erhaa8NdVqpNcJ3CqH2etRVX2Zu52/LHv zgwGtXumh8897p6vp2RI8rAsLL2NlTA83k/pT/UHLIyC6HXow8l0MXpgLUo9S4j109TNZEapU= X-Received: by 2002:a05:7022:6289:b0:134:a710:ca44 with SMTP id a92af1059eb24-13807ccb5f0mr74668c88.18.1780639888034; Thu, 04 Jun 2026 23:11:28 -0700 (PDT) Received: from google.com (199.255.142.34.bc.googleusercontent.com. [34.142.255.199]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3074d9fde90sm10632107eec.0.2026.06.04.23.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2026 23:11:27 -0700 (PDT) Date: Fri, 5 Jun 2026 06:11:18 +0000 From: Pranjal Shrivastava 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 , Alex Williamson , Bjorn Helgaas , Chris Li , David Rientjes , Jacob Pan , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Leon Romanovsky , Lukas Wunner , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pratyush Yadav , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Subject: Re: [PATCH v6 02/12] PCI: liveupdate: Track outgoing preserved PCI devices Message-ID: References: <20260522202410.3104264-1-dmatlack@google.com> <20260522202410.3104264-3-dmatlack@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260522202410.3104264-3-dmatlack@google.com> On Fri, May 22, 2026 at 08:24:00PM +0000, David Matlack wrote: > Add APIs to allow drivers to notify the PCI core of which devices are > being preserved across a Live Update for the next kernel, i.e. > "outgoing" devices. > > Drivers must notify the PCI core when devices are preserved so that the > PCI core can update its FLB data (struct pci_ser) and track the list of > outgoing devices. pci_liveupdate_preserve() notifies the PCI core that a > device must be preserved across Live Update. pci_liveupdate_unpreserve() > reverses this (cancels the preservation of the device). > > This tracking ensures the PCI core is fully aware of which devices may > need special handling during shutdown and kexec, and so that it can be > handed off to the next kernel. > > Signed-off-by: David Matlack [...] > > /** > * struct pci_dev_ser - Serialized state about a single PCI device. > * > * @domain: The device's PCI domain number (segment). > * @bdf: The device's PCI bus, device, and function number. > - * @padding: Padding to naturally align struct pci_dev_ser. > + * @refcount: Reference count used by the PCI core to keep track of whether it > + * is done using a device's struct pci_dev_ser. The value of the > + * refcount is equal to 1 when the struct pci_dev_ser is in use, and > + * 0 otherwise. Note to fellow reviewers: This may seem like a bool instead of refcount, but this is changed in Patch 6. Reviewed-by: Pranjal Shrivastava Thanks, Praan