Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1915590imd; Fri, 2 Nov 2018 02:53:42 -0700 (PDT) X-Google-Smtp-Source: AJdET5fb5+NGMcVtVk+peynNuPz9wOYhVCSo77X7n7ONyVeCRYJXF3VWJC3RmGHVaNVsHo8fdelp X-Received: by 2002:a63:cb4a:: with SMTP id m10mr10015679pgi.105.1541152422117; Fri, 02 Nov 2018 02:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541152422; cv=none; d=google.com; s=arc-20160816; b=fGYGoeaP5tvF9A3AUqQiUXJS8PBie8pPT/l8LM4EfgcqiQaDnOewEIJJia+JR0RYE/ Dm6jObdDPIMKbqtiIr1cpXBxb0G7n8CGomtGsGje7H1AY27ncnm8Ak2du+87Y0FWMt1g FwMX5OTQeAesV2aaCn1J1Yb2sVeDWxqsHxG+x8lu8fy94KfcLVuktmdlRL6ovgNaaM/b 5BkPvpAOP3Tps0i+rRBGAGATvG8gcmJLyQ/4sFlQy5x5DzfxeSCzq6fXrtj2mJgEQ4/Z luxI/icL6DCSJJ62hjvGiCmq0qdGmC1p21WuqQPxn7qw3y87/feO9SvG7utJ7EMgr5AQ Okyg== 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; bh=VafG40m5JHbwyeBCW1PUK8pEnpGS7+okswB0gFl9hYg=; b=bP2E3BhVY0/nZyco0XO1TtEStgu+EpU4JidPs6LcRrZ8tlCjiyiIwd3+w84s/HIU42 GtdL7RsKjrYFXqLeQ8K3/jRrc9IOBBLvsowpx0irTmiWG00angceF4oxVkbKNzK1v9/x GxcLvDlLLjup9/x63cfJCLz6ZKNi30If64QmKo6Bs1Y0JkAbGtQrAtJ8oZnlmNRA0pwC Feg6bMF4uQAgDWp59THMThpU5WURWlaV61pHFcJDBrm+zZroPmjewQHB0gfLBf43YdXF pkbOMbQ7OX5GEtGljlVlEUD+sVEzw+ueoAaPcWqR8ugVi/kociFqztLLwDMEHEgTPo8U /Jew== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si2403807pls.173.2018.11.02.02.53.27; Fri, 02 Nov 2018 02:53:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726200AbeKBS7l (ORCPT + 99 others); Fri, 2 Nov 2018 14:59:41 -0400 Received: from mail.skyhub.de ([5.9.137.197]:43018 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbeKBS7l (ORCPT ); Fri, 2 Nov 2018 14:59:41 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id q6_VM_YTgKXV; Fri, 2 Nov 2018 10:53:04 +0100 (CET) Received: from zn.tnic (p200300EC2BCD3B00329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2bcd:3b00:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 906E21EC02E6; Fri, 2 Nov 2018 10:53:04 +0100 (CET) Date: Fri, 2 Nov 2018 10:53:00 +0100 From: Borislav Petkov To: Bjorn Helgaas Cc: Jon Derrick , linux-pci@vger.kernel.org, Lorenzo Pieralisi , Keith Busch , "Rafael J. Wysocki" , Len Brown , Tony Luck , Tyler Baicar , Christoph Hellwig , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] PCI/AER: Option to leave System Error Interrupts as-is Message-ID: <20181102095300.GB14602@zn.tnic> References: <1540585146-31876-1-git-send-email-jonathan.derrick@intel.com> <20181029210651.GB13681@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181029210651.GB13681@bhelgaas-glaptop.roam.corp.google.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 Mon, Oct 29, 2018 at 04:06:51PM -0500, Bjorn Helgaas wrote: > [+cc Rafael, Len, Tony, Borislav, Tyler, Christoph, linux-acpi, LKML] > > On Fri, Oct 26, 2018 at 02:19:04PM -0600, Jon Derrick wrote: > > Add a bit in pci_host_bridge to indicate to leave the System Error > > Interrupts as configured by the pre-boot environment. Propagate this to > > the AER driver which disables System Error Interrupts. This commit message should not explain what the patch does - that's obvious - but why it is doing it. > > Signed-off-by: Jon Derrick > > --- > > drivers/pci/pcie/aer.c | 7 +++++-- > > include/linux/pci.h | 3 +++ > > 2 files changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > > index 83180ed..6a4af63 100644 > > --- a/drivers/pci/pcie/aer.c > > +++ b/drivers/pci/pcie/aer.c > > @@ -1360,6 +1360,7 @@ static void set_downstream_devices_error_reporting(struct pci_dev *dev, > > static void aer_enable_rootport(struct aer_rpc *rpc) > > { > > struct pci_dev *pdev = rpc->rpd; > > + struct pci_host_bridge *host; > > int aer_pos; > > u16 reg16; > > u32 reg32; > > @@ -1369,8 +1370,10 @@ static void aer_enable_rootport(struct aer_rpc *rpc) > > pcie_capability_write_word(pdev, PCI_EXP_DEVSTA, reg16); > > > > /* Disable system error generation in response to error messages */ > > - pcie_capability_clear_word(pdev, PCI_EXP_RTCTL, > > - SYSTEM_ERROR_INTR_ON_MESG_MASK); > > + host = pci_find_host_bridge(pdev->bus); > > + if (!host->no_disable_sys_err) Double negation if (! .. ->no.. could simply be if (host->disable_sys_err... > > + pcie_capability_clear_word(pdev, PCI_EXP_RTCTL, > > + SYSTEM_ERROR_INTR_ON_MESG_MASK); > > If I squint hard enough this sort of makes sense, but it also makes me > confused about the normal APEI firmware-first model works. > > In the NON-firmare-first case, firmware isn't involved in handling AER > errors. The Linux AER driver fields an interrupt from a Root Port, > reads AER log registers, etc. > > In the normal APEI firmware-first case, when the hardware reports an > AER event, I think firmware gets control first, and *it* reads the AER > log registers, packages them up, and generates an interrupt to the OS, > which reads the packaged error state from the firmware via the HEST. > > If I understand this special Intel VMD firmware-first case correctly, > firmware gets control first, reads the AER log registers, and > synthesizes what looks to the OS like a normal AER interrupt. The Why? Why the faking? If firmware needs to get control, why doesn't it then *retain* control and report the error through HEST, like others do? AFAIUC, fw wants to do something underneath. What's wrong with making it a normal firmware-first case? -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.