From: Greg Kroah-Hartman Date: Wed, 9 Mar 2022 15:03:46 +0000 (+0100) Subject: drop cpu-smt-create-and-export-cpu_smt_possible.patch from 4.14 and 4.19 X-Git-Tag: v4.9.306~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1a04e9a4eaf113831b578024c79990bb94c1053;p=thirdparty%2Fkernel%2Fstable-queue.git drop cpu-smt-create-and-export-cpu_smt_possible.patch from 4.14 and 4.19 not needed. --- diff --git a/queue-4.14/cpu-smt-create-and-export-cpu_smt_possible.patch b/queue-4.14/cpu-smt-create-and-export-cpu_smt_possible.patch deleted file mode 100644 index 056aef530d6..00000000000 --- a/queue-4.14/cpu-smt-create-and-export-cpu_smt_possible.patch +++ /dev/null @@ -1,65 +0,0 @@ -From foo@baz Tue Mar 8 07:49:31 PM CET 2022 -From: Vitaly Kuznetsov -Date: Mon, 16 Sep 2019 18:22:56 +0200 -Subject: cpu/SMT: create and export cpu_smt_possible() - -From: Vitaly Kuznetsov - -commit e1572f1d08be57a5412a464cff0712a23cd0b73e upstream. - -KVM needs to know if SMT is theoretically possible, this means it is -supported and not forcefully disabled ('nosmt=force'). Create and -export cpu_smt_possible() answering this question. - -Signed-off-by: Vitaly Kuznetsov -Signed-off-by: Paolo Bonzini -Signed-off-by: Greg Kroah-Hartman ---- - include/linux/cpu.h | 2 ++ - kernel/cpu.c | 11 +++++++++-- - 2 files changed, 11 insertions(+), 2 deletions(-) - ---- a/include/linux/cpu.h -+++ b/include/linux/cpu.h -@@ -196,12 +196,14 @@ enum cpuhp_smt_control { - extern enum cpuhp_smt_control cpu_smt_control; - extern void cpu_smt_disable(bool force); - extern void cpu_smt_check_topology(void); -+extern bool cpu_smt_possible(void); - extern int cpuhp_smt_enable(void); - extern int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval); - #else - # define cpu_smt_control (CPU_SMT_ENABLED) - static inline void cpu_smt_disable(bool force) { } - static inline void cpu_smt_check_topology(void) { } -+static inline bool cpu_smt_possible(void) { return false; } - static inline int cpuhp_smt_enable(void) { return 0; } - static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; } - #endif ---- a/kernel/cpu.c -+++ b/kernel/cpu.c -@@ -369,8 +369,7 @@ enum cpuhp_smt_control cpu_smt_control _ - - void __init cpu_smt_disable(bool force) - { -- if (cpu_smt_control == CPU_SMT_FORCE_DISABLED || -- cpu_smt_control == CPU_SMT_NOT_SUPPORTED) -+ if (!cpu_smt_possible()) - return; - - if (force) { -@@ -415,6 +414,14 @@ static inline bool cpu_smt_allowed(unsig - */ - return !per_cpu(cpuhp_state, cpu).booted_once; - } -+ -+/* Returns true if SMT is not supported of forcefully (irreversibly) disabled */ -+bool cpu_smt_possible(void) -+{ -+ return cpu_smt_control != CPU_SMT_FORCE_DISABLED && -+ cpu_smt_control != CPU_SMT_NOT_SUPPORTED; -+} -+EXPORT_SYMBOL_GPL(cpu_smt_possible); - #else - static inline bool cpu_smt_allowed(unsigned int cpu) { return true; } - #endif diff --git a/queue-4.14/series b/queue-4.14/series index 07586f6d7f9..fce99c7504f 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -1,4 +1,3 @@ -cpu-smt-create-and-export-cpu_smt_possible.patch x86-speculation-merge-one-test-in-spectre_v2_user_select_mitigation.patch x86-bugs-unconditionally-allow-spectre_v2-retpoline-amd.patch x86-speculation-rename-retpoline_amd-to-retpoline_lfence.patch diff --git a/queue-4.19/cpu-smt-create-and-export-cpu_smt_possible.patch b/queue-4.19/cpu-smt-create-and-export-cpu_smt_possible.patch deleted file mode 100644 index 815e41ee1a2..00000000000 --- a/queue-4.19/cpu-smt-create-and-export-cpu_smt_possible.patch +++ /dev/null @@ -1,65 +0,0 @@ -From foo@baz Tue Mar 8 07:47:24 PM CET 2022 -From: Vitaly Kuznetsov -Date: Mon, 16 Sep 2019 18:22:56 +0200 -Subject: cpu/SMT: create and export cpu_smt_possible() - -From: Vitaly Kuznetsov - -commit e1572f1d08be57a5412a464cff0712a23cd0b73e upstream. - -KVM needs to know if SMT is theoretically possible, this means it is -supported and not forcefully disabled ('nosmt=force'). Create and -export cpu_smt_possible() answering this question. - -Signed-off-by: Vitaly Kuznetsov -Signed-off-by: Paolo Bonzini -Signed-off-by: Greg Kroah-Hartman ---- - include/linux/cpu.h | 2 ++ - kernel/cpu.c | 11 +++++++++-- - 2 files changed, 11 insertions(+), 2 deletions(-) - ---- a/include/linux/cpu.h -+++ b/include/linux/cpu.h -@@ -188,12 +188,14 @@ enum cpuhp_smt_control { - extern enum cpuhp_smt_control cpu_smt_control; - extern void cpu_smt_disable(bool force); - extern void cpu_smt_check_topology(void); -+extern bool cpu_smt_possible(void); - extern int cpuhp_smt_enable(void); - extern int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval); - #else - # define cpu_smt_control (CPU_SMT_ENABLED) - static inline void cpu_smt_disable(bool force) { } - static inline void cpu_smt_check_topology(void) { } -+static inline bool cpu_smt_possible(void) { return false; } - static inline int cpuhp_smt_enable(void) { return 0; } - static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; } - #endif ---- a/kernel/cpu.c -+++ b/kernel/cpu.c -@@ -369,8 +369,7 @@ enum cpuhp_smt_control cpu_smt_control _ - - void __init cpu_smt_disable(bool force) - { -- if (cpu_smt_control == CPU_SMT_FORCE_DISABLED || -- cpu_smt_control == CPU_SMT_NOT_SUPPORTED) -+ if (!cpu_smt_possible()) - return; - - if (force) { -@@ -415,6 +414,14 @@ static inline bool cpu_smt_allowed(unsig - */ - return !per_cpu(cpuhp_state, cpu).booted_once; - } -+ -+/* Returns true if SMT is not supported of forcefully (irreversibly) disabled */ -+bool cpu_smt_possible(void) -+{ -+ return cpu_smt_control != CPU_SMT_FORCE_DISABLED && -+ cpu_smt_control != CPU_SMT_NOT_SUPPORTED; -+} -+EXPORT_SYMBOL_GPL(cpu_smt_possible); - #else - static inline bool cpu_smt_allowed(unsigned int cpu) { return true; } - #endif diff --git a/queue-4.19/series b/queue-4.19/series index 07586f6d7f9..fce99c7504f 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -1,4 +1,3 @@ -cpu-smt-create-and-export-cpu_smt_possible.patch x86-speculation-merge-one-test-in-spectre_v2_user_select_mitigation.patch x86-bugs-unconditionally-allow-spectre_v2-retpoline-amd.patch x86-speculation-rename-retpoline_amd-to-retpoline_lfence.patch