From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B48D2606A6AB for ; Sat, 5 Dec 2026 08:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=YYyWZfZp DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=E+/iwkFEFcAnD3ceGuz3yy41Z8UefgoL5pmYtry0+0M=; b=YYyWZfZps6LESgIqZyo0MNStp7 nwxVJfLTv0c6Nbg2ZX4Q6PmEAZHfIpKy5m/s4alWvKWIZvkLWwfsDqorLCJXxsJ3CB6T42NtNJcx6 fSMruzHCEn2vPhDRWGFMzvqjWx9ozsx6tmkgluITp9oIMRh+vdyblRvZQTAbD+mHHd2fjGKy9jCAC +hxQHb6x3IrMguINz4Q3Bp7wim6P7Bkq8yuYhBhusDN8xlHjrdXLHRyqMKRbFuEDYkxHCJSmI5Knc a951xIzeTuvxTnwhFiR5yr67SVIdG5eye2jG4qYrLHqxjGKF8kxaTeLk+Gh+htOVD1JzdrZ1mzY++ bOfQbfTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZlPa-00000002Ca2-0u2P; Sat, 05 Dec 2026 08:46:30 +0000 Received: from mailout2.hostsharing.net ([2a01:37:3000::53df:4ee9:0]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZlPU-00000002CZI-1Pvf for kexec@lists.infradead.org; Sat, 05 Dec 2026 08:46:27 +0000 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "*.hostsharing.net", Issuer "GlobalSign GCC R6 AlphaSSL CA 2025" (verified OK)) by mailout2.hostsharing.net (Postfix) with ESMTPS id B0C0510610; Sat, 05 Dec 2026 09:46:19 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 87BB8603191F; Sat, 5 Dec 2026 09:46:19 +0100 (CET) Date: Sat, 5 Dec 2026 09:46:19 +0100 From: Lukas Wunner 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, linuxppc-dev@lists.ozlabs.org, Alexander Graf , Alex Williamson , Bjorn Helgaas , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Mahesh J Salgaonkar , Mike Rapoport , Oliver O'Halloran , Pasha Tatashin , Pratyush Yadav , Randy Dunlap , Samiullah Khawaja , Shuah Khan , Vipin Sharma Subject: Re: [PATCH v2 01/17] PCI/DPC: Allocate the DPC save buffer during device setup Message-ID: References: <20261106004218.604799-1-dmatlack@google.com> <20261106004218.604799-2-dmatlack@google.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261205_004624_545662_8D7CA803 X-CRM114-Status: GOOD ( 16.60 ) X-Spam-Score: -2.6 (--) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, Dec 04, 2026 at 02:53:07PM -0800, David Matlack wrote: > My plan is to keep reserving DPC Control in pci_dpc_init() I'd be fine with that. An alternative approach would be to allow multiple calls to pci_saved_caps_finalize() and have it reallocate the buffer if necessary. > and have > pci_restore_dpc_state() skip the write unless the kernel owns DPC, via a > flag set in dpc_probe() and cleared in dpc_remove(). That keeps today's > behavior of restoring DPC Control only after the DPC service has bound > to the port. We've changed this cycle how the kernel decides whether to instantiate a DPC port service: The check at the top of dpc_probe() is gone. There's now only a check in get_port_device_capability() and it's very small: if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) && host->native_dpc) services |= PCIE_PORT_SERVICE_DPC; So you don't need a new flag. You can just check for "pdev->dpc_cap && pci_find_host_bridge(pdev->bus)->native_dpc". Those changes are queued on the pci/aer branch: https://web.git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=aer > The one difference is that pci_save_state() would read DPC Control on > every port with a DPC capability, since saving reads every reserved > register. My understanding is that a read doesn't count as modifying the > capability, but I could gate the save on the same flag if you'd prefer. Either way is fine, but perhaps checking the flag is more consistent since you have to check it in pci_restore_state() as well. Thanks, Lukas