summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/scattered.c
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2020-08-24 21:11:20 +0200
committerBorislav Petkov <bp@suse.de>2020-08-26 17:46:12 +0200
commite48cb1a3fb9165009fe318e1db2fde10d303c1d3 (patch)
tree72288e2501e3010113c871b76428c915877192ba /arch/x86/kernel/cpu/scattered.c
parentcacheinfo: Move resctrl's get_cache_id() to the cacheinfo header file (diff)
downloadlinux-e48cb1a3fb9165009fe318e1db2fde10d303c1d3.tar.xz
linux-e48cb1a3fb9165009fe318e1db2fde10d303c1d3.zip
x86/resctrl: Enumerate per-thread MBA controls
Some systems support per-thread Memory Bandwidth Allocation (MBA) which applies a throttling delay value to each hardware thread instead of to a core. Per-thread MBA is enumerated by CPUID. No feature flag is shown in /proc/cpuinfo. User applications need to check a resctrl throttling mode info file to know if the feature is supported. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Babu Moger <babu.moger@amd.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Link: https://lkml.kernel.org/r/1598296281-127595-2-git-send-email-fenghua.yu@intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/scattered.c')
-rw-r--r--arch/x86/kernel/cpu/scattered.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c
index 62b137c3c97a..bccfc9ff3cc1 100644
--- a/arch/x86/kernel/cpu/scattered.c
+++ b/arch/x86/kernel/cpu/scattered.c
@@ -35,6 +35,7 @@ static const struct cpuid_bit cpuid_bits[] = {
{ X86_FEATURE_CDP_L3, CPUID_ECX, 2, 0x00000010, 1 },
{ X86_FEATURE_CDP_L2, CPUID_ECX, 2, 0x00000010, 2 },
{ X86_FEATURE_MBA, CPUID_EBX, 3, 0x00000010, 0 },
+ { X86_FEATURE_PER_THREAD_MBA, CPUID_ECX, 0, 0x00000010, 3 },
{ X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 },
{ X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 },
{ X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 },