All of lore.kernel.org
 help / color / mirror / Atom feed
From: Terry Bowman <Terry.Bowman@amd.com>
To: Dan Williams <dan.j.williams@intel.com>,
	alison.schofield@intel.com, vishal.l.verma@intel.com,
	ira.weiny@intel.com, bwidawsk@kernel.org, dave.jiang@intel.com,
	Jonathan.Cameron@huawei.com, linux-cxl@vger.kernel.org
Cc: rrichter@amd.com, linux-kernel@vger.kernel.org, bhelgaas@google.com
Subject: Re: [PATCH v3 4/6] cxl/pci: Add RCH downstream port error logging
Date: Mon, 24 Apr 2023 13:39:07 -0500	[thread overview]
Message-ID: <e876857b-ab34-5b43-8355-649a7d15e2c6@amd.com> (raw)
In-Reply-To: <643ddf0869622_1b662946@dwillia2-xfh.jf.intel.com.notmuch>

Hi Dan,

I added comments inline below.

On 4/17/23 19:06, Dan Williams wrote:
> Terry Bowman wrote:
>> RCH downstream port error logging is missing in the current CXL driver. The
>> missing AER and RAS error logging is needed for communicating driver error
>> details to userspace. Update the driver to include PCIe AER and CXL RAS
>> error logging.
>>
>> Add RCH downstream port error handling into the existing RCiEP handler.
>> The downstream port error handler is added to the RCiEP error handler
>> because the downstream port is implemented in a RCRB, is not PCI
>> enumerable, and as a result is not directly accessible to the PCI AER
>> root port driver. The AER root port driver calls the RCiEP handler for
>> handling RCD errors and RCH downstream port protocol errors.
>>
>> Update mem.c to include RAS and AER setup. This includes AER and RAS
>> capability discovery and mapping for later use in the error handler.
>>
>> Disable RCH downstream port's root port cmd interrupts.[1]
>>
>> Update existing RCiEP correctable and uncorrectable handlers to also call
>> the RCH handler. The RCH handler will read the RCH AER registers, check for
>> error severity, and if an error exists will log using an existing kernel
>> AER trace routine. The RCH handler will also log downstream port RAS errors
>> if they exist.
> 
> I think this patch wants a lead in refactoring to move the existing
> probe of the CXL RAS capability into the cxl_port driver so that the RCH
> path and the VH path can be unified for register mapping and error
> handling invocation. I do not see a compelling rationale to have 2
> separate ways to map the RAS capability. The timing of when
> cxl_setup_ras() is called looks problematic relative to when the first
> error handler callback might happen.
> 

With respect to timing, I see this works for probing AER and RAS. Will it 
work for caching the mapped AER and RAS addresses? I ask because the mapped 
AER and RAS addresses are stored in cxlds and cxlds is created in cxl_pci 
and isn't necessarily available during RCH dport discovery. RCH dport is 
discovered within cxl_acpi context (beginning from cxl_acpi_probe()). Also, 
port.c code shows cxlds is not typically used. 

If you like I can change RCH RAS mapping to use cxl_map_component_regs()? This 
was in cxl_rch_map_ras() to handle the RCH odd case for AER and RAS mapping. 
The RAS can be moved out but RCH AER would still need to be mapped presumably still
in cxl_rch_map_ras().

> For example what happens when an error fires after cxl_pci has
> registered its error handlers, but before the component registers have
> been mapped out of the RCRB?
>

The RCiEP ISR would execute but the RCH AER and RAS would not be logged because 
neither are mapped and are instead NULL. The AER and RAS register status would stay 
resident and be logged in the next ISR entry. 
 
> This implies the need for a callback for cxl_pci to notify the cxl_port
> driver of CXL errors to handle relative to a PCI AER event.

Along similar lines, could the RCH AER and RAS status be checked immediately after 
mapping and logged if status is present?

