All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: Esther Shimanovich <eshimanovich@chromium.org>,
	Lukas Wunner <lukas@wunner.de>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rajat Jain <rajatja@google.com>
Subject: Re: [PATCH v4] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8
Date: Thu, 2 May 2024 13:07:40 +0300	[thread overview]
Message-ID: <20240502100740.GH3969176@black.fi.intel.com> (raw)
In-Reply-To: <0f83698e-dca8-4296-b969-fdacda39fec7@amd.com>

On Thu, May 02, 2024 at 04:54:56AM -0500, Mario Limonciello wrote:
> On 5/1/2024 23:38, Mika Westerberg wrote:
> > Hi,
> > 
> > On Wed, May 01, 2024 at 06:23:28PM -0400, Esther Shimanovich wrote:
> > > I don’t have this device available at my office. I just saw that
> > > StarTech sells a universal laptop docking station with chipset-id
> > > Intel - Alpine Ridge DSL6540. Then I looked up the device, and found
> > > it here: https://linux-hardware.org/?id=pci:8086-1577-8086-0000
> > > 
> > > Therefore, I concluded that the DSL6540 has an NHI component.
> > 
> > Okay understood. Yes Alpine Ridge can be both host and device router. In
> > device configuration such as the above it does not expose NHI. If it is
> > host as in the above list you shared then it includes one.
> 
> There are different PCI IDs for AR for host vs device though, right?

No they are the same. Well I think Titan Ridge has different for device.

Here's my system with AR host and AR dock:

06:00.0 0604: 8086:15d3 (rev 02)
07:00.0 0604: 8086:15d3 (rev 02)
07:01.0 0604: 8086:15d3 (rev 02)
07:02.0 0604: 8086:15d3 (rev 02)
07:04.0 0604: 8086:15d3 (rev 02)
08:00.0 0880: 8086:15d2 (rev 02)

09:00.0 0604: 8086:15d3 (rev 02)
0a:00.0 0604: 8086:15d3 (rev 02)
0a:01.0 0604: 8086:15d3 (rev 02)
0a:02.0 0604: 8086:15d3 (rev 02)
0a:03.0 0604: 8086:15d3 (rev 02)
0a:04.0 0604: 8086:15d3 (rev 02)

> But I guess that could technically be spoofed.
> Is there a fixed PCI ID for the RP used to tunnel for host AR?

No, I don't think so. The Root Port can be anything even non-Intel.

> If so you could special case that anything connected to that PCI ID for RP
> used to tunnel isn't trusted.

None of the PCIe tunnels are trusted. We have IOMMU already in place
that blocks accesses outside. Also it is not possible to have anoter
host router in a domain because:

* The connection manager in the real host router needs to enumerate the
  device router before any tunnels can be established.

* Once it does that it has TopologyID > 0 so it is not a host router and
  cannot receive packets with CM bit set in the route string.

* If it still exposes a PCIe endpoint with NHI that is behind a PCIe
  tunnel from the host router PCIe downstream port so it is behind the full IOMMU
  mappings (as these ports are "external_facing").

Yes if there is such PCIe device the Thunderbolt driver may attach to it
but I don't see what the harm would be since it cannot really affect the
topology (except maybe trying to crash the driver by sending unexpected
replies, or so).

  reply	other threads:[~2024-05-02 10:07 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 20:53 [PATCH v4] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8 Esther Shimanovich
2023-12-21 23:15 ` Dmitry Torokhov
2023-12-27  0:15 ` Bjorn Helgaas
2023-12-28 13:25 ` Lukas Wunner
2023-12-28 13:39   ` Mika Westerberg
2024-01-17 21:21     ` Esther Shimanovich
2024-01-18  6:00       ` Mika Westerberg
2024-01-18 15:47         ` Mario Limonciello
2024-01-18 16:12           ` Dmitry Torokhov
2024-01-18 16:21             ` Dmitry Torokhov
2024-01-19  5:37             ` Mika Westerberg
2024-01-19  7:48               ` Mika Westerberg
2024-01-19 10:22                 ` Mika Westerberg
2024-01-19 16:03                   ` Esther Shimanovich
2024-01-22  6:10                     ` Mika Westerberg
2024-01-22 23:50                   ` Mario Limonciello
2024-01-23  6:18                     ` Mika Westerberg
2024-01-25 23:45                       ` Esther Shimanovich
2024-04-15 22:34                         ` Esther Shimanovich
2024-04-16  5:03                           ` Mika Westerberg
2024-04-18 19:43                             ` Esther Shimanovich
2024-04-19  4:49                               ` Mika Westerberg
2024-04-22 19:17                                 ` Esther Shimanovich
2024-04-22 19:21                                   ` Mario Limonciello
2024-04-23  5:33                                     ` Mika Westerberg
2024-04-23  8:31                                       ` Lukas Wunner
2024-04-23  8:40                                         ` Mika Westerberg
2024-04-23 16:59                                       ` Mario Limonciello
2024-04-24  8:56                                         ` Mika Westerberg
2024-04-25 21:16                                           ` Esther Shimanovich
2024-04-26  4:52                                             ` Mika Westerberg
2024-04-26 15:58                                               ` Esther Shimanovich
2024-04-27  5:35                                               ` Lukas Wunner
2024-04-27  7:41                                                 ` Mika Westerberg
2024-04-27  7:08                                             ` Lukas Wunner
2024-04-27 15:09                                             ` Lukas Wunner
2024-05-01 22:23                                               ` Esther Shimanovich
2024-05-02  4:38                                                 ` Mika Westerberg
2024-05-02  9:54                                                   ` Mario Limonciello
2024-05-02 10:07                                                     ` Mika Westerberg [this message]
2024-05-08  5:14                                                 ` Lukas Wunner
2024-05-10  5:26                                                   ` Mika Westerberg
2024-05-10 15:44                                                     ` Esther Shimanovich
2024-05-11  4:38                                                       ` Mika Westerberg
2024-05-11  5:43                                                         ` Mika Westerberg
2024-05-15 18:53                                                           ` Esther Shimanovich
2024-05-15 20:35                                                             ` Lukas Wunner
2024-05-15 20:51                                                               ` Lukas Wunner
2024-05-15 21:44                                                                 ` Esther Shimanovich
2024-05-16  8:30                                                               ` Mika Westerberg
2024-05-16 10:03                                                                 ` Mika Westerberg
2024-05-16  9:16                                                             ` Mika Westerberg

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=20240502100740.GH3969176@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eshimanovich@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mario.limonciello@amd.com \
    --cc=rajatja@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.