lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/5] x86/mce/inject: Warn the user on a not set valid bit in MCA_STATUS
On Tue, Oct 19, 2021 at 06:36:38PM -0500, Smita Koralahalli wrote:
> MCA handlers check the valid bit in each status register (MCA_STATUS[Val])
> and will likely ignore signatures if the valid bit is not set.
>
> Warn the user if the valid bit is not set before doing error injection.
>
> Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
> ---
> v2:
> Added a warning statement instead of setting the valid bit.
> ---
> arch/x86/kernel/cpu/mce/inject.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c
> index 601efd104bb4..a993dc3d0333 100644
> --- a/arch/x86/kernel/cpu/mce/inject.c
> +++ b/arch/x86/kernel/cpu/mce/inject.c
> @@ -487,6 +487,9 @@ static void do_inject(void)
>
> i_mce.tsc = rdtsc_ordered();
>
> + if (!(i_mce.status & MCI_STATUS_VAL))
> + pr_warn("Handlers might ignore signatures with Val=0 in MCA_STATUS\n");
> +
> if (i_mce.misc)
> i_mce.status |= MCI_STATUS_MISCV;
>
> --

So what's the real reason for this?

You've injected and you didn't get any feedback and were wondering why?

If handlers ignore !VAL MCEs, why don't you simply set it
unconditionally on entry to do_inject()?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2021-10-26 12:02    [W:0.137 / U:2.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site