x86/speculation: Add Kconfig option for GDS
authorDaniel Sneddon <daniel.sneddon@linux.intel.com>
Tue, 1 Aug 2023 14:36:26 +0000 (16:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Aug 2023 18:03:48 +0000 (20:03 +0200)
commitc04579e95492dff342cb4976dd2f5728c0f87eee
treef3081de4fe5341c4e7d6272bc8fbe92fe9a86f07
parent92fc27c79bc7f3e2bfd2b88e197762566daf02a1
x86/speculation: Add Kconfig option for GDS

commit 53cf5797f114ba2bd86d23a862302119848eff19 upstream

Gather Data Sampling (GDS) is mitigated in microcode. However, on
systems that haven't received the updated microcode, disabling AVX
can act as a mitigation. Add a Kconfig option that uses the microcode
mitigation if available and disables AVX otherwise. Setting this
option has no effect on systems not affected by GDS. This is the
equivalent of setting gather_data_sampling=force.

Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/Kconfig
arch/x86/kernel/cpu/bugs.c