Re: [PATCH] x86/CPU/AMD: Simplify the spectral chicken fix

From: Nikolay Borisov
Date: Mon Jan 05 2026 - 08:36:05 EST




On 30.12.25 г. 13:07 ч., Borislav Petkov wrote:
From: "Borislav Petkov (AMD)" <bp@xxxxxxxxx>

msr_set_bit() takes a bit number to set but MSR_ZEN2_SPECTRAL_CHICKEN_BIT
is a bit mask. The usual pattern that code uses is a _BIT-named type
macro instead of a mask.

So convert it to a bit number to reflect that.

Also, msr_set_bit() already does the reading and checking whether the
bit needs to be set so use that instead of a local variable.

Fixup tabbing while at it.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>


Reviewed-by: Nikolay Borisov <nik.borisov@xxxxxxxx>