From: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Yazen Ghannam <yazen.ghannam@amd.com>
Subject: Re: [PATCH v5] x86/mce: Check for writes ignored in MCA_STATUS register
Date: Fri, 24 Jun 2022 15:34:42 -0700 [thread overview]
Message-ID: <d3f554b8-4fc5-efe8-1ca2-aa95c7e76eb8@amd.com> (raw)
In-Reply-To: <YrNRYJx0CNDNj3oX@zn.tnic>
Hi Boris,
On 6/22/2022 10:29 AM, Borislav Petkov wrote:
> On Fri, Jun 10, 2022 at 07:25:15PM +0000, Smita Koralahalli wrote:
>> arch/x86/kernel/cpu/mce/inject.c | 50 +++++++++++++++++++++++++++++-
>> arch/x86/kernel/cpu/mce/internal.h | 2 +-
>> 2 files changed, 50 insertions(+), 2 deletions(-)
> I've simplified, improved and removed some stuff. See if that still
> works on that platform which ignores writes.
I tested out the patch. Its not behaving as expected. The module fails
silently
again.
> + cpu = get_cpu();
> +
> + for (bank = 0; bank < MAX_NR_BANKS; ++bank) {
> + u64 status = MCI_STATUS_VAL, ipid;
> +
> + /* Check whether bank is populated */
> + rdmsrl(MSR_AMD64_SMCA_MCx_IPID(bank), ipid);
> + if (!ipid)
> + continue;
> +
> + toggle_hw_mce_inject(cpu, true);
> +
> + if (wrmsrl_safe(mca_msr_reg(bank, MCA_STATUS), status)) {
The wrmsrl_safe() doesn't throw an error here.
I think we need to read back the written value and check for it whatsoever.
What do you think?
Thanks,
Smita
> + hw_injection_possible = false;
> + pr_warn("Platform does not allow *hardware* error injection."
> + "Try using APEI EINJ instead.\n");
> + }
> +
> + toggle_hw_mce_inject(cpu, false);
> +
> + break;
> + }
> +
> + put_cpu();
> +}
next prev parent reply other threads:[~2022-06-24 22:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 19:25 [PATCH v5] x86/mce: Check for writes ignored in MCA_STATUS register Smita Koralahalli
2022-06-22 17:29 ` Borislav Petkov
2022-06-24 22:34 ` Smita Koralahalli [this message]
2022-06-25 13:10 ` Borislav Petkov
2022-06-27 20:57 ` Smita Koralahalli
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=d3f554b8-4fc5-efe8-1ca2-aa95c7e76eb8@amd.com \
--to=smita.koralahallichannabasappa@amd.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yazen.ghannam@amd.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