Re: [PATCH v4 1/2] x86/mce: Check for writes ignored in MCA_STATUS register

Borislav Petkov
2022-04-13T20:20:24Z

On Wed, Apr 13, 2022 at 12:16:26PM -0700, Smita Koralahalli wrote:
> > diff --git a/arch/x86/kernel/cpu/mce/internal.h b/arch/x86/kernel/cpu/mce/internal.h
> > index 4ae0e603f7fa..7e03f5b7f6bd 100644
> > --- a/arch/x86/kernel/cpu/mce/internal.h
> > +++ b/arch/x86/kernel/cpu/mce/internal.h
> > @@ -211,7 +211,7 @@ noinstr u64 mce_rdmsrl(u32 msr);
> > static __always_inline u32 mca_msr_reg(int bank, enum mca_msr reg)
> > {
> > - if (mce_flags.smca) {
> > + if (cpu_feature_enabled(X86_FEATURE_SMCA)) {
> Should this change be part of this patch series? Also, why mce_flags.smca
> check won't work?

Because you'd need to export it to modules and mca_flags is not
something I'd want to export to anything.

--
Regards/Gruss,
Boris.