Re: "invalid agent type: 1" in acpi/ghes, cper: Recognize and cache CXL Protocol errors

From: Koralahalli Channabasappa, Smita
Date: Tue Jul 29 2025 - 11:52:43 EST


On 7/28/2025 10:41 PM, Marc Herbert wrote:
On 2025-07-28 09:25, Koralahalli Channabasappa, Smita wrote:

On 7/22/2025 12:24 PM, Marc Herbert wrote:

The code below triggers the error "invalid agent type: 1" in Intel
validation (internal issue 15018133056)

It's not clear to anyone we asked why you did not include RCH_DP in
the `switch (prot_err->agent_type)` in cxl_cper_post_prot_err() below.

I can see how RCH_DP is special in cxl_cper_PRINT_prot_err() and I can
even understand (despite my near-zero CPER knowledge) some of the
special cases there. But in cxl_cper_post_prot_err() here, it's not
clear why RCH_DP would be rejected. Could this be an oversight? If not,
a comment with a short explanation would not hurt.


You're right. RCH_DP was excluded because it doesn’t report a valid
SBDF in the CPER record. Instead, it provides only the RCRB base
address.

I haven't thoroughly investigated whether SBDF can be reliably derived
from the RCRB base. There might be a platform-specific mechanism for
that, but at the time, it seemed non-trivial to implement. Introducing
additional infrastructure solely to support RCH_DP felt like it was
adding more complexity.

I agree that a brief comment explaining this rationale would help. I'm
okay if you plan to include a fixup for this along with the one for
the device serial number.

If I understood you correctly, I think a different error message
would be much better than a comment. Like this?

Yeah looks good to me. Thanks for fixing this!

Thanks
Smita


--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -730,6 +730,9 @@ static void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
memcpy(&wd.ras_cap, cap_start, sizeof(wd.ras_cap));
wd.severity = cper_severity_to_aer(severity);
break;
+ case RCH_DP:
+ pr_err_ratelimited("CXL CPER agent type unsupported: RCH_DP\n");
+ return;
default:
pr_err_ratelimited("CXL CPER invalid agent type: %d\n",
prot_err->agent_type);