[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVImVgsxyfQO7TGI@zn.tnic>
Date: Mon, 27 Sep 2021 22:15:18 +0200
From: Borislav Petkov <bp@...en8.de>
To: Smita Koralahalli Channabasappa <skoralah@....com>
Cc: Smita Koralahalli <Smita.KoralahalliChannabasappa@....com>,
x86@...nel.org, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org, Tony Luck <tony.luck@...el.com>,
"H . Peter Anvin" <hpa@...or.com>, yazen.ghannam@....com
Subject: Re: [PATCH 1/5] x86/mce/inject: Check if a bank is unpopulated
before error simulation
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?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists