Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11615552rwd; Thu, 22 Jun 2023 16:14:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62/V6Q9RsJd/lnwWTKURLupykoysHG8JrHoudv7EUxDosALcHMxH5D+9iFlkB2BVt9D9xM X-Received: by 2002:a17:902:b904:b0:1b3:f5c7:4e75 with SMTP id bf4-20020a170902b90400b001b3f5c74e75mr13019943plb.58.1687475682003; Thu, 22 Jun 2023 16:14:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687475681; cv=none; d=google.com; s=arc-20160816; b=bPFoOiVnkn6v74k3cmAT6VBjbj03rX/Uh38ZZkCDA4nE2/eHHy5Fo+iw64MyeyJFzV dRBR//CDfmxg7G0KvByuq31iGSuxTqEn2k+MCMka0dnIVlpCV6P0JkDJFZaIkzPjZhZx jkb2cVFtHEsfYU/16nuYxN5hvrnzdtjZmwdcWFb4bYEhqWKGIxidfVqyHoLzxq1j554B l+2OUiyH80maWaUA77YEajj+BqX36c4eLuAPYRlpfkFiJ+Lm9CLzZ7inxcduu8uk+cxS smN+s+0KfAD7VtlHgP2ujXuXuLiS/xsQJ59h3IG2jQxwOgbEec/9hSwSDuCCVrf3LWO3 wVyg== 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-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=Gu0a+Bnop4EpFIYm7iaHlAK6pPUuTd50wH5/9/4C6y8=; b=LKUDvNuUkxmM9LrycQ2lT89eMVaPWraodB6MutgkY/Ac7ltk4zU8h8Cn1IJrbzymP0 kGGkLP9SvxOrOtqYDHmVt1HiDrY/VtZ6HbY0xUB6xYNBiEbJ29CAM8qXN8BXuylkfYQm onennGr+Lat229BCAoy6vizqcmqcsuKVr5+1dFgHSlft7SRnFP8RdMjx3DWCb6hUeUwt +EozpzuoP3kkm/xrQ8LSB9xiefuuKjp8j4WH+E9F0lwGvcmcVgBLWCMHFmRQeeMsbOAB o1Pjd9epn6Z+OKGgzXQilU89ZmSIalxozxJXZ/bn4nlesZfnt2C7dKcYFdvMXHvCuJAy i4xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hCs5CNZZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg5-20020a170902fb8500b001b23d4573b2si6866936plb.27.2023.06.22.16.14.29; Thu, 22 Jun 2023 16:14:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hCs5CNZZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231209AbjFVXGV (ORCPT + 99 others); Thu, 22 Jun 2023 19:06:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbjFVXGT (ORCPT ); Thu, 22 Jun 2023 19:06:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA032121; Thu, 22 Jun 2023 16:06:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2291461901; Thu, 22 Jun 2023 23:06:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EC1FC433C0; Thu, 22 Jun 2023 23:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687475169; bh=pegMzDXZUMfrU4xRrjxoACjUG6/qK6YYOfic7NwK9pQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=hCs5CNZZoiMELCn9nFEKCsyp66MGgCSd2Hzf8wePvkKGKs/N+DcO7GzoWqVgM/rZh iW+LAI5zdWRxLtq3a0bEgxjjIdjiy+s3XAiwQgU6SoRhvDy7tpbopbMg3wvZw4i2Ij 3a8C11GppvO/fKDyUKbhbq2mndKZmjBz1K9wVlDoiASZBWjx51O+bYXKG176utoHSa hoVCcwBOZ4nGfc8mGbBkrjICYP5YjfuZUUihqLLFQEfn0BSO/WchgD+ZnlxSlcMg3c iMKpWlxW7wW7qQcn/92rhrrQg1ZpSJLOTkMoRLkKYLhG6I3gtvpTp4nKouZBXkEc9F b4r1Dh5HAjaZQ== Date: Thu, 22 Jun 2023 18:06:07 -0500 From: Bjorn Helgaas To: "Limonciello, Mario" Cc: Kai-Heng Feng , bhelgaas@google.com, Mika Westerberg , Kuppuswamy Sathyanarayanan , Vidya Sagar , Michael Bottini , "Rafael J. Wysocki" , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI/ASPM: Enable ASPM on external PCIe devices Message-ID: <20230622230607.GA155247@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1b4b2c6c-8119-95fd-8958-dbbecc66510c@amd.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 20, 2023 at 01:36:59PM -0500, Limonciello, Mario wrote: > > > > A variety of Intel chipsets don't support lane width switching > > > or speed switching.? When ASPM has been enabled on a dGPU, > > > these features are utilized and breakage ensues. > > Maybe this helps explain all the completely unmaintainable ASPM > > garbage in amdgpu and radeon. > > > > If these devices are broken, we need quirks for them. > > The problem is which device do you consider "broken"? > The dGPU that uses these features when the platform advertises ASPM > or the chipset which doesn't support the features that the device > uses when ASPM is active? > > With this problem I'm talking about the dGPU works fine on hosts > that support these features. Without more details about what's broken and when, I can't say. What I *think* is that a device that doesn't work per spec needs a quirk. Typically it's a device that advertises a capability that doesn't work correctly. > > > > > I think the pragmatic way to approach it is to (essentially) > > > > > apply the policy as BIOS defaults and allow overrides from > > > > > that. > > > > > > > > Do you mean that when enumerating a device (at boot-time or > > > > hot-add time), we would read the current ASPM config but not > > > > change it? And users could use the sysfs knobs to > > > > enable/disable ASPM as desired? > > > > > > Yes. > > > > > Hot-added devices power up with ASPM disabled. This policy would > > mean the user has to explicitly enable it, which doesn't seem > > practical to me. > > Could we maybe have the hot added devices follow the policy of > the bridge they're connected to by default? > > > > > That wouldn't solve the problem Kai-Heng is trying to solve. > > > > > > Alone it wouldn't; but if you treated the i225 PCIe device > > > connected to the system as a "quirk" to apply ASPM policy > > > from the parent device to this child device it could. > > > > I want quirks for BROKEN devices. Quirks for working hardware is a > > maintenance nightmare. > > If you follow my idea of hot added devices the policy follows > the parent would it work for the i225 PCIe device case? That doesn't *sound* really robust to me because even if the default config after hot-add works, the user can change things via sysfs, and any configuration we set it to should work as well. If there are land-mines there, we need a quirk that prevents sysfs from running into it. Bjorn