Regards,
Terry

  reply	other threads:[~2023-04-24 18:39 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 18:02 [PATCH v3 0/6] cxl/pci: Add support for RCH RAS error handling Terry Bowman
2023-04-11 18:02 ` [PATCH v3 1/6] cxl/pci: Add RCH downstream port AER and RAS register discovery Terry Bowman
2023-04-13 15:30   ` Jonathan Cameron
2023-04-13 19:13     ` Terry Bowman
2023-04-14 11:47       ` Jonathan Cameron
2023-04-14 11:51       ` Robert Richter
2023-04-17 23:00   ` Dan Williams
2023-04-18 15:59     ` Terry Bowman
2023-04-27 13:52     ` Robert Richter
2023-04-11 18:02 ` [PATCH v3 2/6] efi/cper: Export cper_mem_err_unpack() for use by modules Terry Bowman
2023-04-12 11:04   ` Ard Biesheuvel
2023-04-13 16:08   ` Jonathan Cameron
2023-04-13 19:40     ` Terry Bowman
2023-04-14 11:48       ` Jonathan Cameron
2023-04-14 12:44         ` Robert Richter
     [not found]         ` <aba5d2ee-f451-145c-81c2-72595129483b@amd.com>
2023-04-14 15:17           ` Terry Bowman
2023-04-17 23:08   ` Dan Williams
2023-04-11 18:02 ` [PATCH v3 3/6] PCI/AER: Export cper_print_aer() " Terry Bowman
2023-04-13 16:13   ` Jonathan Cameron
2023-04-17 23:11   ` Dan Williams
2023-04-11 18:03 ` [PATCH v3 4/6] cxl/pci: Add RCH downstream port error logging Terry Bowman
2023-04-12  1:32   ` kernel test robot
2023-04-12  3:04   ` kernel test robot
2023-04-13 16:50   ` Jonathan Cameron
2023-04-14 16:36     ` Terry Bowman
2023-04-17 16:56       ` Jonathan Cameron
2023-04-18  0:06   ` Dan Williams
2023-04-24 18:39     ` Terry Bowman [this message]
2023-04-11 18:03 ` [PATCH v3 5/6] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler Terry Bowman
2023-04-11 18:03   ` Terry Bowman
2023-04-12 22:02   ` Bjorn Helgaas
2023-04-12 22:02     ` Bjorn Helgaas
2023-04-13 11:40     ` Robert Richter
2023-04-13 11:40       ` Robert Richter
2023-04-14 21:32       ` Bjorn Helgaas
2023-04-14 21:32         ` Bjorn Helgaas
2023-04-17 22:00         ` Robert Richter
2023-04-17 22:00           ` Robert Richter
2023-04-19 14:17           ` Robert Richter
2023-04-19 14:17             ` Robert Richter
2023-04-14 12:19   ` Jonathan Cameron
2023-04-14 12:19     ` Jonathan Cameron
2023-04-14 14:35     ` Robert Richter
2023-04-14 14:35       ` Robert Richter
2023-04-17 16:54       ` Jonathan Cameron
2023-04-17 16:54         ` Jonathan Cameron
2023-04-17 20:36         ` Robert Richter
2023-04-17 20:36           ` Robert Richter
2023-04-18  1:01   ` Dan Williams
2023-04-18  1:01     ` Dan Williams
2023-04-19 13:30     ` Robert Richter
2023-04-19 13:30       ` Robert Richter
2023-04-11 18:03 ` [PATCH v3 6/6] PCI/AER: Unmask RCEC internal errors to enable RCH downstream port error handling Terry Bowman
2023-04-11 18:03   ` Terry Bowman
2023-04-12 21:29   ` Bjorn Helgaas
2023-04-12 21:29     ` Bjorn Helgaas
2023-04-13 13:38     ` Robert Richter
2023-04-13 13:38       ` Robert Richter
2023-04-13 17:05       ` Jonathan Cameron
2023-04-13 17:05         ` Jonathan Cameron
2023-04-14 11:58         ` Robert Richter
2023-04-14 11:58           ` Robert Richter
2023-04-14 21:49       ` Bjorn Helgaas
2023-04-14 21:49         ` Bjorn Helgaas
2023-04-13 17:01     ` Jonathan Cameron
2023-04-13 17:01       ` Jonathan Cameron
2023-04-13 22:52       ` Ira Weiny
2023-04-13 22:52         ` Ira Weiny
2023-04-14 11:21         ` Robert Richter
2023-04-14 11:21           ` Robert Richter
2023-04-14 11:55           ` Jonathan Cameron
2023-04-14 11:55             ` Jonathan Cameron
2023-04-14 14:47             ` Robert Richter
2023-04-14 14:47               ` Robert Richter
2023-04-18  2:37   ` Dan Williams
2023-04-18  2:37     ` Dan Williams

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=e876857b-ab34-5b43-8355-649a7d15e2c6@amd.com \
    --to=terry.bowman@amd.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=bhelgaas@google.com \
    --cc=bwidawsk@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrichter@amd.com \
    --cc=vishal.l.verma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.