x86/speculation: Rework speculative_store_bypass_update()
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 May 2018 18:31:44 +0000 (20:31 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 17 May 2018 15:09:19 +0000 (17:09 +0200)
commit0270be3e34efb05a88bc4c422572ece038ef3608
tree6cde6ccb097a4c516f2d58d3583943a16b449ecd
parent11fb0683493b2da112cd64c9dada221b52463bf7
x86/speculation: Rework speculative_store_bypass_update()

The upcoming support for the virtual SPEC_CTRL MSR on AMD needs to reuse
speculative_store_bypass_update() to avoid code duplication. Add an
argument for supplying a thread info (TIF) value and create a wrapper
speculative_store_bypass_update_current() which is used at the existing
call site.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/include/asm/spec-ctrl.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/process.c