Re: [PATCH 2/2] x86/mce: Add support for Extended Physical Address MCA changes

From: Borislav Petkov
Date: Fri Jun 11 2021 - 03:39:29 EST


On Thu, Jun 10, 2021 at 10:36:44PM -0500, Smita Koralahalli Channabasappa wrote:
> The idea of defining a new struct was to keep SMCA specific stuff separate.
> Thought, it would be costly to include in existing struct mce_bank[] as it will be
> unnecessarily defined for each cpu and each bank across all vendors even if they
> aren't using it and would be a problem if they are constraint on resource and space.

That's very considerate of you to think about the other vendors - I wish
everyone would do that...

However, our mce_banks_array is defined unconditionally on all vendors
already. So it is there even now. So I wouldn't lose a single second of
sleep about adding an u64 bitfield there.

> Also, in the future we can use this newly defined struct smca_config[] to cache
> other MCA_CONFIG feature bits for different use cases if they are per bank and per
> cpu.

You can use other bits in that bitfield. I hope 64 are enough. :)

HTH.

--
Regards/Gruss,
Boris.

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