* [PATCH] cxl/pci: Change CXL AER support check to use native AER
@ 2023-11-02 15:52 Terry Bowman
2023-11-02 20:19 ` Alison Schofield
2023-11-02 21:09 ` Dan Williams
0 siblings, 2 replies; 6+ messages in thread
From: Terry Bowman @ 2023-11-02 15:52 UTC (permalink / raw)
To: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
dan.j.williams, dave.jiang, Jonathan.Cameron, linux-cxl
Cc: terry.bowman, Smita.KoralahalliChannabasappa, rrichter,
linux-kernel
Native CXL protocol errors are delivered to the OS through AER
reporting. The owner of AER owns CXL Protocol error management with
respect to _OSC negotiation.[1] CXL device errors are handled by a
separate interrupt with native control gated by _OSC control field
'CXL Memory Error Reporting Control'.
The CXL driver incorrectly checks for 'CXL Memory Error Reporting
Control' before accessing AER registers and caching RCH downport
AER registers. Replace the current check in these 2 cases with
native AER checks.
[1] CXL 3.0 - 9.17.2 CXL _OSC, Table-9-26, Interpretation of CXL
_OSC Support Fields, p.641
Fixes: 5d2ffbe4b81a ("cxl/port: Store the downstream port's Component Register mappings in struct cxl_dport")
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
---
drivers/cxl/core/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index 01c441f2e25e..b29f6d09744b 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -812,7 +812,7 @@ static void cxl_disable_rch_root_ints(struct cxl_dport *dport)
* the root cmd register's interrupts is required. But, PCI spec
* shows these are disabled by default on reset.
*/
- if (bridge->native_cxl_error) {
+ if (bridge->native_aer) {
aer_cmd_mask = (PCI_ERR_ROOT_CMD_COR_EN |
PCI_ERR_ROOT_CMD_NONFATAL_EN |
PCI_ERR_ROOT_CMD_FATAL_EN);
@@ -828,7 +828,7 @@ void cxl_setup_parent_dport(struct device *host, struct cxl_dport *dport)
struct pci_host_bridge *host_bridge;
host_bridge = to_pci_host_bridge(dport_dev);
- if (host_bridge->native_cxl_error)
+ if (host_bridge->native_aer)
dport->rcrb.aer_cap = cxl_rcrb_to_aer(dport_dev, dport->rcrb.base);
dport->reg_map.host = host;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] cxl/pci: Change CXL AER support check to use native AER
2023-11-02 15:52 [PATCH] cxl/pci: Change CXL AER support check to use native AER Terry Bowman
@ 2023-11-02 20:19 ` Alison Schofield
2023-11-02 21:13 ` Dan Williams
2023-11-02 21:09 ` Dan Williams
1 sibling, 1 reply; 6+ messages in thread
From: Alison Schofield @ 2023-11-02 20:19 UTC (permalink / raw)
To: Terry Bowman
Cc: vishal.l.verma, ira.weiny, bwidawsk, dan.j.williams, dave.jiang,
Jonathan.Cameron, linux-cxl, Smita.KoralahalliChannabasappa,
rrichter, linux-kernel
On Thu, Nov 02, 2023 at 10:52:32AM -0500, Terry Bowman wrote:
> Native CXL protocol errors are delivered to the OS through AER
> reporting. The owner of AER owns CXL Protocol error management with
> respect to _OSC negotiation.[1] CXL device errors are handled by a
> separate interrupt with native control gated by _OSC control field
> 'CXL Memory Error Reporting Control'.
>
> The CXL driver incorrectly checks for 'CXL Memory Error Reporting
> Control' before accessing AER registers and caching RCH downport
> AER registers. Replace the current check in these 2 cases with
> native AER checks.
Hi Terry, Does this have a user visible impact?
Alison
>
--snip
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cxl/pci: Change CXL AER support check to use native AER
2023-11-02 20:19 ` Alison Schofield
@ 2023-11-02 21:13 ` Dan Williams
2023-11-02 21:31 ` Dan Williams
0 siblings, 1 reply; 6+ messages in thread
From: Dan Williams @ 2023-11-02 21:13 UTC (permalink / raw)
To: Alison Schofield, Terry Bowman
Cc: vishal.l.verma, ira.weiny, bwidawsk, dan.j.williams, dave.jiang,
Jonathan.Cameron, linux-cxl, Smita.KoralahalliChannabasappa,
rrichter, linux-kernel
Alison Schofield wrote:
> On Thu, Nov 02, 2023 at 10:52:32AM -0500, Terry Bowman wrote:
> > Native CXL protocol errors are delivered to the OS through AER
> > reporting. The owner of AER owns CXL Protocol error management with
> > respect to _OSC negotiation.[1] CXL device errors are handled by a
> > separate interrupt with native control gated by _OSC control field
> > 'CXL Memory Error Reporting Control'.
> >
> > The CXL driver incorrectly checks for 'CXL Memory Error Reporting
> > Control' before accessing AER registers and caching RCH downport
> > AER registers. Replace the current check in these 2 cases with
> > native AER checks.
>
> Hi Terry, Does this have a user visible impact?
Saw this after I applied it. It is good feedback in general.
The reason I did not ask for this clarification was that this is fixing
brand new code and was just using the wrong flag, so I had the context.
A backporter will never need to make a judgement call about this patch.
The end user impact is that CXL protocol errors that could be handled by
AER will not be handled if Linux failed to negotiate memory error
handling. Memory errors are strictly related to memory-error-record
events, not protocol errors.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cxl/pci: Change CXL AER support check to use native AER
2023-11-02 21:13 ` Dan Williams
@ 2023-11-02 21:31 ` Dan Williams
2023-11-02 23:24 ` Terry Bowman
0 siblings, 1 reply; 6+ messages in thread
From: Dan Williams @ 2023-11-02 21:31 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Terry Bowman
Cc: vishal.l.verma, ira.weiny, bwidawsk, dan.j.williams, dave.jiang,
Jonathan.Cameron, linux-cxl, Smita.KoralahalliChannabasappa,
rrichter, linux-kernel
Dan Williams wrote:
> Alison Schofield wrote:
> > On Thu, Nov 02, 2023 at 10:52:32AM -0500, Terry Bowman wrote:
> > > Native CXL protocol errors are delivered to the OS through AER
> > > reporting. The owner of AER owns CXL Protocol error management with
> > > respect to _OSC negotiation.[1] CXL device errors are handled by a
> > > separate interrupt with native control gated by _OSC control field
> > > 'CXL Memory Error Reporting Control'.
> > >
> > > The CXL driver incorrectly checks for 'CXL Memory Error Reporting
> > > Control' before accessing AER registers and caching RCH downport
> > > AER registers. Replace the current check in these 2 cases with
> > > native AER checks.
> >
> > Hi Terry, Does this have a user visible impact?
>
> Saw this after I applied it. It is good feedback in general.
>
> The reason I did not ask for this clarification was that this is fixing
> brand new code and was just using the wrong flag, so I had the context.
> A backporter will never need to make a judgement call about this patch.
>
> The end user impact is that CXL protocol errors that could be handled by
> AER will not be handled if Linux failed to negotiate memory error
> handling. Memory errors are strictly related to memory-error-record
> events, not protocol errors.
However, to that point the "Fixes:" tag looks wrong, it should be:
f05fd10d138d cxl/pci: Add RCH downstream port AER register discovery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cxl/pci: Change CXL AER support check to use native AER
2023-11-02 21:31 ` Dan Williams
@ 2023-11-02 23:24 ` Terry Bowman
0 siblings, 0 replies; 6+ messages in thread
From: Terry Bowman @ 2023-11-02 23:24 UTC (permalink / raw)
To: Dan Williams, Alison Schofield
Cc: vishal.l.verma, ira.weiny, bwidawsk, dave.jiang, Jonathan.Cameron,
linux-cxl, Smita.KoralahalliChannabasappa, rrichter, linux-kernel
Hi Dan and Allison,
On 11/2/23 16:31, Dan Williams wrote:
> Dan Williams wrote:
>> Alison Schofield wrote:
>>> On Thu, Nov 02, 2023 at 10:52:32AM -0500, Terry Bowman wrote:
>>>> Native CXL protocol errors are delivered to the OS through AER
>>>> reporting. The owner of AER owns CXL Protocol error management with
>>>> respect to _OSC negotiation.[1] CXL device errors are handled by a
>>>> separate interrupt with native control gated by _OSC control field
>>>> 'CXL Memory Error Reporting Control'.
>>>>
>>>> The CXL driver incorrectly checks for 'CXL Memory Error Reporting
>>>> Control' before accessing AER registers and caching RCH downport
>>>> AER registers. Replace the current check in these 2 cases with
>>>> native AER checks.
>>>
>>> Hi Terry, Does this have a user visible impact?
>>
>> Saw this after I applied it. It is good feedback in general.
>>
>> The reason I did not ask for this clarification was that this is fixing
>> brand new code and was just using the wrong flag, so I had the context.
>> A backporter will never need to make a judgement call about this patch.
>>
>> The end user impact is that CXL protocol errors that could be handled by
>> AER will not be handled if Linux failed to negotiate memory error
>> handling. Memory errors are strictly related to memory-error-record
>> events, not protocol errors.
>
Right, end user impact is RCH error handling will require using native
memory error/event _OSC control inorder for protocol errors to be logged.
> However, to that point the "Fixes:" tag looks wrong, it should be:
>
> f05fd10d138d cxl/pci: Add RCH downstream port AER register discovery
Correct, it is f05fd10d138d.
Regards,
Terry
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] cxl/pci: Change CXL AER support check to use native AER
2023-11-02 15:52 [PATCH] cxl/pci: Change CXL AER support check to use native AER Terry Bowman
2023-11-02 20:19 ` Alison Schofield
@ 2023-11-02 21:09 ` Dan Williams
1 sibling, 0 replies; 6+ messages in thread
From: Dan Williams @ 2023-11-02 21:09 UTC (permalink / raw)
To: Terry Bowman, alison.schofield, vishal.l.verma, ira.weiny,
bwidawsk, dan.j.williams, dave.jiang, Jonathan.Cameron, linux-cxl
Cc: terry.bowman, Smita.KoralahalliChannabasappa, rrichter,
linux-kernel
Terry Bowman wrote:
> Native CXL protocol errors are delivered to the OS through AER
> reporting. The owner of AER owns CXL Protocol error management with
> respect to _OSC negotiation.[1] CXL device errors are handled by a
> separate interrupt with native control gated by _OSC control field
> 'CXL Memory Error Reporting Control'.
>
> The CXL driver incorrectly checks for 'CXL Memory Error Reporting
> Control' before accessing AER registers and caching RCH downport
> AER registers. Replace the current check in these 2 cases with
> native AER checks.
>
> [1] CXL 3.0 - 9.17.2 CXL _OSC, Table-9-26, Interpretation of CXL
> _OSC Support Fields, p.641
Makes sense, applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-02 23:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 15:52 [PATCH] cxl/pci: Change CXL AER support check to use native AER Terry Bowman
2023-11-02 20:19 ` Alison Schofield
2023-11-02 21:13 ` Dan Williams
2023-11-02 21:31 ` Dan Williams
2023-11-02 23:24 ` Terry Bowman
2023-11-02 21:09 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox