x86/cpu/amd: Add a Zenbleed fix
authorBorislav Petkov (AMD) <bp@alien8.de>
Sat, 15 Jul 2023 11:41:28 +0000 (13:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jul 2023 16:55:35 +0000 (18:55 +0200)
commited9b87010aa84c157096f98c322491e9af8e8f07
treea5726501066bfe52b73373ec828a585432529b13
parent5fc203d8d3ed416bee054e9f2e6513df51d74577
x86/cpu/amd: Add a Zenbleed fix

Upstream commit: 522b1d69219d8f083173819fde04f994aa051a98

Add a fix for the Zen2 VZEROUPPER data corruption bug where under
certain circumstances executing VZEROUPPER can cause register
corruption or leak data.

The optimal fix is through microcode but in the case the proper
microcode revision has not been applied, enable a fallback fix using
a chicken bit.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/microcode.h
arch/x86/include/asm/microcode_amd.h
arch/x86/include/asm/msr-index.h
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c