From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4850F4A32; Wed, 11 Feb 2026 15:19:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770823184; cv=none; b=AFOo3/rdb1sqImhNblCGIJ7OKooddJC9vVCmYCf+5ObtZpKdmgjXcI2gHe9Pqp0lDIdccMHIZJrin7wnBbX1OjwRfUuE8NnEbPP8gyKCPusFRL2jft2Y8LHVTUdvl1mi9lci9bFN6YDLYQd6llwlFqdQgvEIA4aOpRvIxoMd3kM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770823184; c=relaxed/simple; bh=KS1e7CmG0w1tPJUBX/Ojww7iQLgyqXI8VM7PXu/UY2k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=R7/dpQ1Kla3p0iTRgwIUP9k/+UQeS3E/or3tCo71fCuwAfgdWyT/ZirNrlRF2gRrFqdr0x+6ZUsJXVv6AYVdMj4DxiALR5PsCBCu82o2jpHYDiIhvXnRg1YCO5h2KtUT5n5SZyJnKRSqGFEaplfWBnN5AhoY1PW8bcFuWeM/TFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 47853339; Wed, 11 Feb 2026 07:19:36 -0800 (PST) Received: from [10.1.196.46] (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0706C3F63F; Wed, 11 Feb 2026 07:19:35 -0800 (PST) Message-ID: Date: Wed, 11 Feb 2026 15:19:34 +0000 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 09/19] x86/resctrl: Add plza_capable in rdt_resource data structure To: Babu Moger , corbet@lwn.net, tony.luck@intel.com, reinette.chatre@intel.com, Dave.Martin@arm.com, james.morse@arm.com, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, hpa@zytor.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, akpm@linux-foundation.org, pawan.kumar.gupta@linux.intel.com, pmladek@suse.com, feng.tang@linux.alibaba.com, kees@kernel.org, arnd@arndb.de, fvdl@google.com, lirongqing@baidu.com, bhelgaas@google.com, seanjc@google.com, xin@zytor.com, manali.shukla@amd.com, dapeng1.mi@linux.intel.com, chang.seok.bae@intel.com, mario.limonciello@amd.com, naveen@kernel.org, elena.reshetova@intel.com, thomas.lendacky@amd.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, peternewman@google.com, eranian@google.com, gautham.shenoy@amd.com References: <7b7507eac245988473e7b769a559bd193321e046.1769029977.git.babu.moger@amd.com> From: Ben Horgan Content-Language: en-US In-Reply-To: <7b7507eac245988473e7b769a559bd193321e046.1769029977.git.babu.moger@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Babu, On 1/21/26 21:12, Babu Moger wrote: > Add plza_capable field to the rdt_resource structure to indicate whether > Privilege Level Zero Association (PLZA) is supported for that resource > type. > > Signed-off-by: Babu Moger > --- > arch/x86/kernel/cpu/resctrl/core.c | 6 ++++++ > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 5 +++++ > include/linux/resctrl.h | 3 +++ > 3 files changed, 14 insertions(+) > > diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > index 2de3140dd6d1..e41fe5fa3f30 100644 > --- a/arch/x86/kernel/cpu/resctrl/core.c > +++ b/arch/x86/kernel/cpu/resctrl/core.c > @@ -295,6 +295,9 @@ static __init bool __rdt_get_mem_config_amd(struct rdt_resource *r) > > r->alloc_capable = true; > > + if (rdt_cpu_has(X86_FEATURE_PLZA)) > + r->plza_capable = true; > + > return true; > } > > @@ -314,6 +317,9 @@ static void rdt_get_cache_alloc_cfg(int idx, struct rdt_resource *r) > if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) > r->cache.arch_has_sparse_bitmasks = ecx.split.noncont; > r->alloc_capable = true; > + > + if (rdt_cpu_has(X86_FEATURE_PLZA)) > + r->plza_capable = true; > } > > static void rdt_get_cdp_config(int level) > diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > index 885026468440..540e1e719d7f 100644 > --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c > +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > @@ -229,6 +229,11 @@ bool resctrl_arch_get_cdp_enabled(enum resctrl_res_level l) > return rdt_resources_all[l].cdp_enabled; > } > > +bool resctrl_arch_get_plza_capable(enum resctrl_res_level l) > +{ > + return rdt_resources_all[l].r_resctrl.plza_capable; > +} > + > void resctrl_arch_reset_all_ctrls(struct rdt_resource *r) > { > struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r); > diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > index 63d74c0dbb8f..ae252a0e6d92 100644 > --- a/include/linux/resctrl.h > +++ b/include/linux/resctrl.h > @@ -319,6 +319,7 @@ struct resctrl_mon { > * @name: Name to use in "schemata" file. > * @schema_fmt: Which format string and parser is used for this schema. > * @cdp_capable: Is the CDP feature available on this resource > + * @plza_capable: Is Privilege Level Zero Association capable? > */ > struct rdt_resource { > int rid; > @@ -334,6 +335,7 @@ struct rdt_resource { > char *name; > enum resctrl_schema_fmt schema_fmt; > bool cdp_capable; > + bool plza_capable; Why are you making plza a resource property? Certainly for MPAM we'd want this to be global across resources and I see above that you are just checking a cpu property rather then anything per resource. > }; > > /* > @@ -481,6 +483,7 @@ static inline u32 resctrl_get_config_index(u32 closid, > > bool resctrl_arch_get_cdp_enabled(enum resctrl_res_level l); > int resctrl_arch_set_cdp_enabled(enum resctrl_res_level l, bool enable); > +bool resctrl_arch_get_plza_capable(enum resctrl_res_level l); > > /** > * resctrl_arch_mbm_cntr_assign_enabled() - Check if MBM counter assignment Thanks, Ben