Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1430993rwl; Fri, 7 Apr 2023 16:21:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ZN8ZIt9iQRJW3nD27VqxhIy0l9HDRHbZMv0BgYOYmNtI/gWt4CijPqwmPg61qLX01eWit4 X-Received: by 2002:a62:388a:0:b0:622:ec07:c6bc with SMTP id f132-20020a62388a000000b00622ec07c6bcmr3991686pfa.15.1680909680170; Fri, 07 Apr 2023 16:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680909680; cv=none; d=google.com; s=arc-20160816; b=QNwIXggh3EHc5/6AJLONjQzZzd8QOMcwBI8uWmOIS+vvKFFSUeZrECYhiBDQLf6KRX Y1Gpo0g2i86EnSbpH7SWoV8LuRNqKVHlGGHYhDDZ3prAZUct7Pzbs+Q0EL/hyXOzOz/w +RaULpSUtQ08xoek6f83JHc/5oNQei2Q/guE6w9fBt2JIFEzZlHRgp1gcrkUnm6aKKum DRiLLlBSF9HIwU834PG0YwQpvAzVnyHF7JpCKwAiOovUPze7MIfGg2ZZSQR/evJbd76b jCZglOIQPXTWnxFy66PLJnthQUR33UjG0pgCWV0t+FE2SA65Qyh14rwLQLiei69OTAtR wmEQ== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=BvsRoVNjA/UToAKhuHpZbfyqVqLtDRENlNf5J6m/6zM=; b=MsbTFWuA5r2oDIjLxYS4uMGQ1GG+sip56fQaqIzs1u9OIqjW0NH62HW/eR17rXG1tI t8i/A7rjrDOtWgey4OnbiGWy6ZIEAvtqjjdv7SBf0CYm9ykQ8iDmHixE0m0XVMbgsNRp k4gVENoLBpSXSuqOb8d+lPiIdRPsMTMCXqauLGTFsYOS30hjtyibOwFDXuINyvN7z8g7 TmIdwVUcuJr9EaNNg151N1xpqDSG8tYdT9lN6z0Yu4/yRnRf5XfiwCjdE0fkngfAgzAQ hltc3cZIIxOS0vLvhSbHFGKJcNgkRVVlPx/tpYSlEGuUYcszjKGdTXgeAXz+4sAV61rx yyrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kQ4oQ2xP; 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 e11-20020a65688b000000b0050c1054814esi4482686pgt.558.2023.04.07.16.21.08; Fri, 07 Apr 2023 16:21:20 -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=kQ4oQ2xP; 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 S229981AbjDGXS0 (ORCPT + 99 others); Fri, 7 Apr 2023 19:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbjDGXSZ (ORCPT ); Fri, 7 Apr 2023 19:18:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 517EA7281; Fri, 7 Apr 2023 16:18:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CAA5B65549; Fri, 7 Apr 2023 23:18:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2081C4339B; Fri, 7 Apr 2023 23:18:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680909503; bh=qoSDQlNAO9HlyDhpcAu/76kmVbZ/kZk22io2phDTpCs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=kQ4oQ2xPrBZMBLe0xsM5NJivyOpeeKs8qhAZO/z1eurygENADg9v6LcYSY6IGk9iE pK0rn34xe2e0p8HHaQ5dTpAC0F0QqMkOk89c62um+nU9bxM6VSi33IG+yGNej9SI+6 tlN5snen6qsg14M0SQKdeF7q8orkSSyyQyYlwjCdiTi40eBhPAJf3jy6eDGvor6He3 MITyrcHp97TeaQaL42tnHjSh2MpLSSqzTqTyQCTYQi25iNcofUZVgJagUq9ShBQwe9 m80o5rYQDbC+yygs1rdaOO3WeguRs4LnEuFya2D07wi916bCQ9IgpXdTwfeKUsGI8b SZHkaKlSRVkyQ== Date: Fri, 7 Apr 2023 18:18:21 -0500 From: Bjorn Helgaas To: LeoLiu-oc Cc: rafael@kernel.org, lenb@kernel.org, james.morse@arm.com, tony.luck@intel.com, bp@alien8.de, robert.moore@intel.com, ying.huang@intel.com, rdunlap@infradead.org, bhelgaas@google.com, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, devel@acpica.org, CobeChen@zhaoxin.com, TonyWWang@zhaoxin.com, ErosZhang@zhaoxin.com, Sathyanarayanan Kuppuswamy , "Li, Ming" Subject: Re: [PATCH v2 0/5] Parse the PCIe AER and set to relevant registers Message-ID: <20230407231821.GA3831711@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221115031115.1666464-1-LeoLiu-oc@zhaoxin.com> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS 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 [+cc Sathy, Ming, since they commented on the previous version] On Tue, Nov 15, 2022 at 11:11:15AM +0800, LeoLiu-oc wrote: > From: leoliu-oc > > According to the sec 18.3.2.4, 18.3.2.5 and 18.3.2.6 in ACPI r6.5, the > register values form HEST PCI Express AER Structure should be written to > relevant PCIe Device's AER Capabilities. So the purpose of the patch set > is to extract register values from HEST PCI Express AER structures and > program them into AER Capabilities. Refer to the ACPI Spec r6.5 for a more > detailed description. I wasn't involved in this part of the ACPI spec, and I don't understand how this is intended to work. I see that this series extracts AER mask, severity, and control information from the ACPI HEST table and uses it to configure PCIe devices as they are enumerated. What I don't understand is how this relates to ownership of the AER capability as negotiated by the _OSC method. Firmware can configure the AER capability itself, and if it retains control of the AER capability, the OS can't write to it (with the exception of clearing EDR error status), so this wouldn't be necessary. If the OS owns the AER capability, I assume it gets to decide for itself how to configure AER, no matter what the ACPI HEST says. Maybe this is intended for the case where firmware retains AER ownership but the OS uses native hotplug (pciehp), and this is a way for the OS to configure new devices as the firmware expects? But in that case, we still have the problem that the OS can't write to the AER capability to do this configuration. Bjorn