From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=83.223.78.233 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796460384; b=3rhMCs1AmrmaYpsF/RWFcBAOxHcjZi5uVMZhawf7gX/OX8E8HcSysb91FOj5S0LXJNk/ rMcU9h4GQCmhPFOSM5ZI+f+1a/PUKkjQNezqrmTaarODlDC5hrc0XhFTn7D/R8wriHUkn JMaQWBQDQyU+K9YMqq1lX7tdoauyMulVBhCnqXgnKNMGXAf+Z8AbgO0gTQN7qvxww9vjl gQL64vxqNQPiNc5GniTHY8Y9RfolcWrgmUw5g/04W2bViGEN1YqG4eejNdA/+yDmbOFxo ZBM+jeX3vjrpkk5Kc4ue8PFbGlGNjLZbdxW5VLObEghtTyWH5uJr4W/ULIcQL2tk5JA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796460384; h=DMARC-Filter:Received:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=E+/iwkFEFcAnD3ceGuz3yy41Z8UefgoL5pmYtry0+0M=; b=5TzZRXJgHZn+j6RXuoZoBHY4EaAsPpQfx4YgxNJKDi7mMRH3gfqRPmpbOvkdBmkBhzUx FHYiYEDsXeHvSNMBNgrYfQ1ezp/rT/hyDEObUCayePIW9vDm8n7FSRQpzMSM2V+vlLC1u j2yfbWCJPuaAR2LwfkE99FE/6KKWCDekDt+lEFuR8M+HF6KD0tIjAibWYcs9pV6FtU2YX YkRibD+sZFcR1nIQ3b7zC2er8AaJzyQgK6TCD9A5EEydaH+3SsPaQMmoyEHNqv23t5ENy gp33/x+FVtzwjbJ/ns5rCN3SPrkcEjsp43v0jHMH/bhnYwLY/2ol+wwH9ujHMAlO5TQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=wunner.de; spf=pass smtp.mailfrom=wunner.de; arc=none smtp.remote-ip=83.223.78.233 Received: from mailout2.hostsharing.net (mailout2.hostsharing.net [83.223.78.233]) (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 75E64606A322; Sat, 5 Dec 2026 08:46:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 75E64606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wunner.de 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-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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