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

Jonathan Cameron
2025-07-25T11:04:10Z

On Thu, 24 Jul 2025 16:49:00 +0200
"Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com> wrote:

> Hi Marc, Smita,
>
> On Wednesday, July 23, 2025 9:13:34 AM Central European Summer Time Marc Herbert wrote:
> >
> > On 2025-07-22 12:24, Marc Herbert wrote:
> > > Hi Smita,
> > >
> > > The code below triggers the error "invalid agent type: 1" in Intel
> > > validation (internal issue 15018133056)
> >
> > The same test case also triggers the other, warning message "CXL CPER no
> > device serial number".
> >
> > I heard that "device" serial numbers are only for... devices and that
> > even then it's not always mandatory. So maybe that other message should
> > be downgraded from warning to the "info" level?
> >
> > Marc
> >
>
> [skip]
>
> > >> +
> > >> + if (prot_err->err_len != sizeof(struct cxl_ras_capability_regs)) {
> > >> + pr_err_ratelimited("CXL CPER invalid RAS Cap size (%u)\n",
> > >> + prot_err->err_len);
> > >> + return;
> > >> + }
> > >> +
> > >> + if (!(prot_err->valid_bits & PROT_ERR_VALID_SERIAL_NUMBER))
> > >> + pr_warn(FW_WARN "CXL CPER no device serial number\n");
> > >> +
>
> Maybe this test should be written on the line of the following snippet taken
> out from "ACPI: extlog: Trace CPER CXL Protocol Error Section".[1]
>
> +
> + if ((prot_err->agent_type == RCD || prot_err->agent_type == DEVICE ||
> + prot_err->agent_type == LD || prot_err->agent_type == FMLD) &&
> + !(prot_err->valid_bits & PROT_ERR_VALID_SERIAL_NUMBER))
> + pr_warn_ratelimited(FW_WARN
> + "CXL CPER no device serial number\n");

They are mandatory for CXL type 3 class code devices (and so the LDs here I think)
Device and RCD might not be type 3 class code so it may be optional?

> +
>
> Thanks,
>
> Fabio
>
> [1] https://lore.kernel.org/linux-cxl/20250623145453.1046660-4-fabio.m.de.francesco@linux.intel.com/
>
>
>
>