The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Babu Moger <babu.moger@amd.com>
To: corbet@lwn.net, tony.luck@intel.com, reinette.chatre@intel.com,
	Dave.Martin@arm.com, james.morse@arm.com, tglx@kernel.org,
	bp@alien8.de, ben.horgan@arm.com, fenghuay@nvidia.com
Cc: skhan@linuxfoundation.org, x86@kernel.org, mingo@redhat.com,
	dave.hansen@linux.intel.com, hpa@zytor.com,
	akpm@linux-foundation.org, rdunlap@infradead.org,
	peterz@infradead.org, feng.tang@linux.alibaba.com,
	dapeng1.mi@linux.intel.com, elver@google.com,
	enelsonmoore@gmail.com, kuba@kernel.org, ebiggers@kernel.org,
	lirongqing@baidu.com, seanjc@google.com, nikunj@amd.com,
	xin@zytor.com, pawan.kumar.gupta@linux.intel.com,
	tiala@microsoft.com, chang.seok.bae@intel.com,
	kprateek.nayak@amd.com, prathyushi.nangia@amd.com,
	kim.phillips@amd.com, naveen@kernel.org, darwi@linutronix.de,
	elena.reshetova@intel.com, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas.lendacky@amd.com,
	eranian@google.com, peternewman@google.com,
	qinyuntan@linux.alibaba.com
Subject: Re: [RESEND PATCH v4 01/15] x86/resctrl: Support Privilege Level Zero Association (PLZA)
Date: Wed, 8 Jul 2026 11:55:30 -0500	[thread overview]
Message-ID: <0af5122c-20df-4aea-8ab4-cba63f71dc3b@amd.com> (raw)
In-Reply-To: <d462f5c3d3a4413d4271384f914d1895436f06ac.1783461016.git.babu.moger@amd.com>



On 7/7/26 16:50, Babu Moger wrote:
> Customers have identified an issue while using the QoS resource control
> feature. If memory bandwidth associated with a CLOSID is aggressively
> throttled, and a task with that CLOSID moves into kernel mode, the kernel
> operations are also aggressively throttled. This can stall forward progress
> and eventually degrade overall system performance.
> 
> AMD hardware supports a feature Privilege Level Zero Association (PLZA),
> which allows the CPU's CLOSID association to be changed during the
> transition from user mode to kernel mode. This allows the kernel to run
> using a different CLOSID than user space, which can improve system
> performance in certain scenarios.
> 
> The feature is detected via CPUID_Fn80000020_EBX_x00 [Bit 9]:
> Privilege Level Zero Association (PLZA).
> 
> The PLZA feature details are documented in [1] available from [2].
> 
> [1] AMD64 Zen6 Platform Quality of Service (PQOS) Extensions:
>      Publication # 69193 Revision: 1.00, Issue Date: March 2026
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 # [2]
> Signed-off-by: Babu Moger <babu.moger@amd.com>
> ---
> v4: Split the patch into 2. This patch only handles x86 changes.
>      Re-wrote the changelog along the ABMC changes.
> 
> v3: Code did not change. Patch order changed.
>      Added documentation link.
> 
> v2: Rebased on top of the latest tip.
> ---
>   arch/x86/include/asm/cpufeatures.h | 1 +
>   arch/x86/kernel/cpu/scattered.c    | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
> index 1b4a48bff18f..bf6fc71f87fa 100644
> --- a/arch/x86/include/asm/cpufeatures.h
> +++ b/arch/x86/include/asm/cpufeatures.h
> @@ -517,6 +517,7 @@
>   						      * and purposes if CLEAR_CPU_BUF_VM is set).
>   						      */
>   #define X86_FEATURE_X2AVIC_EXT		(21*32+20) /* AMD SVM x2AVIC support for 4k vCPUs */
> +#define X86_FEATURE_PLZA		(21*32+21) /* Privilege Level Zero Association */
>   
>   /*
>    * BUG word(s)
> diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c
> index 937129ce6a96..1fa4d5aef17e 100644
> --- a/arch/x86/kernel/cpu/scattered.c
> +++ b/arch/x86/kernel/cpu/scattered.c
> @@ -61,6 +61,7 @@ static const struct cpuid_bit cpuid_bits[] = {
>   	{ X86_FEATURE_BMEC,			CPUID_EBX,  3, 0x80000020, 0 },
>   	{ X86_FEATURE_ABMC,			CPUID_EBX,  5, 0x80000020, 0 },
>   	{ X86_FEATURE_SDCIAE,			CPUID_EBX,  6, 0x80000020, 0 },
> +	{ X86_FEATURE_PLZA,			CPUID_EBX,  9, 0x80000020, 0 },
>   	{ X86_FEATURE_TSA_SQ_NO,		CPUID_ECX,  1, 0x80000021, 0 },
>   	{ X86_FEATURE_TSA_L1_NO,		CPUID_ECX,  2, 0x80000021, 0 },
>   	{ X86_FEATURE_AMD_WORKLOAD_CLASS,	CPUID_EAX, 22, 0x80000021, 0 },

Sashiko reported:

--- Patch [1]: [RESEND PATCH v4 01/15] x86/resctrl: Support Privilege 
Level Zero Association (PLZA) ---
commit 0f2aa093b81d7a2e0dc203ce3466562f708898df
Author: Babu Moger <babu.moger@amd.com>
x86/resctrl: Support Privilege Level Zero Association (PLZA)
This commit adds support for AMD's Privilege Level Zero Association (PLZA)
feature. It detects the feature via CPUID_Fn80000020_EBX_x00 [Bit 9] and
adds the corresponding feature flag to the x86 cpufeatures array.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 # [2]
 > diff --git a/arch/x86/include/asm/cpufeatures.h 
b/arch/x86/include/asm/cpufeatures.h
 > index 1b4a48bff18f7..bf6fc71f87fab 100644
 > --- a/arch/x86/include/asm/cpufeatures.h
 > +++ b/arch/x86/include/asm/cpufeatures.h
 > @@ -517,6 +517,7 @@
 >  						      * and purposes if CLEAR_CPU_BUF_VM is set).
 >  						      */
 >  #define X86_FEATURE_X2AVIC_EXT		(21*32+20) /* AMD SVM x2AVIC support 
