From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 A77633195EF for ; Tue, 23 Jun 2026 16:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782233010; cv=none; b=QJe90J//+Pg3WrUD20arYj5e0t6tbQKmSLx8TsEkGv/FsPfP7wPnddhBvi6TFaVE6g4pfX9HRa3ZDaG8dm8myWtYQ5at6vKmMkoViK34PDhZyx+icJSp0W6pZ4AehgxPXpDn1aBeKMIJo8TsSFJwerQuhVj71rZmPUVAtXwbI50= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782233010; c=relaxed/simple; bh=IO3IaUu1uKZodchtwQMhsQsxdlAFl5DLnFq9KPo2zhA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gXPykJv6VBOztoWWu+K4EQUUessJb56eMNaMCDxGTFgM84+BfkrVynaJrUjVKLM81+Wl9RERja0ZUlvPoelTPwd0POkTKjxjf5RYDaQMkbqIkc/4mr4ZSidoRzJs4emGnD8SY7E5d/XqFwldnVTqehdd24/iJDWENriWB52L1Ec= 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=Cdl99HR3; arc=none smtp.client-ip=209.85.214.176 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="Cdl99HR3" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-2c73cefe192so62555ad.1 for ; Tue, 23 Jun 2026 09:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782233009; x=1782837809; 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=rUCXLhb0bwQI5jAi3AeGaL2pacxrrvJDt+WvFjr4LkY=; b=Cdl99HR39ZuMN5pAxlyTpkTp+JYMHqFOLaZT6eC9ydbSpoNDo2TtWUofubD4GOK6zr S6pk3SpVtH/5m1BPz7Q6hHO0sprLfoUOtSsPtUJLs7l4HvILulka91DehDl9Qu5FkNjm nzWe4xPUeS3anFsM7Kel37guFGY1+wwYFgxRrXtMXF4GklhmFqAvW4FnhXqPNNLuC2MC /KHU9DUVXDvP6dLBNsdY1kIYoeJlu3SegQzxlBE7MHK17R4jMlnFLY5Jnc9ETFFEk4jB 6wAvKxLGiNONuDR5EAkEoVUBS1Y5tDuPIhoO2MMas9sukdUoMfEjavjQJv4X5uyTW1af kG8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782233009; x=1782837809; 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=rUCXLhb0bwQI5jAi3AeGaL2pacxrrvJDt+WvFjr4LkY=; b=sh1UqSS+1lYDtvwixY/WZzKEzheZM7nqMpbtPpnSDJ2CZ/qx96p3bQ7LVky70Gds77 KviUBl6DGPNSoZl7RhzVVv9okFaD5ztjP1HpO6ti2n0ycmM9sjrpKFCURliLtRk9DfPx e7cWZQMYZyuoCdEr7OvBqmRnlVO5Zu8ps46fFW0Q0SFrSUc3PWFPQWyiWGWYDmYHe+om Sv47gqWf84W4FdmlASR+qzwbk/+h/Jo5rq17+8dbn9kUnIkISjZnRYv40XBXi93TU9Fq ts3ZqVO9VCBeSbi8sgpPjllvKkBpv8MsOQZZKGazAazKNzRirGzxpfaRxQIeu0gcYaEc amdQ== X-Forwarded-Encrypted: i=1; AHgh+RqZ+Wq3Git+oMvzhPl1A09ecK3fbtEcGcxU4obZ+Yu242J9/Uek8J/kImZwYcvpshbMN7FGR4Z6i/4HaZA=@vger.kernel.org X-Gm-Message-State: AOJu0YyH87XSvNo8ni7R+IJRM2xrWzguA1koeONS/lcid5LBV+TXu4+W ESN4+z6CSMOzTbKKU878hy0vglm9KB+ImbeFprxmzlQP/KwhabBHceFMYKXZHDO1ZA== X-Gm-Gg: AfdE7clmKJid87zGP5IViERPOlEjVHfi3b+kBS/SXT/lKIPQZC93nqOsoaSaMHFJ9sZ maYF1HDfvrNyIQihnPpt+KC6P4Nfa7cwhcD55DMXG5hGWI64XQpbSUP15ImUU/t1QoKey8zzC+5 yOFAu57vSryly7PPbve7AU7TgrygVkSM7QG+/cI9JarBRkE99WXbtaeE8ZHAi6/k6jgHr/+Qv5Z 0fQfs5kBiod+ZwuRB13irAtvxrXDjBQqTEFEXnkXtYuk7R0Oux4ngM/qSOfh2x2n65gjVommyF8 ThorK3QwJWIC+dIfxcp/0eo8MrvwzN4XTGSTXcAp7pin19WIrBO2IUeaEVBvxc/2gan/tgRv3QX hnYfNEjm+teLbRFLas6V+/Io9iTQ9OuWxDntUAnfrA18CKAVimvdnati7jtXulvb0/cphwRBoqe utMGDbxu5uOpG3/gr9+wr0Lyqk+8yfFcNb14oODPBlCSreR1wOMOdn+7PBBD5Z/O9DoJzoxG1GN MFgw0vJ X-Received: by 2002:a17:903:320a:b0:2bd:6dad:7ccd with SMTP id d9443c01a7336-2c7c7118b8amr2140445ad.25.1782233008303; Tue, 23 Jun 2026 09:43:28 -0700 (PDT) Received: from google.com (25.75.145.34.bc.googleusercontent.com. [34.145.75.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84564d6c5dbsm10669159b3a.12.2026.06.23.09.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2026 09:43:27 -0700 (PDT) Date: Tue, 23 Jun 2026 16:43:24 +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 v6 04/12] PCI: liveupdate: Document driver binding responsibilities Message-ID: References: <20260522202410.3104264-1-dmatlack@google.com> <20260522202410.3104264-5-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: <20260522202410.3104264-5-dmatlack@google.com> On Fri, May 22, 2026 at 08:24:02PM +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. > >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 96c43b84532c..4f2ec6ffdd16 100644 >--- a/drivers/pci/liveupdate.c >+++ b/drivers/pci/liveupdate.c >@@ -70,6 +70,22 @@ > * preserved. These may be relaxed in the future: > * > * * The device cannot be a Virtual Function (VF). >+ * >+ * 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(). >+ * >+ * 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. > */ > > #define pr_fmt(fmt) "PCI: liveupdate: " fmt >-- >2.54.0.746.g67dd491aae-goog > Reviewed-by: Samiullah Khawaja