Re: [PATCH 4/4] x86/mce: Get rid of the ->quirk_no_way_out() indirect call

From: Borislav Petkov
Date: Thu Sep 23 2021 - 11:11:25 EST


On Thu, Sep 23, 2021 at 02:51:49PM +0000, Yazen Ghannam wrote:
> On Fri, Sep 17, 2021 at 12:53:55PM +0200, Borislav Petkov wrote:
> > From: Borislav Petkov <bp@xxxxxxx>
> >
> > Use a flag setting to call the only quirk function for that.
> >
>
> I'd like to add another quirk function. First revision here:
> https://lkml.kernel.org/r/20210504174712.27675-2-Yazen.Ghannam@xxxxxxx
>
> Do you recommend this create another quirk flag and follow this patch? Or
> should the quirks be grouped together somehow?

Does that quirk match machines with mce_flags.smca=1 per chance?

:-)

Also, your test:

+ if ((m->mcgstatus & (MCG_STATUS_EIPV|MCG_STATUS_RIPV)) != 0)
+ return;

should be

+ if ((m->mcgstatus & (MCG_STATUS_EIPV|MCG_STATUS_RIPV)) ==
(MCG_STATUS_EIPV|MCG_STATUS_RIPV))
+ return;

methinks.

Unless I'm misunderstanding the erratum ofc...

--
Regards/Gruss,
Boris.

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