Merge tag 'nativebhi' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[sfrench/cifs-2.6.git] / arch / x86 / Kconfig
index 4fff6ed46e902cfbe723cf5ed5ce517e2d131891..10a6251f58f3e0789cf5507322b92d92a87bc2eb 100644 (file)
@@ -2633,6 +2633,32 @@ config MITIGATION_RFDS
          stored in floating point, vector and integer registers.
          See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst>
 
+choice
+       prompt "Clear branch history"
+       depends on CPU_SUP_INTEL
+       default SPECTRE_BHI_ON
+       help
+         Enable BHI mitigations. BHI attacks are a form of Spectre V2 attacks
+         where the branch history buffer is poisoned to speculatively steer
+         indirect branches.
+         See <file:Documentation/admin-guide/hw-vuln/spectre.rst>
+
+config SPECTRE_BHI_ON
+       bool "on"
+       help
+         Equivalent to setting spectre_bhi=on command line parameter.
+config SPECTRE_BHI_OFF
+       bool "off"
+       help
+         Equivalent to setting spectre_bhi=off command line parameter.
+config SPECTRE_BHI_AUTO
+       bool "auto"
+       depends on BROKEN
+       help
+         Equivalent to setting spectre_bhi=auto command line parameter.
+
+endchoice
+
 endif
 
 config ARCH_HAS_ADD_PAGES