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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D49FAC88E46 for ; Thu, 10 Sep 2026 23:50:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E96FD6B00A7; Thu, 10 Sep 2026 19:50:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E49016B00A9; Thu, 10 Sep 2026 19:50:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D50EC6B00AA; Thu, 10 Sep 2026 19:50:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A5F686B00A7 for ; Thu, 10 Sep 2026 19:50:30 -0400 (EDT) Received: from smtpin03.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C8AF61606C7 for ; Thu, 10 Sep 2026 23:50:29 +0000 (UTC) X-FDA: 85199499378.03.A87F0B3 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf12.hostedemail.com (Postfix) with ESMTP id 371F440002 for ; Thu, 10 Sep 2026 23:50:28 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=SWvdIX1B; spf=pass (imf12.hostedemail.com: domain of helgaas@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=helgaas@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1789084228; b=fyzoEKiZyDGkKDVV+cntGBzaLbPFxBb61JxODLIVSj/296LBiO6cvdkmQPMO5Y1ghXgStN iobl0OjaGtXTMWzIRoxKmh+dKZNbF0sbA91Z09E5hb7SYmroARZIZg0ViAK/wsJtYxPbd6 sl5xinbxPnlhmgogJow6SyWkT5jfbvU= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=SWvdIX1B; spf=pass (imf12.hostedemail.com: domain of helgaas@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=helgaas@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1789084228; h=from:from:sender: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: in-reply-to:in-reply-to:references:dkim-signature; bh=c7OopUXEb/cYzDlfPWlrvtnzMRjL5zmzmrpAgsq/8e4=; b=igXiFjP6isOK8tvuaGtIA0KNIMr2e/AJSrArkyZ+hHqZHznbGZj3AjvD8LuDUKtrjPod0z HYd5DJlHEpHJEfcDnvJPxPuLLT6Jkhm0YG2a/vw7WkmzbhxOD3UsDjygXCDSVJ15jkQBnL tc4C52SGIV8I2d09bhewHDRoTyGi1xE= Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id BD199601F1; Thu, 10 Sep 2026 23:50:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4762B1F000FF; Thu, 10 Sep 2026 23:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789084227; bh=c7OopUXEb/cYzDlfPWlrvtnzMRjL5zmzmrpAgsq/8e4=; h=Date:From:To:Cc:Subject:In-Reply-To; b=SWvdIX1BHb3G2mc3DqyJOJjeon1cveuDPti+i3UgGtydjKjjIuLAZjugxNUQntTsi k7tFsAfMxEDD74cLH2E2ATVZW0vSV7mAZi8xvAU2u/v2UxvgpL1SiJ9zaZfiPnkOwz FlvYWyzKMnXsILexLoAROHTxfm7tg95B/q1KUSnYjg4TEInmOHalF/wvvi2ASprk1o OXiwI6ZzjvtlQrp+guF0OjE8unAGgEOS6gN2HtwPZSxLM/IE4b+fN5mwOdiAeGLFyH aMCTxt7YV/SH4HFLDZzz6tKLnsRLto5qr9a8Vh1Akv8a3F/OwlToXzlyvB6J85vUbQ CbfiU/LHnbcNQ== Date: Thu, 10 Sep 2026 18:50:26 -0500 From: Bjorn Helgaas 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 , Samiullah Khawaja , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Subject: Re: [PATCH v8 04/12] PCI: liveupdate: Document driver binding responsibilities Message-ID: <20260910235026.GA367309@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260728221007.2098560-5-dmatlack@google.com> X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 371F440002 X-Stat-Signature: mpep785kcqkgmau8q8a3ncgzfgtum6n5 X-Rspam-User: X-HE-Tag: 1789084228-286698 X-HE-Meta: U2FsdGVkX1+Ju/MBtyyowRpXc8rmroISWOOb/ogYRDbl2J7izE4jIci21TcyTnR16DO0Kbf+hG1DcJkXM/P7wmClVZf85hWdBPhNAt2EPmxtIs4EfmjNnwPR2IKp1SLIkXkWjgu+ujTvbxzbGE2i5geHGUPcL7yy/EKxcjAKp0ht7pEAoVtKpET46ymIEC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hOgQH4QQh6sT/x1Lci5d/sJpLfpwZigfcr7q9Z/Km6a8TnAnwUHpllSuUrDN+Rqq6xurbgEyvayslG+t48F7zlUwidoxUioI= Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Jul 28, 2026 at 10:09:58PM +0000, David Matlack wrote: > Document how driver binding works during a Live Update and what the PCI > core expects of drivers and users. Note that this is only a description > of the current division of responsibilities. These can change in the > future if we decide. > > Reviewed-by: Pasha Tatashin > Reviewed-by: Pranjal Shrivastava > Reviewed-by: Samiullah Khawaja > Signed-off-by: David Matlack > --- > drivers/pci/liveupdate.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/drivers/pci/liveupdate.c b/drivers/pci/liveupdate.c > index 5ce5f8b36902..0f7a018ddc66 100644 > --- a/drivers/pci/liveupdate.c > +++ b/drivers/pci/liveupdate.c > @@ -71,6 +71,22 @@ > * > * * The device cannot be a Virtual Function (VF). > * * The device cannot be behind a PCI-to-PCI bridge. > + * > + * Driver Binding > + * ============== > + * > + * In the outgoing kernel, it is the driver's responsibility to ensure that it > + * does not release a device between pci_liveupdate_preserve() and > + * pci_liveupdate_unpreserve(). Possibly "the driver must ensure" or even "the driver must not release ..." Also could apply below. > + * In the incoming kernel, it is the driver's responsibility to ensure that it > + * does not release a preserved device between probe() and > + * pci_liveupdate_finish(). > + * > + * It is the user's responsibility to ensure that incoming preserved devices are > + * bound to the correct driver. i.e. The PCI core does not protect against a > + * device getting preserved by driver A in the outgoing kernel and then getting > + * bound to driver B in the incoming kernel. This may change in the future. Same "i.e." nit. Not sure we need to be reminded that things may change in the future :)