Re: [PATCH 1/1] x86/mce/amd: Add PPIN support for AMD MCE

From: Borislav Petkov
Date: Thu Mar 19 2020 - 16:21:34 EST


On Thu, Mar 19, 2020 at 03:14:53PM -0500, Wei Huang wrote:
> My proposal is to move mce_amd_ppin_init() function to
> ./arch/x86/kernel/cpu/amd.c and probe X86_FEATURE_AMD_PPIN there. This
> is similar to what early_detect_mem_encrypt() does. Later, mce_setup()
> can use X86_FEATURE_AMD_PPIN directly. Is this approach acceptable?

You can add it to arch/x86/kernel/cpu/mce/amd.c just like
intel_ppin_init() is respectively in .../mce/intel.c, as mce/ is where
this thing is used only. We can move it to kernel/cpu/ later if it turns
out that it is needed for something else.

--
Regards/Gruss,
Boris.

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