[5/6] x86/bugs: Cleanup mds_user_clear

Message ID 20231020-delay-verw-v1-5-cff54096326d@linux.intel.com
State New
Headers
Series Delay VERW |

Commit Message

Pawan Gupta Oct. 20, 2023, 8:45 p.m. UTC
  There are no more users of mds_user_clear static key, remove it.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
---
 arch/x86/include/asm/nospec-branch.h | 1 -
 arch/x86/kernel/cpu/bugs.c           | 3 ---
 2 files changed, 4 deletions(-)
  

Comments

Nikolay Borisov Oct. 23, 2023, 8:51 a.m. UTC | #1
On 20.10.23 г. 23:45 ч., Pawan Gupta wrote:
> There are no more users of mds_user_clear static key, remove it.
> 
> Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>

This patch can be squashed into the previous one. You've already done 
the bulk of the work to eliminate usage of mds_user_clear there.
  
Pawan Gupta Oct. 23, 2023, 4:06 p.m. UTC | #2
On Mon, Oct 23, 2023 at 11:51:39AM +0300, Nikolay Borisov wrote:
> 
> 
> On 20.10.23 г. 23:45 ч., Pawan Gupta wrote:
> > There are no more users of mds_user_clear static key, remove it.
> > 
> > Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
> 
> This patch can be squashed into the previous one. You've already done the
> bulk of the work to eliminate usage of mds_user_clear there.

Yes, it can be squashed, into previous one. Will do that in next
revision.
  

Patch

diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index 501c26ecd722..520689325014 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -563,7 +563,6 @@  DECLARE_STATIC_KEY_FALSE(switch_to_cond_stibp);
 DECLARE_STATIC_KEY_FALSE(switch_mm_cond_ibpb);
 DECLARE_STATIC_KEY_FALSE(switch_mm_always_ibpb);
 
-DECLARE_STATIC_KEY_FALSE(mds_user_clear);
 DECLARE_STATIC_KEY_FALSE(mds_idle_clear);
 
 DECLARE_STATIC_KEY_FALSE(switch_mm_cond_l1d_flush);
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 75fc0a70877f..cf2181b45055 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -111,9 +111,6 @@  DEFINE_STATIC_KEY_FALSE(switch_mm_cond_ibpb);
 /* Control unconditional IBPB in switch_mm() */
 DEFINE_STATIC_KEY_FALSE(switch_mm_always_ibpb);
 
-/* Control MDS CPU buffer clear before returning to user space */
-DEFINE_STATIC_KEY_FALSE(mds_user_clear);
-EXPORT_SYMBOL_GPL(mds_user_clear);
 /* Control MDS CPU buffer clear before idling (halt, mwait) */
 DEFINE_STATIC_KEY_FALSE(mds_idle_clear);
 EXPORT_SYMBOL_GPL(mds_idle_clear);