[PATCH v5 01/12] x86/bugs: Rename GDS_FORCE_MITIGATION to MITIGATION_GDS_FORCE

From: Breno Leitao
Date: Thu Oct 19 2023 - 14:12:26 EST


CPU mitigations config entries are inconsistent, and names are hard to
related[1]. There are concrete benefits for both users and developers of
having all the mitigation config options living in the same config
namespace.

The mitigation options should have consistency and start with
MITIGATION.

Rename the Kconfig entry from GDS_FORCE_MITIGATION to
MITIGATION_GDS_FORCE.

[1] Link: https://lore.kernel.org/lkml/20231011044252.42bplzjsam3qsasz@treble/
Suggested-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
---
arch/x86/Kconfig | 2 +-
arch/x86/kernel/cpu/bugs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d4a73d12780a..d0a9f5a5c8a4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2566,7 +2566,7 @@ config SLS
against straight line speculation. The kernel image might be slightly
larger.

-config GDS_FORCE_MITIGATION
+config MITIGATION_GDS_FORCE
bool "Force GDS Mitigation"
depends on CPU_SUP_INTEL
default n
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index bb0ab8466b91..3c7e27b58f0e 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -671,7 +671,7 @@ enum gds_mitigations {
GDS_MITIGATION_HYPERVISOR,
};

-#if IS_ENABLED(CONFIG_GDS_FORCE_MITIGATION)
+#if IS_ENABLED(CONFIG_MITIGATION_GDS_FORCE)
static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FORCE;
#else
static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FULL;
--
2.34.1