mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: LeoLiuoc <LeoLiu-oc@zhaoxin.com>
To: Bjorn Helgaas <helgaas@kernel.org>
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 
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"Li, Ming" <ming4.li@intel.com>
Subject: Re: [PATCH v2 0/5] Parse the PCIe AER and set to relevant registers
Date: Wed, 12 Apr 2023 17:11:28 +0800	[thread overview]
Message-ID: <433ad19a-8286-ff58-9fd8-d7dd13547032@zhaoxin.com> (raw)
In-Reply-To: <20230407231821.GA3831711@bhelgaas>



在 2023/4/8 7:18, Bjorn Helgaas 写道:
> [+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 <leoliu-oc@zhaoxin.com>
>>
>> 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.

There is no relationship between the ownership of the AER related 
register and the ownership of the AER capability in the OS or Firmware. 
The processing here is to initialize the AER related register, not the 
AER event. If Firmware is configured with AER register, it will not be 
able to handle the runtime hot reset and link retrain cases in addition 
to the hotplug case you mentioned below.

> 
> 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.
> 

What information does the OS use to decide how to configure AER? The 
ACPI Spec has the following description: PCI Express (PCIe) root ports 
may implement PCIe Advanced Error Reporting (AER) support. This 
table(HEST) contains  information platform firmware supplies to OSPM for 
configuring AER support on a given root port. We understand that HEST 
stands for user to express expectations.

In the current implementation, the OS already configures a PCIE device 
based on _HPP/_HPX method when configuring a PCI device inserted into a 
hot-plug slot or initial configuration of a PCI device at system boot. 
HEST is just another way to express the desired configuration of the user.

Yours sincerely,
Leoliu-oc

> 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


  reply	other threads:[~2023-04-12  9:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15  3:11 LeoLiu-oc
2023-04-07 23:18 ` Bjorn Helgaas
2023-04-12  9:11   ` LeoLiuoc [this message]
2023-04-12 16:32     ` Bjorn Helgaas
2023-04-18  7:58       ` LeoLiuoc
2023-04-12 16:40     ` Sathyanarayanan Kuppuswamy
2023-04-18  8:13       ` LeoLiuoc

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=433ad19a-8286-ff58-9fd8-d7dd13547032@zhaoxin.com \
    --to=leoliu-oc@zhaoxin.com \
    --cc=CobeChen@zhaoxin.com \
    --cc=ErosZhang@zhaoxin.com \
    --cc=TonyWWang@zhaoxin.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=devel@acpica.org \
    --cc=helgaas@kernel.org \
    --cc=james.morse@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ming4.li@intel.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robert.moore@intel.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tony.luck@intel.com \
    --cc=ying.huang@intel.com \
    /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

all inboxes | Powered by JetHome®