[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YWh1bc6Lol65f0RH@zn.tnic>
Date: Thu, 14 Oct 2021 20:22:37 +0200
From: Borislav Petkov <bp@...en8.de>
To: "Koralahalli Channabasappa, Smita" <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, Oct 11, 2021 at 04:12:14PM -0500, Koralahalli Channabasappa, Smita wrote:
> I do not have the bank number in order to look up the IPID for that bank.
> I couldn't know the bank number because mce-inject files are synchronized
> in a way that once the bank number is written the injection starts.
> Can you please suggest what needs to be done here?
>
> Also, the IPID register is read only from the OS, hence the user provided
> IPID values could be useful for "sw" error injection types. For "hw" error
> injection types we need to read from the registers to determine the IPID
> value.
>
> Should there be two cases where on a "sw" injection use the user provided
> IPID value whereas on "hw" injection read from registers?
Right, that's a good point. So the way I see it is, we need to decide
what is allowed for sw injection and what for hw injection, wrt to IPID
value.
I think for sw injection, we probably should say that since this is
sw only and its purpose is to test the code only, there should not be
any limitations imposed by the underlying machine. Like using the bank
number, for example.
So what you do now for sw injection:
if (val && inj_type == SW_INJ)
m->ipid = val;
should be good enough. User simply sets some IPID value and that value
will be used for the bank which is written when injecting.
Now, for hw injection, you have two cases:
1. The bank is unpopulated so setting the IPID there doesn't make any sense.
2. The bank *is* populated and the respective IPID MSR has a value
describing what that bank is.
And in that case, does it even make sense to set the IPID? I don't think
so because that IP block's type - aka IPID - has been set already by
hardware/firmware.
So the way I see it, it makes no sense whatsoever to set the IPID of a
bank during hw injection.
Right?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists