public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Sinan Kaya <okaya@codeaurora.org>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Maik Broemme <mbroemme@libmpq.org>
Subject: Re: [PATCH 3/4] PCI/DPC: Enable DPC in conjuction with AER
Date: Mon, 15 Jan 2018 18:33:15 -0700	[thread overview]
Message-ID: <20180116013315.GC32369@localhost.localdomain> (raw)
In-Reply-To: <0fb4494a-bd74-8ff9-f4d6-04409965cf58@codeaurora.org>

On Mon, Jan 15, 2018 at 09:43:22AM -0500, Sinan Kaya wrote:
> On 12/19/2017 4:06 PM, Keith Busch wrote:
> > @@ -289,6 +290,9 @@ static int dpc_probe(struct pcie_device *dev)
> >  	int status;
> >  	u16 ctl, cap;
> >  
> > +	if (pcie_aer_get_firmware_first(pdev))
> > +		return -ENOTSUPP;
> > +
> 
> There are two ways to support firmware first handling along with DPC.
> 
> The first one is to tie DPC handling to the firmware first enable.
> 
> The second one is to enable DPC ERR_COR signalling so that firmware
> gets notified on each DPC event occurrence.
> 
> While the first one gives more control to the firmware, I think it beats
> the purpose of the DPC. The first approach requires firmware to do some
> "pre-processing" before notifying operating system of a failure.
> 
> The goal of the DPC is to put hardware into safe state when a PCIe error
> happens. The best software recovery following this is to notify endpoint
> drivers of failures and shutdown threads/processes accessing the hardware
> as quick as possible.
> 
> The firmware-first event notification is through ACPI GHES and firmware injects
> an artifical uncorrected AER error to the operating system. Once OS gets
> notified, it tries to recover drivers through AER fatal error recovery mechanism.
> 
> While the semantics of this path is clearly defined in ACPI, it is also known
> to be slow as well. During the time firmware does its business, operating
> system still could be trying to access the endpoint address space.
> 
> My suggestion is to enable ERR_COR signalling so firmware gets a notification
> on each DPC event for logging purposes. 
> 
> OS handles DPC natively and tries to recover hardware without any external
> influence.

I see what you're saying, but if a device has a firmware first policy,
doesn't that mean firmware owns the DPC Control register? The OS shouldn't
be mucking with it in that case, right?

  reply	other threads:[~2018-01-16  1:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 21:06 [PATCH 1/4] PCI/AER: Return approrpiate value when AER is not supported Keith Busch
2017-12-19 21:06 ` [PATCH 2/4] PCI/AER: Provide API for getting AER information Keith Busch
2017-12-19 21:06 ` [PATCH 3/4] PCI/DPC: Enable DPC in conjuction with AER Keith Busch
2018-01-15 14:43   ` Sinan Kaya
2018-01-16  1:33     ` Keith Busch [this message]
2018-01-16  3:04       ` Sinan Kaya
2017-12-19 21:06 ` [PATCH 4/4] PCI/DPC: Print AER status in DPC event handling Keith Busch
2017-12-21  4:43   ` Sinan Kaya
2017-12-21  5:12     ` Keith Busch
2018-01-10 15:52       ` Sinan Kaya
2018-01-16  2:47         ` Keith Busch
2018-01-17  0:56           ` Bjorn Helgaas
2018-01-17  1:34             ` Keith Busch
2018-01-17 13:36             ` Sinan Kaya
2018-01-12 23:03   ` Bjorn Helgaas
2018-01-14  1:35     ` Keith Busch
2018-01-15 14:32       ` Sinan Kaya
2018-01-17  0:36         ` Bjorn Helgaas
2018-01-17  0:14       ` Bjorn Helgaas
2017-12-21  1:04 ` [PATCH 1/4] PCI/AER: Return approrpiate value when AER is not supported Bjorn Helgaas
2017-12-21  3:53   ` Dongdong Liu
2017-12-21 14:59   ` Keith Busch
2018-03-20 23:02 ` Bjorn Helgaas
2018-03-21 22:27   ` Keith Busch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180116013315.GC32369@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=mbroemme@libmpq.org \
    --cc=okaya@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox