Skip to content

Commit 32d736a

Browse files
rchatreKAGA-KOKO
authored andcommitted
x86/intel_rdt: Do not allow pseudo-locking of MBA resource
A system supporting pseudo-locking may have MBA as well as CAT resources of which only the CAT resources could support cache pseudo-locking. When the schemata to be pseudo-locked is provided it should be checked that that schemata does not attempt to pseudo-lock a MBA resource. Fixes: e0bdfe8 ("x86/intel_rdt: Support creation/removal of pseudo-locked region") Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: "H Peter Anvin" <hpa@zytor.com> Cc: "Tony Luck" <tony.luck@intel.com> Cc: "Xiaochen Shen" <xiaochen.shen@intel.com> Cc: "Chen Yu" <yu.c.chen@intel.com> Link: https://lkml.kernel.org/r/1537048707-76280-7-git-send-email-fenghua.yu@intel.com
1 parent 70479c0 commit 32d736a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ static int parse_line(char *line, struct rdt_resource *r,
195195
struct rdt_domain *d;
196196
unsigned long dom_id;
197197

198+
if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP &&
199+
r->rid == RDT_RESOURCE_MBA) {
200+
rdt_last_cmd_puts("Cannot pseudo-lock MBA resource\n");
201+
return -EINVAL;
202+
}
203+
198204
next:
199205
if (!line || line[0] == '\0')
200206
return 0;

0 commit comments

Comments
 (0)