From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (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 4EC3351CF51 for ; Tue, 13 Oct 2026 16:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791908743; cv=none; b=fJ+GDl0RiSE3G31k9TjBXfQHH11+NGqEcgrwlpi8saGJM6P+UAUgVHdDhdatoSWHL5mil1fIQZacO9JuTmoaLV2qu2oV2bR/WMfNVvYRZAVbnp4L6odqYsuRuEvURLFPzHSV7gHDqSh42Wqp+xw2YAxPd8iPt4b6fu6mYWhgiSg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791908743; c=relaxed/simple; bh=9BYqyMukNW5qh1gE+jywmCAYqkldwxrBBrcV50XUz84=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Sl/K5k4ubKc0DVtoWafMXqqISwNNMUfGljV8JX7tSVDMi5fitEJqdqtDbZf2whbsr54GyIzQvwonDKl2qxNAPrR716vrVV4Rm8yaqTSQgpJM+Z1LWUD2ofJD3kvNr1vuE9FJDQ75O+x/z4p6rT4Wfsw++rRF5wBPH1M71dZsjqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=anoxwI3K; arc=none smtp.client-ip=209.85.214.200 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=flex--dmatlack.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="anoxwI3K" Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2e897d06ac2so24493425ad.1 for ; Tue, 13 Oct 2026 09:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1791908740; x=1792513540; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=WNT+jGdaf2aCsQv4VtyLG1DbArni/172oULb9VD6dek=; b=anoxwI3KVibenMl3hsny+zuITABip8T+KSQD3g48Otvcg+VxFamqK56/wTMftezNpO pCckbOnnON41bVEQNy/tiEfNAELUhWkFc15QQgrEGO310sJhDfVTo5nmT7qlAktWKSfa A806vdQoSpMI2AlcGqnZ3720pt8OaMym3geI0qa8ev4VyGIq+Q6tu80mBIpwRLSvE3dh r3qO62vbwbFh8LUneykO0KTKGWr7yVhoYlIrJwtJ30pMwpliO1xv+QMyqd0wpPch/otm lAC0zz5wN9EPUcc4sFi4DleQt/w6Fkl7gW//eBln1yV5SBCdovkPrkTy6CrgyU7AEinV LMzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791908740; x=1792513540; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=WNT+jGdaf2aCsQv4VtyLG1DbArni/172oULb9VD6dek=; b=kWX8Qhn4VS3EFYo2ll2sItBCekBrX3hLHwqRtyq+07zOg6e2BDZVJsyJZ1SCMcSEVY pwq/nH8bNJkBxtaQtJIg0E84lkHw4xh++eX6io6HoW6pNArTg17sb7uN8ZobsJrZONIj 27PMU++wo8x1MTfgtOP2ttNJzz6z/ndKY+tGtQOnb0pXmyUHI+W27LHdoGriu93N0t7C SOns8gYZNqEAVZuvnKIC73C19p0KGFTfP9RKdZLvpDEzufuI6QPOADrCKcdrQZ77x7qt aFsZOGmAFbJYXsUahWv+epTAL3Z42bb7QiMSzh1o1f38JGH5TS3cpKA8JeOAWCYmpZL/ Ztug== X-Forwarded-Encrypted: i=1; AKwUvBz1aaaoulHMzOlPVFuzKRe+iyQ+9fVYtt6HtSjAMnJFiAzak+NfWupO35LJOIYeK0+GlEmt8DCLvl85YwI=@vger.kernel.org X-Gm-Message-State: AFq9FYIVmtvurCLLHUJkKMwCDgvntnXtPPnx70b5hf9MThRKp+BVaVbF ld++XuzIcJjzujEnQ9JixlkL97BUSEbzwow1sns4kePAgeGqr1LygHhTTkE15CySEkyK0Ed/Ryc TFNohW7JNiT37BA== X-Received: from plmm17.prod.google.com ([2002:a17:902:c451:b0:2e8:d79d:4a41]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:ecc3:b0:2dd:ad73:5b6b with SMTP id d9443c01a7336-2e8429ab7acmr112088205ad.27.1791908739540; Tue, 13 Oct 2026 09:25:39 -0700 (PDT) Date: Tue, 13 Oct 2026 16:25:20 +0000 In-Reply-To: <20261013162529.1928093-1-dmatlack@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20261013162529.1928093-1-dmatlack@google.com> X-Mailer: git-send-email 2.56.0.385.gd3acb90ef8-goog Message-ID: <20261013162529.1928093-5-dmatlack@google.com> Subject: [PATCH v10 04/13] PCI: liveupdate: Document driver binding responsibilities From: David Matlack To: kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org Cc: Adithya Jayachandran , Alexander Graf , Alex Williamson , Bjorn Helgaas , Chris Li , David Matlack , David Rientjes , Jacob Pan , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Leon Romanovsky , Lukas Wunner , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pranjal Shrivastava , Pratyush Yadav , Randy Dunlap , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Content-Type: text/plain; charset="UTF-8" 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/pci/liveupdate.c b/drivers/pci/liveupdate.c index a1d9b2b1f9e3..d6b659b346bb 100644 --- a/drivers/pci/liveupdate.c +++ b/drivers/pci/liveupdate.c @@ -123,6 +123,20 @@ * * * The device cannot be a Virtual Function (VF). * * The device cannot be behind a PCI-to-PCI bridge. + * + * Driver Binding + * ============== + * + * In the outgoing kernel, the driver must ensure that it does not release a + * device between pci_liveupdate_preserve() and pci_liveupdate_unpreserve(). + * + * In the incoming kernel, the driver must 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. 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.56.0.385.gd3acb90ef8-goog