From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Zaid Alali <zaidal@os.amperecomputing.com>,
rafael@kernel.org, lenb@kernel.org, james.morse@arm.com,
robert.moore@intel.com, Jonathan.Cameron@huawei.com,
ira.weiny@intel.com, Benjamin.Cheatham@amd.com,
dan.j.williams@intel.com, arnd@arndb.de, Avadhut.Naik@amd.com,
john.allen@amd.com, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev
Subject: Re: [PATCH v7 9/9] ACPI: APEI: EINJ: Update the documentation for EINJv2 support
Date: Sat, 31 May 2025 15:24:14 -0700 [thread overview]
Message-ID: <aDuBjopy_nE9A-ph@agluck-desk3> (raw)
In-Reply-To: <20250531092050.GBaDrJ8iw7cNcpOKeA@fat_crate.local>
On Sat, May 31, 2025 at 11:20:50AM +0200, Borislav Petkov wrote:
> On Fri, May 30, 2025 at 01:52:39PM -0700, Luck, Tony wrote:
> > Use case to inject to one device would be:
> >
> > # echo 1 > nr_components
>
> What does that do?
EINJ V2 allows the user to perform multiple injections together.
The component_idN/component_syndromeN pairs of files direct the
"where" and the "what" of each injection.
But the kernel needs to know how many of these pairs to use
for an injection (to fill in a field in the structure passed
to the BIOS).
With EINJ V2 the user might want to inject to 2 locations with
one injection, and then just to 1 location on the next.
Zaid Alali's version took the approach of zeroing the input
after each injection so the user had to start from scratch
for each injection.
I wasn't fond of that because the existing Linux EINJ interface
saves all the paramters allowing the user to repeat the same
injection by just runniing "echo 1 > error_inject: over and over
(e.g. to force a soft offline by injecting multiple corrected
errors to the same address).
User interface options:
1) User can zero out the component_idN/component_syndromeN pairs
that they don't need and have the kernel count how many injections
are requested by looping to find the zero terminator.
2) Kernel could zero all pairs after an injection to make the user
explicitly set the list of targets each time.
3) User provides the count vis the nr_components file (perhaps
needs a better name?)
4) Something else?
>
> The interface probably needs a little refinement, but...
>
> > # echo 4 > component_id0
> > # echo A5A5A5A5 > component_syndrome0
> > ... set other files and finish with usual
> > # echo 1 > error_inject
> >
> > There isn't a fancy "debugfs_create_x128_le()" helper to manage these
> > 128-bit little endian numbers. So I've coded with the basic building
> > blocks (though using copy_from_user() and copy_to_user() feels like
> > back in the stone age). If there some helpers that I missed I'd be
> > happy to see that part simplified.
> >
> > Patch is on top of the existing v7 set. Obviously it needs to be folded
> > back into the earlier patches to make a clean history that doesn't add
> > functions and then replace them with different code.
>
> ... yes, definitely much better.
>
> Thanks!
You are welcome.
>
> --
> Regards/Gruss,
> Boris.
-Tony
next prev parent reply other threads:[~2025-05-31 22:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 21:38 [PATCH v7 0/9] Enable EINJv2 Support Zaid Alali
2025-05-06 21:38 ` [PATCH v7 1/9] ACPICA: Update values to hex to follow ACPI specs Zaid Alali
2025-05-07 11:28 ` Rafael J. Wysocki
2025-05-06 21:38 ` [PATCH v7 2/9] ACPICA: Add EINJv2 get error type action Zaid Alali
2025-05-07 11:28 ` Rafael J. Wysocki
2025-05-06 21:38 ` [PATCH v7 3/9] ACPI: APEI: EINJ: Fix kernel test sparse warnings Zaid Alali
2025-05-07 11:31 ` Rafael J. Wysocki
2025-05-06 21:38 ` [PATCH v7 4/9] ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type Zaid Alali
2025-05-07 11:34 ` Rafael J. Wysocki
2025-05-08 17:57 ` Zaid Alali
2025-05-09 19:25 ` Rafael J. Wysocki
2025-05-06 21:38 ` [PATCH v7 5/9] ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities Zaid Alali
2025-05-07 11:38 ` Rafael J. Wysocki
2025-05-28 20:55 ` Luck, Tony
2025-05-06 21:38 ` [PATCH v7 6/9] ACPI: APEI: EINJ: Add einjv2 extension struct Zaid Alali
2025-05-28 18:38 ` Luck, Tony
2025-05-29 15:28 ` Luck, Tony
2025-05-06 21:38 ` [PATCH v7 7/9] ACPI: APEI: EINJ: Add debugfs files for EINJv2 support Zaid Alali
2025-05-29 23:36 ` Luck, Tony
2025-05-06 21:38 ` [PATCH v7 8/9] ACPI: APEI: EINJ: Enable EINJv2 error injections Zaid Alali
2025-05-30 0:21 ` Luck, Tony
2025-05-06 21:38 ` [PATCH v7 9/9] ACPI: APEI: EINJ: Update the documentation for EINJv2 support Zaid Alali
2025-05-29 23:33 ` Luck, Tony
2025-05-30 10:27 ` Borislav Petkov
2025-05-30 20:52 ` Luck, Tony
2025-05-30 23:09 ` Luck, Tony
2025-05-31 9:20 ` Borislav Petkov
2025-05-31 22:24 ` Luck, Tony [this message]
2025-06-01 10:25 ` Borislav Petkov
2025-06-02 17:02 ` Luck, Tony
2025-06-02 23:41 ` Zaid Alali
2025-06-03 8:31 ` Borislav Petkov
2025-06-03 15:42 ` Luck, Tony
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=aDuBjopy_nE9A-ph@agluck-desk3 \
--to=tony.luck@intel.com \
--cc=Avadhut.Naik@amd.com \
--cc=Benjamin.Cheatham@amd.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=acpica-devel@lists.linux.dev \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=james.morse@arm.com \
--cc=john.allen@amd.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=zaidal@os.amperecomputing.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox