From: Smita Koralahalli Channabasappa <skoralah@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>,
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@amd.com
Subject: Re: [PATCH 1/5] x86/mce/inject: Check if a bank is unpopulated before error simulation
Date: Mon, 27 Sep 2021 16:56:17 -0500 [thread overview]
Message-ID: <7e790ba1-0b31-690c-7bd3-d8361109cef5@amd.com> (raw)
In-Reply-To: <YVImVgsxyfQO7TGI@zn.tnic>
On 9/27/21 3:15 PM, Borislav Petkov wrote:
> On Mon, Sep 27, 2021 at 02:51:56PM -0500, Smita Koralahalli Channabasappa wrote:
>> Can you please elaborate on this? I'm not sure if I understood this
>> right. Should I read the ipid file to verify that the user has input
>> proper ipid? If ipid file reads zero then do rdmsrl_on_cpu?
> No, on a write to the ipid file you should do that checking and write if
> the bank is populated or fail the write otherwise. And you should put
> all that code in inj_bank_set() - that's why I say "on a write to the
> ipid file".
>
> And instead of boot_cpu_has() you should use cpu_feature_enabled().
>
> Makes sense?
Yes, this makes sense to me now. But you meant to say inj_ipid_set()
instead of inj_bank_set()..?
Something like this:
-MCE_INJECT_SET(ipid)
+static int inj_ipid_set(void *data, u64 val)
+{
+ struct mce *m = (struct mce*)data;
+ if cpu_feature_enabled(X86_FEATURE_SMCA)) {
+ rdmsrl_on_cpu(..
..
..
+ m->ipid = val;
+ ..
+}
Thanks,
next prev parent reply other threads:[~2021-09-27 21:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 23:27 [PATCH 0/5] x86/mce: Handle error simulation failures in mce-inject module Smita Koralahalli
2021-09-15 23:27 ` [PATCH 1/5] x86/mce/inject: Check if a bank is unpopulated before error simulation Smita Koralahalli
2021-09-24 8:26 ` Borislav Petkov
2021-09-27 19:51 ` Smita Koralahalli Channabasappa
2021-09-27 20:15 ` Borislav Petkov
2021-09-27 21:56 ` Smita Koralahalli Channabasappa [this message]
2021-09-27 22:05 ` Borislav Petkov
2021-10-11 21:12 ` Koralahalli Channabasappa, Smita
2021-10-14 18:22 ` Borislav Petkov
2021-10-14 20:26 ` Koralahalli Channabasappa, Smita
2021-10-14 20:57 ` Borislav Petkov
2021-09-15 23:27 ` [PATCH 2/5] x86/mce/inject: Set the valid bit in MCA_STATUS before error injection Smita Koralahalli
2021-09-24 8:26 ` Borislav Petkov
2021-09-15 23:27 ` [PATCH 3/5] x86/mce: Use msr_ops in prepare_msrs() Smita Koralahalli
2021-09-24 8:26 ` Borislav Petkov
2021-09-15 23:27 ` [PATCH 4/5] x86/mce/inject: Check for writes ignored in status registers Smita Koralahalli
2021-09-15 23:27 ` [PATCH 5/5] x86/mce/mce-inject: Return error code to userspace from mce-inject module Smita Koralahalli
2021-09-24 8:26 ` Borislav Petkov
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=7e790ba1-0b31-690c-7bd3-d8361109cef5@amd.com \
--to=skoralah@amd.com \
--cc=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;
as well as URLs for NNTP newsgroup(s).