mirror_ubuntu-kernels/arch/x86/kernel/cpu
Tony Luck e3ca96e479 x86/resctrl: Pass domain to target CPU
reset_all_ctrls() and resctrl_arch_update_domains() use on_each_cpu_mask()
to call rdt_ctrl_update() on potentially one CPU from each domain.

But this means rdt_ctrl_update() needs to figure out which domain to
apply changes to. Doing so requires a search of all domains in a resource,
which can only be done safely if cpus_lock is held. Both callers do hold
this lock, but there isn't a way for a function called on another CPU
via IPI to verify this.

Commit

  c0d848fcb0 ("x86/resctrl: Remove lockdep annotation that triggers
  false positive")

removed the incorrect assertions.

Add the target domain to the msr_param structure and call
rdt_ctrl_update() for each domain separately using
smp_call_function_single(). This means that rdt_ctrl_update() doesn't
need to search for the domain and get_domain_from_cpu() can safely
assert that the cpus_lock is held since the remaining callers do not use
IPI.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: James Morse <james.morse@arm.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Tested-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Link: https://lore.kernel.org/r/20240308213846.77075-2-tony.luck@intel.com
2024-04-24 13:41:41 +02:00
..
mce x86/mce: Make sure to grab mce_sysfs_mutex in set_bank() 2024-04-04 17:25:15 +02:00
microcode x86/cpu/topology: Get rid of cpuinfo::x86_max_cores 2024-02-16 15:51:32 +01:00
mtrr x86/CPU/AMD: Track SNP host status with cc_platform_*() 2024-04-04 10:40:30 +02:00
resctrl x86/resctrl: Pass domain to target CPU 2024-04-24 13:41:41 +02:00
sgx arch/x86: Fix typos 2024-01-03 11:46:22 +01:00
.gitignore
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: Move TOPOEXT enablement into the topology parser 2024-04-12 12:05:54 +02:00
aperfmperf.c x86/aperfmperf: Erase stale arch_freq_scale values when disabling frequency invariance readings 2023-01-16 10:19:15 +01:00
bugs.c x86/bugs: Fix BHI retpoline check 2024-04-14 11:10:05 +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/bugs: Rename various 'ia32_cap' variables to 'x86_arch_cap_msr' 2024-04-11 10:30:33 +02:00
cpu.h x86/cpu: Use common topology code for HYGON 2024-02-15 22:07:38 +01:00
cpuid-deps.c x86/cpufeatures: Fix dependencies for GFNI, VAES, and VPCLMULQDQ 2024-04-18 17:27:52 +02: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
intel_epb.c x86/cpu/intel_epb: Don't rely on link order 2023-11-24 13:54:31 +01:00
intel_pconfig.c x86/msr: Prepare for including <linux/percpu.h> into <asm/msr.h> 2024-03-04 12:01:39 +01:00
intel.c Merge branch 'x86/urgent' into x86/apic, to resolve conflicts 2024-02-27 10:09:49 +01:00
Makefile x86/cpu/topology: Move registration out of APIC code 2024-02-15 22:07:41 +01:00
match.c
mkcapflags.sh
mshyperv.c hyperv-next for v6.9 2024-03-21 10:01:02 -07:00
perfctr-watchdog.c
powerflags.c
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/bhi: Define SPEC_CTRL_BHI_DIS_S 2024-04-08 19:27:05 +02:00
topology_amd.c x86/cpu/amd: Move TOPOEXT enablement into the topology parser 2024-04-12 12:05:54 +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: Provide a sane leaf 0xb/0x1f parser 2024-02-15 22:07:37 +01:00
topology.c x86/topology: Don't update cpu_possible_map in topo_set_cpuids() 2024-04-10 15:31:38 +02:00
topology.h x86/cpu/topology: Retrieve cores per package from topology bitmaps 2024-02-15 22:07:45 +01:00
transmeta.c
tsx.c x86/cpu: Remove redundant extern x86_read_arch_cap_msr() 2023-01-10 12:40:24 +01:00
umc.c
umwait.c x86/umwait: move to use bus_get_dev_root() 2023-03-17 15:29:29 +01:00
vmware.c sched/clock/x86: Mark sched_clock() noinstr 2023-01-31 15:01:47 +01: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