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

From: Yazen Ghannam
Date: Fri Sep 24 2021 - 16:05:21 EST


On Thu, Sep 23, 2021 at 05:11:08PM +0200, Borislav Petkov wrote:
> On Thu, Sep 23, 2021 at 02:51:49PM +0000, Yazen Ghannam wrote:

...

> > 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?
>
> :-)
>

Yes, at the moment it does. So I'll use that. Thanks!

> 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...
>
> --

The check is intended to catch the case where both bits are 0. But I'll
double-check with the hardware folks.

Thanks,
Yazen