Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp873611rdg; Fri, 11 Aug 2023 02:37:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4SGVecZ5N0j/SHbu9n4bDAkyBK6F81EyEiWvXqCznYJOitJUruJzeTPg2lpVuBpQWEzrD X-Received: by 2002:a05:6808:20a0:b0:3a0:4636:d079 with SMTP id s32-20020a05680820a000b003a04636d079mr1690646oiw.22.1691746672986; Fri, 11 Aug 2023 02:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691746672; cv=none; d=google.com; s=arc-20160816; b=jZebxhX6CZqn/zRbNwXuw5BWbRmCkWJ3GMNw8VvrT4EY//MJyt9TFOw2N15a41kfhT E0aKvtD97FERgdCcOR4xt3p+ksEXKJ6+Dlclz3jBZe4CLaQexmv9Q9H4m6dMZMv/kZNd NvlSWy3/98j/LI6szr9VZ0eWlPlbzbsHFgIsa+RPqRTsH20Um1v2WlOpW46vHWKfQZFF LAdgR1aFrBa3IxCe2uNibsvIKeXL0gHiqT59ufGwKGDPU5oHlX3tRldc6O2147/r2itl tUmurxAMhlGXqbhgqMwDgeT4+ISFBpocNtM4zmhkG9R80Kva67fzo1MfXFOh33gn+iYD CF5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=j+VhLT1PEgzO1srFP3LGEp7m6a2DNMmpqDUBO5tcKS8=; fh=lmHbvaZmV/CII5zT7ACLOCrOR7gYc+AZoP1m2Oza6zc=; b=IH1Lo3zWbqT1KMs/kgrskIPySgkgHHO7WKhLB1oDOFWw/CSs7tLXpQWPCEtezwAGFx DUqzKtNYy2chslGvWMaVAkDH+2kWC6nuPOi8pOx0TCvmciJuyXODAWgpTWkr3vwvLk5f 1xl56bd/tM9ndfyeZZVO3+5yxypigBJQW0AGOstTWV0IR3ax2OocWwCe1PyhnQO8hmmE TQ6fwWkKJzuK+3D8kQkbEnLcVnYdt6DCWmdDr/L36J5mWdIWD/gKHLaUQ+0bpNWs6xAZ 2GeWYhiZOfksAsxxrpLYGQQq1+o+ABYnyjbh8zhwryirn7VmqeU1ZH7NtSb9FDEzQYUl 8/Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=jrX+qVav; 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=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r32-20020a632060000000b0056385704942si3091655pgm.595.2023.08.11.02.37.39; Fri, 11 Aug 2023 02:37:52 -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=@canonical.com header.s=20210705 header.b=jrX+qVav; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231510AbjHKIfK (ORCPT + 99 others); Fri, 11 Aug 2023 04:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231939AbjHKIfI (ORCPT ); Fri, 11 Aug 2023 04:35:08 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 053722D6D for ; Fri, 11 Aug 2023 01:35:08 -0700 (PDT) Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id C234A42490 for ; Fri, 11 Aug 2023 08:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1691742906; bh=j+VhLT1PEgzO1srFP3LGEp7m6a2DNMmpqDUBO5tcKS8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jrX+qVavllWH+hBM8XdQV/Oo1m//s+xhoCKieq1BRrQIXyM93ZRa4xLRUdZ+z+7rx JsNYExlygC/SsQMUP7dEctoZdTG2BqKZZrzwTLn8tGua5t15nr/NvApi6MNHrU514L T8BZvnFHQBzinDCoTx8QzdXcS2QbXeoZdTOjc1GnzI6t5oDQtj2EwPMXxmXOOEFPVD ooy8LaDwu6RLBjtShyDzOEhHH8xAuNTuxyFkb2mVFK17CzbJNx9tuEZxTdh3Z0qyoI Rpsryusy/G27js76xQtHWtme33Iy4CZ9mPTEj70QEB/SmPzORT8OCWk9G1st0/tYrY KjWFnZw/bWZBA== Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2682b4ca834so2357210a91.2 for ; Fri, 11 Aug 2023 01:35:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691742905; x=1692347705; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j+VhLT1PEgzO1srFP3LGEp7m6a2DNMmpqDUBO5tcKS8=; b=OliLwffn6eWtwaLeX2RAw9yEGcNcnueLxPoUZjb2fHdMWrcqbIvxpK/o4W5wbh6AGX U954S5PNw/7aMbVP3MJt9/kKAR+QDLqwsVwY4p8+JSYCx2VQ/a/6oIoE3SxLF7ZvnGNa hGIfdmqqHGp1k0oJnR9GetTzKzmMds/+3JOBJwPjYCRoKUhZPbaQCaSGy8NvA+z8Z4Vy kGARtgTtrroGI/UhF/WOkdmGcOobrpSONjWk2M9XZzT9WslAECHyPbpymY+NhPus5GgS geYuWDGnUkmyoTxZcz/RJY0ZM6JWWAAaniQ3+R9zKPwx84SnBDZeJL+J2pzYWXtw8yGR y2Vw== X-Gm-Message-State: AOJu0YzLyufyuNCNCRPlQcQH+em7AE3JsbcdRXWo1mEHlugofcj28X8A MkM8eT7GD7H3LWfYTy8STVy17DRaIbZE4bYmOUmXNGd2B4l4VLSbKZ7sFsL95aPcyzXXdIiuKKO 9jW8BMg7bSyHjRznx0zpApCpEohkwGcEGeG0W+tuGpBKbgneQMf+lH+TDxw== X-Received: by 2002:a17:90b:1244:b0:269:14eb:653a with SMTP id gx4-20020a17090b124400b0026914eb653amr882776pjb.4.1691742904869; Fri, 11 Aug 2023 01:35:04 -0700 (PDT) X-Received: by 2002:a17:90b:1244:b0:269:14eb:653a with SMTP id gx4-20020a17090b124400b0026914eb653amr882765pjb.4.1691742904587; Fri, 11 Aug 2023 01:35:04 -0700 (PDT) MIME-Version: 1.0 References: <20230718192450.GA489825@bhelgaas> In-Reply-To: <20230718192450.GA489825@bhelgaas> From: Kai-Heng Feng Date: Fri, 11 Aug 2023 16:34:52 +0800 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH] PCI/ASPM: Enable ASPM on external PCIe devices To: Bjorn Helgaas Cc: "Limonciello, Mario" , Kuppuswamy Sathyanarayanan , linux-pci@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Vidya Sagar , Michael Bottini , intel-wired-lan@osuosl.org, bhelgaas@google.com, Mika Westerberg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,URIBL_BLOCKED autolearn=unavailable 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 Wed, Jul 19, 2023 at 3:24=E2=80=AFAM Bjorn Helgaas = wrote: > > On Mon, Jul 17, 2023 at 11:51:32AM -0500, Limonciello, Mario wrote: > > On 7/16/2023 10:34 PM, Kai-Heng Feng wrote: > > > On Sat, Jul 15, 2023 at 12:37=E2=80=AFAM Mario Limonciello wrote: > > > > On 7/14/23 03:17, Kai-Heng Feng wrote: > > > > > > The main point is OS should stick to the BIOS default, which is t= he > > > > > only ASPM setting tested before putting hardware to the market. > > > > > > > > Unfortunately; I don't think you can jump to this conclusion. > > I think using the BIOS default as a limit is problematic. I think it > would be perfectly reasonable for a BIOS to (a) configure only devices > it needs for console and boot, leaving others at power-on defaults, > and (b) configure devices in the safest configuration possible on the > assumption that an OS can decide the runtime policy itself. This is not using BIOS as a "limit". OS is still capable of changing the ASPM policy at boot time or runtime. The main point is to find a "sane" setting for devices where BIOS can't program ASPM. > > Obviously I'm not a BIOS writer (though I sure wish I could talk to > some!), so maybe these are bad assumptions. > > > > > A big difference in the Windows world to Linux world is that OEMs s= hip > > > > with a factory Windows image that may set policies like this. OEM > > > > "platform" drivers can set registry keys too. > > I suppose this means that the OEM image contains drivers that aren't > in the Microsoft media, and those drivers may set constraints on ASPM > usage? > > If you boot the Microsoft media that lacks those drivers, maybe it > doesn't bother to configure ASPM for those devices? Linux currently > configures ASPM for everything at enumeration-time, so we do it even > if there's no driver. This can be another topic to explore. But sounds like it can break things. > > > > I wonder if there's any particular modification should be improved fo= r > > > this patch? > > > > Knowing this information I personally think the original patch that sta= rted > > this thread makes a lot of sense. > > I'm still opposed to using dev_is_removable() as a predicate because I > don't think it has any technical connection to ASPM configuration. OK. So what should we do instead? Checking if the device is connected to TBT switch? Kai-Heng > > Bjorn