]> git.hungrycats.org Git - linux/commit
x86/speculation: Rework speculative_store_bypass_update()
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 May 2018 18:31:44 +0000 (20:31 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:09:47 +0000 (04:09 +0100)
commitdbfa4250cef087f7b7809f5031301d1e78135145
tree6f0c2b75fbece4c879f746649b145c9c9cfc2d4a
parent9ed451be3e8c5f0e23537925d00483d08f2f3ca1
x86/speculation: Rework speculative_store_bypass_update()

commit 0270be3e34efb05a88bc4c422572ece038ef3608 upstream.

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>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/spec-ctrl.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/process.c