linux/arch/x86/kernel/cpu
Andi Kleen e29c75d4fb x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+
[upstream cc51e5428e for 4.4.
Note there might be still a trivial conflict with the backport
for b0a182f875, but should
be easy to resolve]

On Nehalem and newer core CPUs the CPU cache internally uses 44 bits
physical address space. The L1TF workaround is limited by this internal
cache address width, and needs to have one bit free there for the
mitigation to work.

Older client systems report only 36bit physical address space so the range
check decides that L1TF is not mitigated for a 36bit phys/32GB system with
some memory holes.

But since these actually have the larger internal cache width this warning
is bogus because it would only really be needed if the system had more than
43bits of memory.

Add a new internal x86_cache_bits field. Normally it is the same as the
physical bits field reported by CPUID, but for Nehalem and newerforce it to
be at least 44bits.

Change the L1TF memory size warning to use the new cache_bits field to
avoid bogus warnings and remove the bogus comment about memory size.

Fixes: 17dbca1193 ("x86/speculation/l1tf: Add sysfs reporting for l1tf")
Reported-by: George Anchev <studio@anchev.net>
Reported-by: Christopher Snowhill <kode54@gmail.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Michael Hocko <mhocko@suse.com>
Cc: vbabka@suse.cz
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180824170351.34874-1-andi@firstfloor.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-19 22:49:00 +02:00
..
mcheck x86/MCE: Remove min interval polling limitation 2018-07-25 10:18:15 +02:00
microcode x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug 2018-02-25 11:03:51 +01:00
mtrr x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
.gitignore
amd.c x86/cpufeatures: Add FEATURE_ZEN 2018-07-25 10:18:29 +02:00
bugs.c x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+ 2018-09-19 22:49:00 +02:00
centaur.c x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
common.c x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+ 2018-09-19 22:49:00 +02:00
cpu.h x86/bugs/intel: Set proper CPU features and setup RDS 2018-07-25 10:18:24 +02:00
cyrix.c x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
hypervisor.c hypervisor/x86/xen: Unset X86_BUG_SYSRET_SS_ATTRS on Xen PV guests 2015-05-05 18:27:43 +01:00
intel_cacheinfo.c x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
intel_pt.h perf/x86/intel/pt: Clean up files of Intel Processor Trace 2015-08-12 11:43:22 +02:00
intel.c x86/spectre: Add missing family 6 check to microcode check 2018-09-05 09:18:40 +02:00
Makefile x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
match.c x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
mkcapflags.sh x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
mshyperv.c x86/hyperv: Handle unknown NMIs on one CPU when unknown_nmi_panic 2017-03-30 09:35:19 +02:00
perf_event_amd_ibs.c
perf_event_amd_iommu.c
perf_event_amd_iommu.h
perf_event_amd_uncore.c x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros 2018-06-16 09:54:24 +02:00
perf_event_amd.c x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros 2018-06-16 09:54:24 +02:00
perf_event_intel_bts.c kaiser: fix intel_bts perf crashes 2018-02-03 17:04:25 +01:00
perf_event_intel_cqm.c perf/x86/cqm: Fix CQM memory leak and notifier leak 2016-09-15 08:27:46 +02:00
perf_event_intel_cstate.c perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr 2018-05-16 10:06:52 +02:00
perf_event_intel_ds.c KPTI: Rename to PAGE_TABLE_ISOLATION 2018-01-05 15:44:26 +01:00
perf_event_intel_lbr.c perf/x86: Fix LBR related crashes on Intel Atom 2017-08-24 17:02:36 -07:00
perf_event_intel_pt.c perf/x86/intel/pt: Generate PMI in the STOP region as well 2016-06-01 12:15:47 -07:00
perf_event_intel_rapl.c perf/x86/intel/rapl: Remove the unused RAPL_EVENT_DESC() macro 2015-11-12 09:44:25 +01:00
perf_event_intel_uncore_nhmex.c perf/x86/intel/uncore: Correct fixed counter index check for NHM 2018-08-06 16:24:32 +02:00
perf_event_intel_uncore_snb.c perf/x86/intel/uncore: Fix multi-segment problem of perf_event_intel_uncore 2015-10-06 17:31:51 +02:00
perf_event_intel_uncore_snbep.c perf/x86/intel/uncore: Fix multi-segment problem of perf_event_intel_uncore 2015-10-06 17:31:51 +02:00
perf_event_intel_uncore.c perf/x86/intel/uncore: Correct fixed counter index check in generic code 2018-08-06 16:24:32 +02:00
perf_event_intel_uncore.h perf/x86/intel/uncore: Fix multi-segment problem of perf_event_intel_uncore 2015-10-06 17:31:51 +02:00
perf_event_intel.c perf/x86/intel: Don't accidentally clear high bits in bdw_limit_period() 2018-03-28 18:40:16 +02:00
perf_event_knc.c perf/x86/intel: Fix PEBS warning by only restoring active PMU in pmi 2016-04-12 09:09:06 -07:00
perf_event_msr.c perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver 2018-05-16 10:06:52 +02:00
perf_event_p4.c
perf_event_p6.c
perf_event.c perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map() 2018-05-16 10:06:52 +02:00
perf_event.h perf/x86/intel: Fix PEBS data source interpretation on Nehalem/Westmere 2016-04-12 09:09:06 -07:00
perfctr-watchdog.c
powerflags.c
proc.c x86/cpu: Change type of x86_cache_size variable to unsigned int 2018-02-22 15:44:59 +01:00
rdrand.c
scattered.c x86/cpufeature: Move some of the scattered feature bits to x86_capability 2018-07-17 11:31:44 +02:00
topology.c
transmeta.c x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
umc.c
vmware.c