lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1vyLNW20RuVaZe5@wunner.de>
Date: Fri, 13 Dec 2024 09:37:00 +0100
From: Lukas Wunner <lukas@...ner.de>
To: Niklas Schnelle <niks@...nel.org>
Cc: Niklas Schnelle <schnelle@...ux.ibm.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
	Rob Herring <robh@...nel.org>, Krzysztof Wilczy??ski <kw@...ux.com>,
	"Maciej W . Rozycki" <macro@...am.me.uk>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Alexandru Gagniuc <mr.nuke.me@...il.com>,
	Krishna chaitanya chundru <quic_krichai@...cinc.com>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	"Rafael J . Wysocki" <rafael@...nel.org>, linux-pm@...r.kernel.org,
	Smita Koralahalli <Smita.KoralahalliChannabasappa@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Amit Kucheria <amitk@...nel.org>, Zhang Rui <rui.zhang@...el.com>,
	Christophe JAILLET <christophe.jaillet@...adoo.fr>,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: Re: [PATCH] PCI/portdrv: Disable bwctrl service if port is fixed at
 2.5 GT/s

On Thu, Dec 12, 2024 at 09:40:04PM +0100, Niklas Schnelle wrote:
> On Thu, 2024-12-12 at 13:32 +0100, Lukas Wunner wrote:
> > pcie_get_supported_speeds() is used to fill in the supported_speeds
> > field in struct pci_dev.
> > 
> > And that field is used in a number of places (exposure of the max link
> > speed in sysfs, delay handling in pci_bridge_wait_for_secondary_bus(),
> > link tuning in radeon/amdgpu drivers, etc).
> 
> Side question. If this is used in radeon/amdgpu could detecting the
> thunderbolt port's max link speed as 2.5 GT/s cause issues for external
> GPUs?

I don't think so:

An attached Thunderbolt gadget (e.g. eGPU) is visible to the OS as a
PCIe switch.  A portion of the Switch Downstream Ports is used to
attach Endpoints (e.g. GPU) and the remainder is used for tunneling,
i.e. to extend the hierarchy further if multiple Thunderbolt devices
are daisy-chained.

My expectation is that the Max Link Speed is 8 GT/s on those Downstream
Ports leading to Endpoints and 2.5 GT/s on those Downstream Ports used
for tunneling (to conform with the USB4/Thunderbolt spec).  In other words,
the Supported Link Speeds is the same on all of them, but Max Link Speed
is reduced to 2.5 GT/s on so-called PCIe Adapters (in USB4/Thunderbolt
terminology).

The PCIe Adapters encapsulate PCIe TLPs into Thunderbolt packets and
send them over the Thunderbolt fabric, and similarly decapsulate TLPs
received from the fabric.

There are some illustrations available here which explain the distinction
between the two types of Downstream Ports:

https://developer.apple.com/library/archive/documentation/HardwareDrivers/Conceptual/ThunderboltDevGuide/Basics/Basics.html

I'm hoping Mika or Ilpo can verify the above information.  I have
lspci dumps here of MeteorLake-P and BarlowRidge host controllers,
but without any attached USB4/Thunderbolt gadgets.

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