From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796302870; b=4f7gVri1yog90CxMsIYR1AgQYTCw7cNxyR0M23uueuzLxUfrVr4NDs6NIQEYj6V2ked3 YOfyK92qOAqYVvFUOaX++ei+KbtUc5jglXTxKMb+ISVZOfuZcEugntSVv7uq3wOMQEWYh XG12jjWJhKiYfv+xx/7+5pXmjikldhh1LNA1l0Xqwx4sHPUzVkKFSvrXYWekbvTSZiXp+ cfNbG2cXQ2vS4K8zUZTbIY+qUUINJv8gGzWNmq+E2KLrPscZQmu5t+Iv24BiAd0xiUW81 t9pSh15CSzD0pW4L4dqiu7MjgRgHuo7jAD2OscsG4WbSnq2y/bhalLEB/xzGnr9yhxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796302870; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=0CRlp6060r8uLpDGcAooRDL2rO0rVu0AEHmubuHkYqg=; b=qRmkec4WmNfcdANZOYgYzDOlqn6rG87QceZvVsWmrWqKWEUQXN5PCjsxq/cJrqtEFJ98 J41YhFPLLpwRJmefOX9GdR5ZTeap8YTbutkTug//SuQlEPeU+vCpAHNEo9JduaZhTcUbX AO6mNgejP4hW6QxFBJTanPfTA4QYiTibclBUI0U7tZ/JmX1y7urfpCqSNw4tpitlHxb+C WCLLmeOvKkYp1d/ZnY11njiGSScfUTudIL3SYyV6GrXREWbaZ/8brdf0z9n7txC9XvBCS uqfh7iXPA7gReU8jFG9uKoYEN/gnVDa0Ojqcw9ILUeFUG80Jp5qOnpi5TQBUCCEZ/5g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="fNrP2/Z7"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A90B606A32C; Thu, 3 Dec 2026 13:01:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fNrP2/Z7 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBEEC1F000C1; Thu, 3 Dec 2026 13:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796302870; bh=0CRlp6060r8uLpDGcAooRDL2rO0rVu0AEHmubuHkYqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fNrP2/Z7Nq7E+xpn2r2jTdZ6RtB7uzRrTKbsknOXsh/5SNYjcjUd1uR7O5M+DSPQ6 ioH0DH0ePDdIcoH3Oxrm/EPtQaNdxvvSxJ2uvvzzJk+P/kIhzreGHOWzVXadk79A+q JV/Ckyx1DWe+KiNoRF0rr9tzTcdeiT3adkZ2M7cz/Zebr6iBsUJEHg8uAz+Nw3fUCz 58hG71yMuo04GknXr5xleAJnZqkSk0JIg/PFjkB7W/LWrxy53S5acwalW6d/N3wAor EOlyzuknD5T4F4AT/f/mENA+PFM425HA0MG/dZUZczIg7oC2mQkDONzTADF/J0fzEH 5ZnkFK8U0Hilw== Date: Thu, 3 Dec 2026 14:01:06 +0100 From: Niklas Cassel To: Feng Tang Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Anju Zheng Subject: Re: [PATCH RFC] PCI: Add warning about possible danger for pcie_bus_perf mode Message-ID: References: <20261125155829.77269-1-feng.tang@linux.alibaba.com> X-Mailing-List: linux-kernel@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 Tue, Dec 01, 2026 at 10:17:00PM +0800, Feng Tang wrote: > On Thu, Nov 26, 2026 at 09:39:44AM +0100, Niklas Cassel wrote: > > On Wed, Nov 25, 2026 at 11:58:29PM +0800, Feng Tang wrote: > > > During stability test, there was a bug that running 'mount' on a type > > > of commercial NVME disk failed on an arm64 server and raised PCIe RAS > > > error and panic the kernel later, when using "pci=pcie_bus_perf" kernel > > > cmdline parameter. > > > > > > The NVME device has MPS(Max Payload Size) capability of 256 bytes while > > > its corresponding root port is capable of 512 bytes. When enabling > > > PCIE_BUS_PERFORMANCE mode, its MPS and MRRS(Max Read Request Size) are > > > both set to 256, while the root port's are both set to 512. But the > > > NVME device doesn't comply with PCIe spec (v6.3), Section 7.5.3.4: > > > > I assume that you are using pcie_bus_perf rather than the default strategy, > > because with the default strategy never raises the Root Port above what > > firmware programmed, which may be only 128 bytes. > > > > pcie_bus_perf gives a Root Port its own maximum MPS without looking at > > the devices below it, and relies on MRRS to keep Completions within the > > endpoint's MPS, so a device that ignores its MRRS gets Completions > > larger than its MPS. > > > > My series [1] avoids this without pcie_bus_perf: with the default strategy, > > it sets each Root Port hierarchy to the largest MPS that all of its devices > > support, i.e. 256 bytes for both your Root Port and the NVMe. Since a > > Function must not generate TLPs larger than its own Max_Payload_Size, the > > Root Port then returns Completions of at most 256 bytes, even for the > > 512-byte reads your NVMe issues. The NVMe also gets the same 256-byte > > payloads as with pcie_bus_perf, so nothing is lost by dropping it: the Root > > Port's 512 bytes don't help a link whose only device supports 256. > > > > Would you be able to test the series on that server, without > > pci=pcie_bus_perf? > > > > [1] https://lore.kernel.org/linux-pci/20261020122854.1500883-5-cassel@kernel.org/ > > Hi Niklas, > > I tested your series with this NVMe device, it worked fine without > 'pci=pcie_bus_perf', and also triggered the "Malformed TLP" error > with the parameter, same as the mainline kernel. Thank you for testing! I assume that you mean that it triggered the error even with my series, if you supplied 'pci=pcie_bus_perf' ? That is expected, since my series only changes the default strategy for MPS and MRRS configuration. So your quirk should be accepted regardless, since it can be backported and is needed when using strategies other than the default. Kind regards, Niklas