1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/arch/x86/kernel/cpu
Peter Newman a547a5880c x86/resctrl: Fix arch_mbm_* array overrun on SNC
When using resctrl on systems with Sub-NUMA Clustering enabled, monitoring
groups may be allocated RMID values which would overrun the
arch_mbm_{local,total} arrays.

This is due to inconsistencies in whether the SNC-adjusted num_rmid value or
the unadjusted value in resctrl_arch_system_num_rmid_idx() is used. The
num_rmid value for the L3 resource is currently:

  resctrl_arch_system_num_rmid_idx() / snc_nodes_per_l3_cache

As a simple fix, make resctrl_arch_system_num_rmid_idx() return the
SNC-adjusted, L3 num_rmid value on x86.

Fixes: e13db55b5a ("x86/resctrl: Introduce snc_nodes_per_l3_cache")
Signed-off-by: Peter Newman <peternewman@google.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/r/20240822190212.1848788-1-peternewman@google.com
2024-08-28 11:13:08 +02:00
..
mce - Flip the logic to add feature names to /proc/cpuinfo to having to 2024-07-15 20:25:16 -07:00
microcode - Fix a clang-15 build warning and other cleanups 2024-05-14 09:09:32 -07:00
mtrr x86/mtrr: Check if fixed MTRRs exist before saving them 2024-08-08 17:03:12 +02:00
resctrl x86/resctrl: Fix arch_mbm_* array overrun on SNC 2024-08-28 11:13:08 +02:00
sgx mm: switch mm->get_unmapped_area() to a flag 2024-04-25 20:56:25 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
acrn.c x86/traps: Add sysvec_install() to install a system interrupt handler 2024-01-31 22:02:36 +01:00
amd.c x86/CPU/AMD: Add models 0x60-0x6f to the Zen5 range 2024-07-30 15:22:52 +02:00
aperfmperf.c x86/aperfmperf: Fix deadlock on cpu_hotplug_lock 2024-07-29 15:32:37 +02:00
bugs.c x86/bugs: Add 'spectre_bhi=vmexit' cmdline option 2024-06-28 15:35:54 +02:00
cacheinfo.c - Relax the PAT MSR programming which was unnecessarily using the MTRR 2024-03-11 17:27:12 -07:00
centaur.c x86/cpu: Use common topology code for Centaur and Zhaoxin 2024-02-15 22:07:37 +01:00
common.c x86/topology/intel: Unlock CPUID before evaluating anything 2024-05-31 20:25:56 +02:00
cpu.h x86/topology/intel: Unlock CPUID before evaluating anything 2024-05-31 20:25:56 +02:00
cpuid-deps.c - Switch the in-place instruction patching which lead to at least one weird bug 2024-05-14 08:51:37 -07:00
cyrix.c x86/cyrix: include header linux/isa-dma.h 2022-07-26 14:03:12 -05:00
debugfs.c x86/cpu/topology: Get rid of cpuinfo::x86_max_cores 2024-02-16 15:51:32 +01:00
feat_ctl.c x86/cpu: Add a VMX flag to enumerate 5-level EPT support to userspace 2024-02-22 16:03:56 -08:00
hygon.c x86/cpu: Use common topology code for HYGON 2024-02-15 22:07:38 +01:00
hypervisor.c x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable 2019-07-17 08:09:59 +02:00
intel.c - Flip the logic to add feature names to /proc/cpuinfo to having to 2024-07-15 20:25:16 -07:00
intel_epb.c x86/cpu/intel_epb: Switch to new Intel CPU model defines 2024-04-29 10:31:16 +02:00
Makefile x86/pconfig: Remove unused MKTME pconfig code 2024-05-28 08:45:17 -07:00
match.c x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL 2024-05-22 11:31:10 +02:00
mkcapflags.sh x86/cpufeatures: Flip the /proc/cpuinfo appearance logic 2024-06-20 21:04:22 +02:00
mshyperv.c hyperv-next for v6.9 2024-03-21 10:01:02 -07:00
perfctr-watchdog.c x86/nmi_watchdog: Fix old-style NMI watchdog regression on old Intel CPUs 2021-06-10 10:04:40 +02:00
powerflags.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.c x86/cpu: Move cpu_core_id into topology info 2023-10-10 14:38:17 +02:00
rdrand.c x86/msr: Prepare for including <linux/percpu.h> into <asm/msr.h> 2024-03-04 12:01:39 +01:00
scattered.c x86/cpufeatures: Add AMD FAST CPPC feature flag 2024-06-11 16:12:12 -05:00
topology.c x86/topology: Handle bogus ACPI tables correctly 2024-05-21 14:52:35 +02:00
topology.h x86/cpu/topology: Retrieve cores per package from topology bitmaps 2024-02-15 22:07:45 +01:00
topology_amd.c x86/topology/amd: Evaluate SMT in CPUID leaf 0x8000001e only on family 0x17 and greater 2024-05-30 15:58:55 +02:00
topology_common.c x86/topology: Don't evaluate logical IDs during early boot 2024-03-23 12:28:06 +01:00
topology_ext.c x86/cpu/topology: Add support for the AMD 0x80000026 leaf 2024-03-22 11:22:14 +01:00
transmeta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tsx.c x86/cpu: Remove redundant extern x86_read_arch_cap_msr() 2023-01-10 12:40:24 +01:00
umc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
umwait.c x86/umwait: move to use bus_get_dev_root() 2023-03-17 15:29:29 +01:00
vmware.c x86/vmware: Add TDX hypercall support 2024-06-25 17:15:48 +02:00
vortex.c x86/CPU: Add support for Vortex CPUs 2021-10-21 15:49:07 +02:00
zhaoxin.c x86/cpu: Use common topology code for Centaur and Zhaoxin 2024-02-15 22:07:37 +01:00