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

From: Wei Huang
Date: Mon Mar 16 2020 - 15:20:36 EST




On 3/16/20 1:08 PM, Borislav Petkov wrote:
> On Tue, Mar 10, 2020 at 11:44:09PM -0500, Wei Huang wrote:
>> Newer AMD CPUs support the feature of protected processor identification
>> number (PPIN). This patch detects and enables PPIN support on AMD platforms
>
> Avoid having "This patch" or "This commit" in the commit message. It is
> tautologically useless.
>
> Also, do
>
> $ git grep 'This patch' Documentation/process
>
> for more details.
>
>> and includes PPIN info in MCE records if available. Because this feature is
>> almost identical on both Intel and AMD, it re-uses X86_FEATURE_INTEL_PPIN
>> feature bit and renames it to X86_FEATURE_PPIN.
>
> Strictly speaking, you can't rename it anymore because it is visible in
> /proc/cpuinfo and thus ABI.
>
> Besides, we have already a cpufeatures.h leaf for exactly that word:
>
> /* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
>
> which means you can call the AMD define
>
> #define X86_FEATURE_AMD_PPIN ( 13*32+23) /* AMD Protected Processor Inventory Number */
>
> and /proc/cpuinfo will have "amd_ppin" and the code will use the
> respective vendor flag to test.

Thanks. I will send V2 with fixes based on Tony's and your inputs.

>
>> Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>
>> Signed-off-by: Smita Koralahalli Channabasappa <smita.koralahallichannabasappa@xxxxxxx>
>
> What does this SOB mean? Grep Documentation/ for "Co-developed-by" in
> case this is what you're trying to express.
>