From: Sasha Levin <sashal@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
stable@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Yazen Ghannam <yazen.ghannam@amd.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 6.13 13/15] PCI: Store number of supported End-End TLP Prefixes
Date: Tue, 28 Jan 2025 13:11:04 -0500 [thread overview]
Message-ID: <Z5kduHuaGWQwS9M_@lappy> (raw)
In-Reply-To: <19475994-b606-604e-f17d-a5251026c4df@linux.intel.com>
On Tue, Jan 28, 2025 at 08:00:39PM +0200, Ilpo Järvinen wrote:
>On Tue, 28 Jan 2025, Sasha Levin wrote:
>
>> From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>>
>> [ Upstream commit e5321ae10e1323359a5067a26dfe98b5f44cc5e6 ]
>>
>> eetlp_prefix_path in the struct pci_dev tells if End-End TLP Prefixes
>> are supported by the path or not, and the value is only calculated if
>> CONFIG_PCI_PASID is set.
>>
>> The Max End-End TLP Prefixes field in the Device Capabilities Register 2
>> also tells how many (1-4) End-End TLP Prefixes are supported (PCIe r6.2 sec
>> 7.5.3.15). The number of supported End-End Prefixes is useful for reading
>> correct number of DWORDs from TLP Prefix Log register in AER capability
>> (PCIe r6.2 sec 7.8.4.12).
>>
>> Replace eetlp_prefix_path with eetlp_prefix_max and determine the number of
>> supported End-End Prefixes regardless of CONFIG_PCI_PASID so that an
>> upcoming commit generalizing TLP Prefix Log register reading does not have
>> to read extra DWORDs for End-End Prefixes that never will be there.
>>
>> The value stored into eetlp_prefix_max is directly derived from device's
>> Max End-End TLP Prefixes and does not consider limitations imposed by
>> bridges or the Root Port beyond supported/not supported flags. This is
>> intentional for two reasons:
>>
>> 1) PCIe r6.2 spec sections 2.2.10.4 & 6.2.4.4 indicate that a TLP is
>> malformed only if the number of prefixes exceed the number of Max
>> End-End TLP Prefixes, which seems to be the case even if the device
>> could never receive that many prefixes due to smaller maximum imposed
>> by a bridge or the Root Port. If TLP parsing is later added, this
>> distinction is significant in interpreting what is logged by the TLP
>> Prefix Log registers and the value matching to the Malformed TLP
>> threshold is going to be more useful.
>>
>> 2) TLP Prefix handling happens autonomously on a low layer and the value
>> in eetlp_prefix_max is not programmed anywhere by the kernel (i.e.,
>> there is no limiter OS can control to prevent sending more than N TLP
>> Prefixes).
>>
>> Link: https://lore.kernel.org/r/20250114170840.1633-7-ilpo.jarvinen@linux.intel.com
>> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>Hi,
>
>Why is this being auto selected? It's not a fix nor do I see any
>dependency related tags. Unless the entire TLP consolidation would be
>going into stable, I don't see much value for this change in stable
>kernels.
I wasn't too sure about it either. My thinking was that there is a spec
compatibility issue here, but looks like I was wrong.
I'll drop it, thanks!
--
Thanks,
Sasha
next prev parent reply other threads:[~2025-01-28 18:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 17:53 [PATCH AUTOSEL 6.13 01/15] media: cxd2841er: fix 64-bit division on gcc-9 Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 02/15] PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar() Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 03/15] media: i2c: ds90ub913: Add error handling to ub913_hw_init() Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 04/15] media: i2c: ds90ub953: Add error handling for i2c reads/writes Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 05/15] media: bcm2835-unicam: Disable trigger mode operation Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 06/15] media: uvcvideo: Implement dual stream quirk to fix loss of usb packets Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 07/15] media: uvcvideo: Add new quirk definition for the Sonix Technology Co. 292a camera Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 08/15] media: uvcvideo: Add Kurokesu C1 PRO camera Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 09/15] media: vidtv: Fix a null-ptr-deref in vidtv_mux_stop_thread Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 10/15] Drivers: hv: vmbus: Wait for boot-time offers during boot and resume Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 11/15] hyperv: Do not overlap the hvcall IO areas in hv_vtl_apicid_to_vp_id() Sasha Levin
2025-01-28 21:15 ` Roman Kisel
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 12/15] PCI: mediatek-gen3: Avoid PCIe resetting via PERST# for Airoha EN7581 SoC Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 13/15] PCI: Store number of supported End-End TLP Prefixes Sasha Levin
2025-01-28 18:00 ` Ilpo Järvinen
2025-01-28 18:11 ` Sasha Levin [this message]
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 14/15] PCI/DPC: Quirk PIO log size for Intel Raptor Lake-P Sasha Levin
2025-01-28 17:53 ` [PATCH AUTOSEL 6.13 15/15] PCI: switchtec: Add Microchip PCI100X device IDs Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z5kduHuaGWQwS9M_@lappy \
--to=sashal@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yazen.ghannam@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox