linux/arch/x86/kernel/cpu
James Morse 6eac36bb9e x86/resctrl: Allocate the cleanest CLOSID by searching closid_num_dirty_rmid
MPAM's PMG bits extend its PARTID space, meaning the same PMG value can be used
for different control groups.

This means once a CLOSID is allocated, all its monitoring ids may still be
dirty, and held in limbo.

Instead of allocating the first free CLOSID, on architectures where
CONFIG_RESCTRL_RMID_DEPENDS_ON_CLOSID is enabled, search
closid_num_dirty_rmid[] to find the cleanest CLOSID.

The CLOSID found is returned to closid_alloc() for the free list
to be updated.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Tested-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Tested-by: Carl Worth <carl@os.amperecomputing.com> # arm64
Link: https://lore.kernel.org/r/20240213184438.16675-11-james.morse@arm.com
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
2024-02-16 19:18:32 +01:00
..
mce - Add support managing TDX host hardware 2024-01-18 13:41:48 -08:00
microcode x86/microcode/intel: Set new revision only after a successful update 2023-12-03 11:49:53 +01:00
mtrr x86/mtrr: Document missing function parameters in kernel-doc 2023-11-20 10:19:27 +01:00
resctrl x86/resctrl: Allocate the cleanest CLOSID by searching closid_num_dirty_rmid 2024-02-16 19:18:32 +01:00
sgx arch/x86: Fix typos 2024-01-03 11:46:22 +01:00
.gitignore
acrn.c x86/apic: Nuke ack_APIC_irq() 2023-08-09 11:58:34 -07:00
amd.c - Add synthetic X86_FEATURE flags for the different AMD Zen generations 2024-01-08 15:45:31 -08: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/srso: Remove unnecessary semicolon 2023-10-20 12:50:35 +02:00
cacheinfo.c x86/cpu: Move cpu_l[l2]c_id into topology info 2023-10-10 14:38:18 +02:00
centaur.c
common.c - Add support managing TDX host hardware 2024-01-18 13:41:48 -08:00
cpu.h x86/cpu: Move cpu_l[l2]c_id into topology info 2023-10-10 14:38:18 +02:00
cpuid-deps.c x86/cpufeatures: Add CPU feature flags for shadow stacks 2023-07-11 14:12:18 -07:00
cyrix.c x86/cyrix: include header linux/isa-dma.h 2022-07-26 14:03:12 -05:00
debugfs.c x86/cpu: Provide debug interface 2023-10-10 14:38:19 +02:00
feat_ctl.c x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype 2022-09-26 17:06:27 +02:00
hygon.c x86/barrier: Do not serialize MSR accesses on AMD 2023-11-13 10:09:45 +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
intel.c sysctl-6.7-rc1 2023-11-01 20:51:41 -10:00
Makefile x86/cpu: Provide debug interface 2023-10-10 14:38:19 +02:00
match.c
mkcapflags.sh
mshyperv.c x86/hyperv: Use atomic_try_cmpxchg() to micro-optimize hv_nmi_unknown() 2023-11-22 03:47:44 +00: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
proc.c x86/cpu: Move cpu_core_id into topology info 2023-10-10 14:38:17 +02:00
rdrand.c x86/rdrand: Remove "nordrand" flag in favor of "random.trust_cpu" 2022-07-18 15:04:04 +02:00
scattered.c x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag 2023-01-23 17:38:31 +01:00
topology.c x86/cpu: Move cpu_core_id into topology info 2023-10-10 14:38:17 +02: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: Remove pointless evaluation of x86_coreid_bits 2023-10-10 14:38:18 +02:00