Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp277330imw; Fri, 15 Jul 2022 03:05:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tBCrQYPPRbiOloQeSDOrIo/wjkQVyotLtGT/ifWdOywBp4PKnXqU22hx7gtZ2UF+S/P1DN X-Received: by 2002:a17:90b:4c0c:b0:1ef:e4f6:409f with SMTP id na12-20020a17090b4c0c00b001efe4f6409fmr20697598pjb.227.1657879517224; Fri, 15 Jul 2022 03:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657879517; cv=none; d=google.com; s=arc-20160816; b=Ph0FmmX+pDGmOi3Vw0rDSK9UQe3bz6vhbuf8KgYilPwHUFu1aMCNitTya8NnWcXMqp DK+8KsZQGw5gTb16t5Yw0HLtAnNmm9Dm3+pRpO57OHGCCQObAORXJvCtlcaYY9hJFhLd U4maEcu2uUrUpMC5jR1RVA3C/JYtl/y/3e79mpAbogYYo976j1cz+8qJnogy47BEZZs/ 1/9SgP6+UTUnBbd6nqHGDdNkOa6YDk8JEAtRcZuzS1XoJfvmDebgZ3xhgeE3jYXkX5WG VzDvsrAIZT7ndcsPveKHgWNu3pl7QcptEpEBPirVlKJ+E0vYPGC+u3jRjFNrOaXB8V6X +ToA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4IrGnCKdfyKDwrM4/oytgqke+dPiD/+NfZusTNdZN2Y=; b=E3nlTzQDtHiG+be0xLxk+m7oBc1Lb5YK88rkCFj0gF1RhZ0RMP2wfeL8BlwnYFhsMB jrv1tMBFg6hZw0lpvkaz0iWKUAQx45AVC2GGYj65CGIvFbs7yYWFL6VGeRINERuM+Co4 VUi37fJxJ3hApE7/YwLkK4w48Hb0VskPuQX8utKBtBfdjskHJ1mqrR1qnt9ZpVX8YeE+ ARAyUzWrlE4ecdQB9+s0spyu4b/ai5LNwj+VGjExzH0iDsk6Xx6vKnRYorgE9MdbKGsZ gFVfyc4v5EmDO3OHRRMXGiBL9uHlkYzBFJlqRRIwGqpUMezUk5lKLdX2C4XqAG8RWKZ2 82SA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk4-20020a17090b33c400b001ecfcc0a97dsi10681482pjb.71.2022.07.15.03.05.01; Fri, 15 Jul 2022 03:05:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233122AbiGOJcm (ORCPT + 99 others); Fri, 15 Jul 2022 05:32:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233005AbiGOJck (ORCPT ); Fri, 15 Jul 2022 05:32:40 -0400 X-Greylist: delayed 102981 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 15 Jul 2022 02:32:37 PDT Received: from cavan.codon.org.uk (cavan.codon.org.uk [176.126.240.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6DEC11814; Fri, 15 Jul 2022 02:32:37 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 5F20F40A71; Fri, 15 Jul 2022 10:32:36 +0100 (BST) Date: Fri, 15 Jul 2022 10:32:36 +0100 From: Matthew Garrett To: Manyi Li Cc: Kai-Heng Feng , Bjorn Helgaas , bhelgaas@google.com, refactormyself@gmail.com, kw@linux.com, rajatja@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Vidya Sagar , rafael@kernel.org Subject: Re: [PATCH] PCI/ASPM: Should not report ASPM support to BIOS if FADT indicates ASPM is unsupported Message-ID: <20220715093236.GA12020@srcf.ucam.org> References: <20220713112612.6935-1-limanyi@uniontech.com> <20220713182852.GA841582@bhelgaas> <7305201c-eaf2-cb36-80fe-15174d3e33c7@uniontech.com> <20220715082945.GA10661@srcf.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS autolearn=no 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 Fri, Jul 15, 2022 at 05:19:25PM +0800, Manyi Li wrote: > > > On 2022/7/15 16:29, Matthew Garrett wrote: > > On Fri, Jul 15, 2022 at 03:40:36PM +0800, Manyi Li wrote: > > > > > Please see the details of this issus: > > > https://bugzilla.kernel.org/show_bug.cgi?id=216245 > > > > Hmm. The only case where changing aspm_support_enabled to false should > > matter is in pcie_aspm_init_link_state(), where it looks like we'll > > potentially rewrite some registers even if aspm_disabled is true. I > > think in theory we shouldn't actually modify anything as a result, and > > the lspcis from the bug don't show any ASPM values having changed, but I > > don't trust Realtek hardware in the general case so maybe it gets upset > > here? If the proposed patch is to just set aspm_support_enabled to false > > when we see the FADT bit set then I think this is fine. > > > > "aspm_support_enabled" alse be used in calculate_support(): > if (pcie_aspm_support_enabled()) > support |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT; > When set OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT, cause this AER > issue. I want don't set OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT when > we see the FADT bit set. Oh hm. Are you sure it's the OSC call that breaks it? I have some recollection that I verified the behaviour of Windows here, but it's been over 10 years since I touched this so I could well be wrong. I can try to set up a test env to verify the behaviour of Windows when it comes to _OSC if the FADT says ASPM is unsupported.