linux_dsm_epyc7002/arch/x86/kernel/cpu
Tim Chen 5bfbe3ad58 x86/speculation: Prepare for per task indirect branch speculation control
To avoid the overhead of STIBP always on, it's necessary to allow per task
control of STIBP.

Add a new task flag TIF_SPEC_IB and evaluate it during context switch if
SMT is active and flag evaluation is enabled by the speculation control
code. Add the conditional evaluation to x86_virt_spec_ctrl() as well so the
guest/host switch works properly.

This has no effect because TIF_SPEC_IB cannot be set yet and the static key
which controls evaluation is off. Preparatory patch for adding the control
code.

[ tglx: Simplify the context switch logic and make the TIF evaluation
  	depend on SMP=y and on the static key controlling the conditional
  	update. Rename it to TIF_SPEC_IB because it controls both STIBP and
  	IBPB ]

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Casey Schaufler <casey.schaufler@intel.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Jon Masters <jcm@redhat.com>
Cc: Waiman Long <longman9394@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Dave Stewart <david.c.stewart@intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20181125185005.176917199@linutronix.de
2018-11-28 11:57:10 +01:00
..
mcheck acpi/nfit, x86/mce: Validate a MCE's address before using it 2018-11-06 19:13:26 +01:00
microcode Merge branches 'x86/early-printk', 'x86/microcode' and 'core/objtool' into x86/urgent, to pick up simple topic branches 2018-10-29 07:13:09 +01:00
mtrr x86: Clean up 'sizeof x' => 'sizeof(x)' 2018-10-29 07:13:28 +01:00
.gitignore
amd.c x86/cpu/amd: Remove unnecessary parentheses 2018-10-03 08:27:47 +02:00
aperfmperf.c
bugs.c x86/speculation: Prepare for per task indirect branch speculation control 2018-11-28 11:57:10 +01:00
cacheinfo.c x86/cpu: Get cache info and setup cache cpumap for Hygon Dhyana 2018-09-27 18:28:57 +02:00
centaur.c x86/CPU: Move x86_cpuinfo::x86_max_cores assignment to detect_num_cpu_cores() 2018-05-13 16:14:24 +02:00
common.c Merge branch 'core/urgent' into x86/urgent, to pick up objtool fix 2018-11-03 23:42:16 +01:00
cpu.h x86/cpu: Get cache info and setup cache cpumap for Hygon Dhyana 2018-09-27 18:28:57 +02:00
cpuid-deps.c x86/cpuid: Switch to 'static const' specifier 2018-03-08 12:23:42 +01:00
cyrix.c x86/CPU: Use correct macros for Cyrix calls 2018-09-22 11:46:56 +02:00
hygon.c x86/cpu: Get cache info and setup cache cpumap for Hygon Dhyana 2018-09-27 18:28:57 +02:00
hypervisor.c
intel_pconfig.c x86/pconfig: Detect PCONFIG targets 2018-03-12 12:10:54 +01:00
intel_rdt_ctrlmondata.c x86/intel_rdt: Prevent pseudo-locking from using stale pointers 2018-10-19 14:54:28 +02:00
intel_rdt_monitor.c x86/intel_rdt/mba_sc: Feedback loop to dynamically update mem bandwidth 2018-05-19 13:16:44 +02:00
intel_rdt_pseudo_lock_event.h x86/intel_rdt: Support L3 cache performance event of Broadwell 2018-06-24 15:35:48 +02:00
intel_rdt_pseudo_lock.c Merge branch 'x86/cache' into perf/core, to pick up fixes 2018-10-23 12:30:19 +02:00
intel_rdt_rdtgroup.c x86/intel_rdt: Prevent pseudo-locking from using stale pointers 2018-10-19 14:54:28 +02:00
intel_rdt.c x86/intel_rdt: Prevent pseudo-locking from using stale pointers 2018-10-19 14:54:28 +02:00
intel_rdt.h x86/intel_rdt: Fix out-of-bounds memory access in CBM tests 2018-10-09 08:02:15 +02:00
intel.c x86/spectre: Add missing family 6 check to microcode check 2018-08-27 10:29:14 +02:00
Makefile x86/cpu: Create Hygon Dhyana architecture support file 2018-09-27 16:14:05 +02:00
match.c
mkcapflags.sh
mshyperv.c x86/hyper-v: Enable PIT shutdown quirk 2018-11-04 11:04:46 +01:00
perfctr-watchdog.c x86/events: Add Hygon Dhyana support to PMU infrastructure 2018-09-27 18:28:57 +02:00
powerflags.c
proc.c
rdrand.c
scattered.c
topology.c x86/cpu/topology: Provide detect_extended_topology_early() 2018-06-21 14:20:59 +02:00
transmeta.c
umc.c
vmware.c x86/cpu/vmware: Do not trace vmware_sched_clock() 2018-11-09 21:39:14 +01:00