Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3142661rdb; Thu, 16 Nov 2023 01:01:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSSwkgHh8H+s70uluvql2JgaE1tKl5Fo/j30XD/YSL7xT563BiIT76xW/8F2/toj/xvvua X-Received: by 2002:a17:902:ea08:b0:1cc:4a84:27fa with SMTP id s8-20020a170902ea0800b001cc4a8427famr8571207plg.9.1700125285746; Thu, 16 Nov 2023 01:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700125285; cv=none; d=google.com; s=arc-20160816; b=EB+0rXyJ7Kk++Wco3r4yoUZbFbhw8IIzYNHATLbUfaflYT1e/BTsKFftTfQcLFRbe0 KZH6sVwXQO938vARbDB4AkfMXYcRfd+gvhESbupACpZMq4gHrHSijmX+jOzKLTqiMtne /vOU8bCl8W0gjkTV+vXX5vqrZsvnp2ToIGZIUxM2cWYaqTAbLaM3B83xcGdegI/53cQQ geaNUSjC/eFPpX3Nlg09WHH5D8DkS4xjSkQinfuLxYTPZEpMZsEScNIfB9whk57xrqVx kQfMy63/qovSqkOTd51MnC8G6fwayIJW0W9ae2QRPQ7TSEBw7QtiWot1f2EYgB+bk+4o l/Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wACaWqZshPuLcxoGqUx6Do7PoiMuCG5ymITtaNwKKEI=; fh=eDkf9qRBGgl+wvQVLlr99kz2KMG59/pM5gghfGnleMI=; b=SvIO5X79GBgLGeAMR1vPbOzuGFbVPw2Ut57jWy65q1YHLX7MX1Dmt8Gi2pxyze+eJ2 7vIZuXBxIYn8Z5KUg2gtchjXG88Yd63rVh6T2odAS45BnuJ6vnS7yUSR1ZEgilGbTpR1 NW+WxZ3lv6JvfF9chKlzuQIs0TcWxKM1YM/ktaHHUzOeY2n/AdoOtpubo50UMA9ZIalj /gemhelW50KZdWk1tsp5HH+GTu+TPKINn96u5KFpcd8id4nb/6A+nmqSaV3mpwJmDdJ+ boFKHKxRG9tABEYkQmo0nb+jtbQSD3FnGPiKAC2o2kKgHdLvqQ8KgqHlDSWM/nMyT5AC x0gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c4VjVSEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c1-20020a170902aa4100b001c613b5e778si11296683plr.557.2023.11.16.01.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 01:01:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c4VjVSEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EE23580CCD3F; Thu, 16 Nov 2023 01:01:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjKPJBP (ORCPT + 99 others); Thu, 16 Nov 2023 04:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjKPJBO (ORCPT ); Thu, 16 Nov 2023 04:01:14 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D674A1A7; Thu, 16 Nov 2023 01:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700125270; x=1731661270; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/STXsbosH6Rz9sQMt/crvGrrS9Z0X1RfO/fEtM3K5Z0=; b=c4VjVSEp+FXbfcPUlMD4dOLzaf2czQG5e5BcvJAIqJ09QVP4TPJwHGVF yx4C5RwvB2aeZJ+HbLJCkocyorQciAxNuwadWNZmJrCVrA7lth2cUaNWb Ru4V/mu33t4t1ioMQIXCIRbdyqsw+BQR0+UK4hVB0Ao6H529p3LFEVQ7B HJNcC4R47c3v7QKrEokzjLPtDbiERAV3VaYVyg6diHWEoPNvnmsQmlI2C tcgoOygFG3uY+y1gteOUJrAvA1+6KErTEBXrtBOVB2CMTUdgQDaIVggIg ugKd96b3KrGF1+phb24hscy2SFDRwsE1ttgD2fCvWtUUq7DS9K3j4mDmE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="457542981" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="457542981" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2023 01:00:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="768851613" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="768851613" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 16 Nov 2023 01:00:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9BFF0209; Thu, 16 Nov 2023 11:00:42 +0200 (EET) Date: Thu, 16 Nov 2023 11:00:42 +0200 From: Mika Westerberg To: Mario Limonciello Cc: Karol Herbst , Lyude Paul , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Bjorn Helgaas , Lukas Wunner , Danilo Krummrich , David Airlie , Daniel Vetter , Xinhui Pan , "Rafael J . Wysocki" , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Pali =?utf-8?B?Um9ow6Fy?= , Marek =?utf-8?B?QmVow7pu?= , "Maciej W . Rozycki" , Manivannan Sadhasivam , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , open list , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:PCI SUBSYSTEM" , "open list:ACPI" Subject: Re: [PATCH v3 5/7] PCI: ACPI: Detect PCIe root ports that are used for tunneling Message-ID: <20231116090042.GF17433@black.fi.intel.com> References: <20231114200755.14911-1-mario.limonciello@amd.com> <20231114200755.14911-6-mario.limonciello@amd.com> <20231115104019.GY17433@black.fi.intel.com> <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 16 Nov 2023 01:01:23 -0800 (PST) Hi Mario, On Wed, Nov 15, 2023 at 11:08:43AM -0600, Mario Limonciello wrote: > On 11/15/2023 04:40, Mika Westerberg wrote: > > Hi Mario, > > > > On Tue, Nov 14, 2023 at 02:07:53PM -0600, Mario Limonciello wrote: > > > USB4 routers support a feature called "PCIe tunneling". This > > > allows PCIe traffic to be transmitted over USB4 fabric. > > > > > > PCIe root ports that are used in this fashion can be discovered > > > by device specific data that specifies the USB4 router they are > > > connected to. For the PCI core, the specific connection information > > > doesn't matter, but it's interesting to know that this root port is > > > used for tunneling traffic. This will allow other decisions to be > > > made based upon it. > > > > > > Detect the `usb4-host-interface` _DSD and if it's found save it > > > into a new `is_virtual_link` bit in `struct pci_device`. > > > > While this is fine for the "first" tunneled link, this does not take > > into account possible other "virtual" links that lead to the endpoint in > > question. Typically for eGPU it only makes sense to plug it directly to > > the host but say there is a USB4 hub (with PCIe tunneling capabilities) > > in the middle. Now the link from the hub to the eGPU that is also > > "virtual" is not marked as such and the bandwidth calculations may not > > get what is expected. > > Right; you mentioned the DVSEC available for hubs in this case. As I don't > have one of these to validate it works properly I was thinking that should > be a follow up. > > If you think it should be part of the same series I'll add it, but I'd ask > if you can please check I did it right on one that reports the DVSEC? I don't think it should be part of this series. I just checked and DVSEC is only required for hosts so kind of hardware equivalent for the _DSD property you are using here. For hubs there is no such luxury unfortunately. I think I do have hardware here with the DVSEC in place so if you decide to add it, I should be able to try it.