Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3661542imb; Tue, 5 Mar 2019 15:45:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzMmZAJyQj/w9yVOmyN0abfbdKCRdhV5RVRxFRHMMql0LEVBiY94+y6gl9a4HzqHW+FyFHm X-Received: by 2002:a17:902:2702:: with SMTP id c2mr3796537plb.239.1551829500688; Tue, 05 Mar 2019 15:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551829500; cv=none; d=google.com; s=arc-20160816; b=bP9y5qNCIie0Elo0OQDiXQVJkABgXRHKzfjzV6r2bAMWVUc6DByMKiXmxYMeFrzb9C DUtduH1x7sEL5Z2o1tytb9qGNqAcfEqqGZe/yszTH5yBWWIzS4Xh7L+BKEYOGOefpDyR KPjRwN+mqQC6knl4zdpetGNcYY3RsWKtJfAByzB7cGWezbbs623q4/OP29TnLOZrH8y7 xgNFq6otkZcGMw8rrijjKIE7+XtMsM1M/B7IEbxlftMpeubAaoPSlhVXrw3733/X4Dko GwSCURamdTxG1IfL1jwzqKgV0pojWmEZYKHnZ5tMuISWuKwGJYa6XWJZcneSWh8qXdq8 zPgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SLfXuteM/K0DXYKQxC10LTpKnQWkxSzS1Dxoko9uBrQ=; b=QzjA2s2XqpBlOJXd9itbwYQbQzhqV4/ftJUyFP6PfxjTn6AdJsxbWEM7GZrxLXaARR VETnnuQtQ8sXz0z1Xw3WBfkw4IYIK/LjR9AJwjSSXh4LJh1GHmJmRGWt/zVwpXs669OG F2pTc0RNoXoQI8CRBZ1qrEcOpkTnqmK+QlQLLa/Wyh3n7HBrq1aqwIqNI9FlwvbAIy+o t6YnscTMGLgPEfCJ/NSP5KU+GUskhx7FQW82HPngneo1MFnlxY8EWv5S6HSkBs5h4UE6 Qj1Lo2C/NmbtwIgqe309n6GD0AwioamZmeQ6nKYWu1ZpRZz7DVdpIWOQnWbKnEeBEEpi qIQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fxU5oyTE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b23si139653pfd.182.2019.03.05.15.44.45; Tue, 05 Mar 2019 15:45:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fxU5oyTE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727253AbfCEXQz (ORCPT + 99 others); Tue, 5 Mar 2019 18:16:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:56544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726872AbfCEXQz (ORCPT ); Tue, 5 Mar 2019 18:16:55 -0500 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9B4E020652; Tue, 5 Mar 2019 23:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551827814; bh=zwqZZsThZQ6nowJFulARgnU52hfdsiy0qYX3oid09v4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fxU5oyTEoYzO/8/bDOiE3EDCuPG1CB3YOWzpuv75fOQtoIG+6Wr16ZiaOuqyz/UYw v+HAMLS4Xc3RpgdMc2ZNPDKAeAcpVcC6ag4lYV4A7laDsMS/9kUvtqK6bXr9Ur29k7 oxuUoO0XzuFFr0L3IlxHxVpfk6CQW/qfxpxJti04= Date: Tue, 5 Mar 2019 17:16:51 -0600 From: Bjorn Helgaas To: Alexandru Gagniuc Cc: helgaas@google.com, austin_bolen@dell.com, alex_gagniuc@dellteam.com, keith.busch@intel.com, Shyam_Iyer@Dell.com, lukas@wunner.de, "Rafael J. Wysocki" , Len Brown , Russell Currey , Sam Bobroff , Oliver O'Halloran , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER Message-ID: <20190305231650.GC215617@google.com> References: <20181115231605.24352-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181115231605.24352-1-mr.nuke.me@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 15, 2018 at 05:16:01PM -0600, Alexandru Gagniuc wrote: > Thanks to Keith for pointing out that it doesn't make sense to disable > AER services when only one device has a FIRMWARE_FIRST HEST. > > AER ownership is an interesting issue brought in by FFS (firmware-first) > model. In a nutshell if FFS handles AER, then OS should not touch any > of the AER bits. FW might set things up so that it receives AER > notifications via SMI. It's theoretically possible to receive SCIs, > but the exact mechanism is platform-dependent. OS touching AER bits > when firmware owns them may interfere with these notifications. > > The ACPI mechanism for negotiating control of AER is _OSC, and is > described in detail in ACPI 6.2 Ch. 6.2.11.3. _OSC is negotiated at > the root bus level. Any root port, switch, or endpoint under the bus > would have its AER ownership negotiated in one _OSC call. > > Then there is HEST, which is part of ACPI Platform Error Interfaces > (APEI). HEST tables describe the errors that FW may report to the OS. > A types 6,7 and 7 HEST tables describe AER errors from PCIe devices. > As part of this description, we're told if the error source is FFS. > > Information in HEST seems to be redundant, as each error reported by > FW will have a CPER table that describes it in detail. > > Because HEST describes an error source as firmware-first or not, we've > taken this to mean ownership of AER. Because AER ownership and error > reporting are coupled, _OSC and HEST usually agree on the matter of > ownership. However, that doesn't seem to be required by ACPI. > > I've asked around a few people at Dell and they unanimously agree that > _OSC is the correct way to determine ownership of AER. In linux, we > use the result of _OSC to enable AER services, but we use HEST to > determine AER ownership. That's inconsistent. This series drops the > use of HEST in favor of _OSC. > > [1] https://lkml.org/lkml/2018/11/15/62 > > Alexandru Gagniuc (2): > PCI/AER: Do not use APEI/HEST to disable AER services globally > PCI/AER: Determine AER ownership based on _OSC instead of HEST > > drivers/acpi/pci_root.c | 9 +---- > drivers/pci/pcie/aer.c | 82 ++-------------------------------------- > include/linux/pci-acpi.h | 6 --- > 3 files changed, 5 insertions(+), 92 deletions(-) I'm pretty sure we do need to do something here, but there was quite a lot of discussion that didn't seem to really get resolved, so I'm dropping these for now. Please repost them with any relevant updates and we'll see if we can get a consensus that we're going the right direction. Bjorn