Re: [PATCH 8/8] ACPI: APEI: EINJ: Update the documentation for EINJv2 support
From: Tony Luck
Date: Wed Oct 23 2024 - 13:21:10 EST
On Tue, Oct 22, 2024 at 03:44:47PM -0700, Tony Luck wrote:
> On Tue, Oct 22, 2024 at 02:34:29PM -0700, Zaid Alali wrote:
> > + # cd /sys/kernel/debug/apei/einj
> > + # cat available_error_type # See which errors can be injected
> > + 0x00000002 Processor Uncorrectable non-fatal
> > + 0x00000008 Memory Correctable
> > + 0x00000010 Memory Uncorrectable non-fatal
> > + 0x00000001 EINJV2 Processor Error
> > + 0x00000002 EINJV2 Memory Error
>
> This seems confusing to me. Is 0x00000002 the code for a V1 processor
> uncorrectable, or a V2 memory error? It seems that the "error_type" file
> is interpreted differently depending on what is written to the "flags"
> file.
Maybe the confusion would be removed if the "error_type"
file is changed from using a hex number to using a string
which the einj driver parses.
Hex values are parsed as before as legacy EINJ types. To specify
a V2 EINJ type the user does:
# echo V2_0x2 > error_type
and EINJ driver then knows to treat the code as a V2 type (instead
of using a bit written to the flags file).
For consistency the available_error_type would show the V2_ prefix
# cat available_error_type # See which errors can be injected
0x00000002 Processor Uncorrectable non-fatal
0x00000008 Memory Correctable
0x00000010 Memory Uncorrectable non-fatal
V2_0x00000001 EINJV2 Processor Error
V2_0x00000002 EINJV2 Memory Error
-Tony