From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 366B738DC44 for ; Mon, 24 Aug 2026 20:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787602495; cv=none; b=MlH/+HfUBTXZO70CGQiplbYrBVIBWgcJ6HRAGg8aPOuvUnDUA5hXyJ7PvxsmNjtP95CbLQ2ZKGfvMVWRiHZ2VaVOgRXZS7Q+11iJOnV5ugpE59O6lbPgLSW8lUuLVQR/nvQwDxfKnNTHQ6Zn49n7YLYM5eU5KGbsDKtdZc3prDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787602495; c=relaxed/simple; bh=6uYCxul9owyGxBZ0PI9XPIFrx9QWJZNj3NMHAJSJZJs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=btvP+Lt0Zv9gVH3tW5SIgn/97bjhB74fUm6c0h5hIlNsQkvnEHtwFx13EDKpctJndrVOgbx50adl9w+wqH0f/7Gv+YaDFd89nGkYnYC5iswl9BCL4syk2gTjuBj+y9x/CPIeQzmHCnEOUi9UKeZQyu3VpHJ52gGq17ZwzsvATRk= 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=T9mXYFVb; arc=none smtp.client-ip=209.85.214.179 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="T9mXYFVb" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2d3b445a84fso4755ad.1 for ; Mon, 24 Aug 2026 13:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1787602493; x=1788207293; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Lbrx60MJW7m62aJUfR88Sv9pb7keNNeDEwmAMWLXqMY=; b=T9mXYFVb3/mxRW8Okq68bWUs6RiGLRRMZByGUznT1QCirw+23wepb6orCX1bzWMIfP X627yxOZBRI/73xebMp7T/FXrExpB4zOVPmwLS1jZZ2bf8WQRDaOexd5/X32Aott5IeA 3BYtkDtHfP5M7itiFXcRrNvk7Wpna8eVunZ2KCdCL+I28mPTymYrjvEuJrqgeD+L6w/a 06SC5hvPa8EXfA+4TJJIKjrbtu341GU9I4TGOaavgdGhzBfng2cOASrnctqGSR2A5KkN oNxT4mNnSBaMCYLqsxJYJhRVq5CQzeYSKq+0pT8MNNW4DROQUYugGYPCFC1PSLMeo8J0 pG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787602493; x=1788207293; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=Lbrx60MJW7m62aJUfR88Sv9pb7keNNeDEwmAMWLXqMY=; b=OESUIKi30kAJcPAt64eRln/aE208TXB4ysYpGLpPSmL03+x9DY/QF3hjLpvTk2DJN6 /n/KczDCk71UfDcIfl4H42B4gao86VZq+FKb6winrR0h3duSWTuoDE58jL881xfnZRlC eDgpIpr1ObnoSl2mLDE0vsgUcle0jXD+8FOanzIvOsf1Z+1GYTPI8LApdJjfKACRGsTC N2MGC3vlWEnJ8e34838OqyRa6as9RNZv7//uMONiqEPBKEIaoeo4GmsytJq+2vevipiI R6LJUIqgoklXE+9Bwvv8KqxZeZXYWuZLtubIts+WvX4EBW/rVt7rxgRnl6BdWp4Y9OI+ Rp+g== X-Forwarded-Encrypted: i=1; AHgh+RrZtL52fffYxDgC6messHOX78eS3m0BI2GN1pLaqeVIxdMib5rBfp57HwzQaizwpba2I1ypO3oeBzTesRk=@vger.kernel.org X-Gm-Message-State: AFuF++lkO34NRpXHziCJlrElcMfPmfi4QeZf/2CpjboVnIvwn0PXzNVy kD/4Q1fyGUZZK7WERPd0syNhozHAWgbK+53Y7Y7fyv85BUl47Q3Y5T5p2nFXO6DJIw== X-Gm-Gg: AR+sD13rTJvFh+jkOSXchDTVLfxwD4NCQhDEhDMFXZ1zpGyPEliyDdwpmQXuh2YCAZx RQUf6E+VKru6439Cjo5kGeloCqLKRVi2FAvu/avMjEal6IxDu6f54ufHleDwfjOom6kQMCkY5qx DQozdds4SC3ZI2rc6ZcOWd/gHysmEvaUyubYU32cvY/htRH7aT051n3A03Ucr2CNjoXIDbJPHFt 1jaL5XWWVD4nP1rfGD7gXYZfGdv3JdX3rexUyQY8yV60TGA55kzP8HxCwy8pVu+yKlQQIAbnNi3 muePr0Vf/LFkdYBhuv6c317mqEgIGWblMjZD8KIJBfDvKnjpMQ4L93MkeeWdaobOzNCJuoURK4R /8HUcdSoNRC2MjqqMIiVxrXoKl3vTOSRf8t5wlDKyoiSL3Wmhs61H+vXx/8EdcjjGBQ2EN4eyWn 0jO0eJYzSJxLeykXaIKcjEmxd8lj6t+REXimFUZonW7Cqu//O1asSiWI1uAzSFljsTFP4Ism13B p0lfAda+rtveiYniy7OVHtQRJvd8mGKFPvYUinK3Tv9+ucXQzO819IRfRM= X-Received: by 2002:a17:902:f142:b0:2c0:defb:557e with SMTP id d9443c01a7336-2d6e07f52b9mr751815ad.1.1787602492814; Mon, 24 Aug 2026 13:14:52 -0700 (PDT) Received: from google.com (210.87.127.34.bc.googleusercontent.com. [34.127.87.210]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-39645b49e76sm811208a91.6.2026.08.24.13.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2026 13:14:52 -0700 (PDT) Date: Mon, 24 Aug 2026 20:14:49 +0000 From: Samiullah Khawaja 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 , Pranjal Shrivastava , Pratyush Yadav , Saeed Mahameed , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Subject: Re: [PATCH v8 02/12] PCI: liveupdate: Track outgoing preserved PCI devices Message-ID: References: <20260728221007.2098560-1-dmatlack@google.com> <20260728221007.2098560-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; format=flowed Content-Disposition: inline In-Reply-To: <20260728221007.2098560-3-dmatlack@google.com> On Tue, Jul 28, 2026 at 10:09:56PM +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 the list of >preserved devices can be handed off to the next kernel. > >For now, the API only supports preserving non-VF devices on a root bus >(not behind an PCI-to-PCI bridges). > >Reviewed-by: Pranjal Shrivastava >Reviewed-by: Pasha Tatashin >Reviewed-by: Bjorn Helgaas >Signed-off-by: David Matlack >--- > drivers/pci/liveupdate.c | 210 +++++++++++++++++++++++++++++++++ > drivers/pci/liveupdate.h | 21 ++++ > drivers/pci/probe.c | 2 + > include/linux/pci.h | 3 + > include/linux/pci_liveupdate.h | 21 ++++ > 5 files changed, 257 insertions(+) > create mode 100644 drivers/pci/liveupdate.h > Reviewed-by: Samiullah Khawaja