for 4k vCPUs */
 > +#define X86_FEATURE_PLZA		(21*32+21) /* Privilege Level Zero 
Association */
Should this addition also be mirrored in the tools directory copies of
cpufeatures.h and kcpuid.csv?
If tools/arch/x86/include/asm/cpufeatures.h is not updated to match, 
tools like
perf can generate build warnings during check-headers.sh verification. Also,
without updating tools/arch/x86/kcpuid/cpuid.csv, the kcpuid tool will be
unaware of the new PLZA feature bit when users query CPU capabilities.


I thought tools/arch/x86/include/asm/cpufeatures.h would be synced after 
the changes to arch/x86/include/asm/cpufeatures.h are merged. Has that 
process changed?

If the expectation is to update tools/arch/x86/include/asm/cpufeatures.h 
as part of this patch, I can add those changes as well.

Thanks,
Babu


  parent reply	other threads:[~2026-07-08 16:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 21:50 [RESEND PATCH v4 00/15] x86/resctrl: Add kernel-mode (e.g., PLZA) support to the resctrl subsystem Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 01/15] x86/resctrl: Support Privilege Level Zero Association (PLZA) Babu Moger
2026-07-07 22:01   ` Borislav Petkov
2026-07-08 14:51     ` Babu Moger
2026-07-08 17:27       ` Borislav Petkov
2026-07-08 16:55   ` Babu Moger [this message]
2026-07-08 23:28     ` Borislav Petkov
2026-07-09  0:00       ` Namhyung Kim
2026-07-09  0:12         ` Borislav Petkov
2026-07-07 21:50 ` [RESEND PATCH v4 02/15] x86/resctrl: Add PLZA support to command-line options Babu Moger
2026-07-08 17:39   ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 03/15] x86/resctrl: Add data structures and definitions for PLZA configuration Babu Moger
2026-07-08 20:20   ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 04/15] fs/resctrl: Introduce kernel mode (kmode) data structures Babu Moger
2026-07-08 20:56   ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 05/15] x86,fs/resctrl: Introduce architecture hooks to program kernel-mode Babu Moger
2026-07-08 23:04   ` Moger, Babu
2026-07-07 21:50 ` [RESEND PATCH v4 06/15] fs/resctrl: Introduce resctrl_set_kmode_support() to initialize supported modes Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 07/15] x86/resctrl: Expose the supported PLZA kernel-mode policies during init Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 08/15] fs/resctrl: Add interface to display supported and active kernel-mode policy Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 09/15] fs/resctrl: Introduce kmode_cpus/kmode_cpus_list per rdtgroup Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 10/15] fs/resctrl: Reset the kernel-mode binding when an rdtgroup is removed Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 11/15] fs/resctrl: Program kernel-mode binding when CPU comes online Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 12/15] fs/resctrl: Hide kmode_cpus[_list] on groups not bound to kernel-mode Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 13/15] fs/resctrl: Add interface to modify kernel-mode via info/kernel_mode Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 14/15] fs/resctrl: Allow user space to write kmode_cpus/kmode_cpus_list Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 15/15] fs/resctrl: Add documentation on kernel_mode with example Babu Moger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0af5122c-20df-4aea-8ab4-cba63f71dc3b@amd.com \
    --to=babu.moger@amd.com \
    --cc=Dave.Martin@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=chang.seok.bae@intel.com \
    --cc=corbet@lwn.net \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=darwi@linutronix.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=ebiggers@kernel.org \
    --cc=elena.reshetova@intel.com \
    --cc=elver@google.com \
    --cc=enelsonmoore@gmail.com \
    --cc=eranian@google.com \
    --cc=feng.tang@linux.alibaba.com \
    --cc=fenghuay@nvidia.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=kim.phillips@amd.com \
    --cc=kprateek.nayak@amd.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=mingo@redhat.com \
    --cc=naveen@kernel.org \
    --cc=nikunj@amd.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peternewman@google.com \
    --cc=peterz@infradead.org \
    --cc=prathyushi.nangia@amd.com \
    --cc=qinyuntan@linux.alibaba.com \
    --cc=rdunlap@infradead.org \
    --cc=reinette.chatre@intel.com \
    --cc=seanjc@google.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=tiala@microsoft.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox