Re: [PATCH 3/5] x86/mce: Use msr_ops in prepare_msrs()

From: Borislav Petkov
Date: Fri Sep 24 2021 - 04:26:51 EST


On Wed, Sep 15, 2021 at 06:27:37PM -0500, Smita Koralahalli wrote:
> Replace MCx_{STATUS, ADDR, MISC} macros with msr_ops.
>
> Also, restructure the code to avoid multiple initializations for MCA
> registers. SMCA machines define a different set of MSRs for MCA registers
> and msr_ops initializes appropriate MSRs for SMCA and legacy processors.
>
> Initialize MCA_MISC and MCA_SYND registers at the end after initializing
> MCx_{STATUS, DESTAT} which is further explained in the next patch.
>
> Make msr_ops exportable in order to be accessible from mce-inject module.
>
> Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@xxxxxxx>
> ---
> arch/x86/kernel/cpu/mce/core.c | 1 +
> arch/x86/kernel/cpu/mce/inject.c | 27 +++++++++++++--------------
> 2 files changed, 14 insertions(+), 14 deletions(-)

https://git.kernel.org/tip/8121b8f947be0033f567619be204639a50cad298

--
Regards/Gruss,
Boris.

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