Add a new resctrl info file, plza_capable, to report whether a resource supports the PLZA capability. Allows user to query PLZA support directly through resctrl without having to infer it from other resource attributes. Signed-off-by: Babu Moger --- Documentation/filesystems/resctrl.rst | 17 +++++++++++++++++ fs/resctrl/rdtgroup.c | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst index 3d66814a1d7f..1de55b5cb0e3 100644 --- a/Documentation/filesystems/resctrl.rst +++ b/Documentation/filesystems/resctrl.rst @@ -30,6 +30,7 @@ ABMC (Assignable Bandwidth Monitoring Counters) "" SDCIAE (Smart Data Cache Injection Allocation Enforcement) "" GMBA (Global Memory Bandwidth Allocation) "" GSMBA (Global Slow Memory Bandwidth Allocation) "" +PLZA (Privilege Level Zero association) "" =============================================================== ================================ Historically, new features were made visible by default in /proc/cpuinfo. This @@ -151,6 +152,22 @@ related to allocation: "1": Non-contiguous 1s value in CBM is supported. +"plza_capable": + Indicates the availability of Privilege Level Zero Association (PLZA). + PLZA is a hardware feature that enables automatic association of execution + at Privilege Level Zero (CPL=0) with a designated Class of Service + Identifier (CLOSID) and/or Resource Monitoring Identifier (RMID). + This mechanism allows the system to override the default per-thread + association for threads operating at CPL=0 when necessary. Additionally, + PLZA provides configuration capabilities for defining a dedicated resource + control group and assigning CPUs and tasks to operate under CLOSID + constraints reserved exclusively for PLZA. + + "1": + Resource supports the feature. + "0": + Support not available for this resource. + "io_alloc": "io_alloc" enables system software to configure the portion of the cache allocated for I/O traffic. File may only exist if the diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index fc034f4481e3..d773bf77bcc6 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -1260,6 +1260,16 @@ static ssize_t max_threshold_occ_write(struct kernfs_open_file *of, return nbytes; } +static int rdt_plza_show(struct kernfs_open_file *of, struct seq_file *seq, void *v) +{ + struct resctrl_schema *s = rdt_kn_parent_priv(of->kn); + struct rdt_resource *r = s->res; + + seq_printf(seq, "%d\n", r->plza_capable); + + return 0; +} + /* * rdtgroup_mode_show - Display mode of this resource group */ @@ -1991,6 +2001,13 @@ static struct rftype res_common_files[] = { .seq_show = rdt_delay_linear_show, .fflags = RFTYPE_CTRL_INFO | RFTYPE_RES_MB, }, + { + .name = "plza_capable", + .mode = 0444, + .kf_ops = &rdtgroup_kf_single_ops, + .seq_show = rdt_plza_show, + .fflags = RFTYPE_CTRL_INFO, + }, /* * Platform specific which (if any) capabilities are provided by * thread_throttle_mode. Defer "fflags" initialization to platform -- 2.34.1