Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1027694lqm; Thu, 2 May 2024 03:07:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4LUvljftZAXQf3tmvuk9D49ga9IYFnM90ZhT6r0jZSqsSPJe+5rnYA/BHRDpBvg6PmS62Kzy/Zv0f0fELlTGQzupKHU/58PGtLNPs0w== X-Google-Smtp-Source: AGHT+IFkiySTPP7VvefLQlJMFpBVLjTJErL531n/QBELEg9TAA+KihE+8j/vee64ik+UawHPJX98 X-Received: by 2002:a50:8e1a:0:b0:572:6ee9:5a2d with SMTP id 26-20020a508e1a000000b005726ee95a2dmr3072826edw.12.1714644475386; Thu, 02 May 2024 03:07:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714644475; cv=pass; d=google.com; s=arc-20160816; b=YUg7jFDVQeVLbblJkpX53lp4DV5jJrgNhmeP3f1bBrJFqOqYKxC5vBURhFUCQ7iOXK ikxt9xjCv4unNurf1/MXRXF9thYMRceiXcmEDSNjE0akciNC7DEV24bZT8mdp9a1mBZv vJzJhQSU6nEjhqPZFMW1fCfm6pO1lMJCYTgeKAoLIUXInSGey4xoJ86C16u0JY1oDsJ5 p3bnxcCYGBywG69LyjsO69Cvf8WgUbVAOod0w+qqqfkY+SWvsNHHQua4d9kzBHf1BDRi 7mxhlpbtWTgLZ0oWgBjYjS0fg+1+/HnJIXJX8Wp19jOyC/AMtpQcVhz5ZAz6RDBDzGYB 1lgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LyuFkfJBil22HC0aNhek4gC1VhEcoX/x9m7VWsL8YnQ=; fh=M6L2n3qatRRuejtppuTZmoY9plC/lQ6X3lt4Mi3vlVY=; b=I7KjXJHRQR4jxm9NfAiRe8HLBFt5kLEpmemDjmSJxic/xAfEuLPkl69d1mItk0MPpC HlOEPivvi2sVtBQsWOiZics6OP27A8Yo6mSnf6L+9uD42rL6tPXXcLXQm46k9rIwJ0TA ZzgMepjepMq0erI1puEpIdDSnLfRcU5YV0d8l3HGzGt7eIdrQ5FfPdHCoRpfjeb/ifqy RCExT4i1S0qiEqzv57dqh3Oc/V9AxpC1t52gTM9OJtk+ZGZQlMgHLhxyq5AuItCwWHPP gR30KR4q82p/MdTlDz3xv7BmNNzAvqtTjzZLhkJMMMlPSH6UuuQZnu4XAGlwd5Ui99Up rf+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iWJ3dun0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-166282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z5-20020aa7c645000000b0057287a8b212si338616edr.423.2024.05.02.03.07.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 03:07:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iWJ3dun0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-166282-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F0E221F24BDA for ; Thu, 2 May 2024 10:07:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C67F56B95; Thu, 2 May 2024 10:07:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iWJ3dun0" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE06F56B77; Thu, 2 May 2024 10:07:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714644466; cv=none; b=oimMLMAvoAcLa7MqHLtFEm5JDokjMGl1LVpLiFz4EeGhIvpeengxg6zOdTb7jTPkmMFq0ENVPRdOiJKE35AjlyKEfHnSm8HZZS+6aH4q7IbDVKzxLgj2VtPAysoKV8oPLR45NRLchbOOFjiKYJdRl0ggxHYSOBQjLtpmFNhYEP4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714644466; c=relaxed/simple; bh=8uB3G0pGdRL8CBBXyH3JKYPUdc1Rc914PuNuP+Iad8w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=THXNadgc6POeh2aHZjbKw/mnqFhOK4wUdrIKIPcbu5mCLd3tgl8JdxwDYfV92WsaHKAVVKIwVHl1wjf0Rewdq3psGyzrPN0iWZBWAjZTimhwPqIHu9amCbOqrWQm2BUmwYolmGoy3vZ7aU+OTrN62AMRFSJVwimk9B4ld/xlHQI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=iWJ3dun0; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714644465; x=1746180465; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=8uB3G0pGdRL8CBBXyH3JKYPUdc1Rc914PuNuP+Iad8w=; b=iWJ3dun0TsnwhQzlc18o6P8eEA/TpnVw+YM5fAH4sLEIe4+ZFc+UgGwo w54vG3I+Wx94Oa3/W5r+8oGYComEggTAUaqwjzQrU9xDa1PhW8zJ64OLf bKRdKuASe1t95Rl832CmWufgQ/suByaQligrXKM+RdTQmJx12U3NwQZWS D4zpf4CIT0MWCO5FDOIpKb40qoGKTMoMDGeJlSSQSJbVC/3EOAgFvsgno IwRIGIJdGEGW3uVNqEGe3P8OjqfBaB3NkW31WhKYu0lnUZQ6leylHEnKU OFOEsi8Bj7tSlt361PZSPWSexJF01LIBkvIy2FqM4m/IAboHsC61qRqcv A==; X-CSE-ConnectionGUID: rdRTCGuCSM6+/SXa06RtFw== X-CSE-MsgGUID: 224PmC9tToiU2+kpaQ7jaA== X-IronPort-AV: E=McAfee;i="6600,9927,11061"; a="32919308" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="32919308" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 03:07:44 -0700 X-CSE-ConnectionGUID: bU+k3h2oQFK3Fk5YbdZTwg== X-CSE-MsgGUID: sbHBYNo5QWqGpnUmUoVp+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="27088453" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa007.fm.intel.com with ESMTP; 02 May 2024 03:07:42 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 81BFC21A; Thu, 2 May 2024 13:07:40 +0300 (EEST) Date: Thu, 2 May 2024 13:07:40 +0300 From: Mika Westerberg To: Mario Limonciello Cc: Esther Shimanovich , Lukas Wunner , Dmitry Torokhov , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Rajat Jain Subject: Re: [PATCH v4] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8 Message-ID: <20240502100740.GH3969176@black.fi.intel.com> References: <7d68a112-0f48-46bf-9f6d-d99b88828761@amd.com> <20240423053312.GY112498@black.fi.intel.com> <7197b2ce-f815-48a1-a78e-9e139de796b7@amd.com> <20240424085608.GE112498@black.fi.intel.com> <20240502043832.GG3969176@black.fi.intel.com> <0f83698e-dca8-4296-b969-fdacda39fec7@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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).