mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghuay@nvidia.com>
To: Xiaochen Shen <shenxiaochen@open-hieco.net>,
	tony.luck@intel.com, reinette.chatre@intel.com, bp@alien8.de
Cc: babu.moger@amd.com, james.morse@arm.com, Dave.Martin@arm.com,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86/resctrl: Add missing resctrl initialization for Hygon
Date: Fri, 5 Dec 2025 19:30:58 -0800	[thread overview]
Message-ID: <d3e960af-8df0-4c62-894d-be040d67ea19@nvidia.com> (raw)
In-Reply-To: <20251204023750.994143-2-shenxiaochen@open-hieco.net>

Hi, Xiaochen,

On 12/3/25 18:37, Xiaochen Shen wrote:
> Hygon CPUs supporting Platform QoS features currently undergo partial
> resctrl initialization through resctrl_cpu_detect() in the Hygon BSP
> init helper and AMD/Hygon common initialization code. However, several
> critical data structures remain uninitialized for Hygon CPUs in the
> following paths:
> 
>   - get_mem_config()-> __rdt_get_mem_config_amd():
>       rdt_resource::membw,alloc_capable
>       hw_res::num_closid
> 
>   - rdt_init_res_defs()->rdt_init_res_defs_amd():
>       rdt_resource::cache
>       hw_res::msr_base,msr_update
> 
> Add the missing AMD/Hygon common initialization to ensure proper
> Platform QoS functionality on Hygon CPUs.
> 
> Fixes: d8df126349da ("x86/cpu/hygon: Add missing resctrl_cpu_detect() in bsp_init helper")

This commit triggers the issue on Hygon. You may keep this fix.

> Fixes: 923f3a2b48bd ("x86/resctrl: Query LLC monitoring properties once during boot")
This commit just calls resctrl_cpu_detect() on AMD and Intel. The commit 
itself doesn't have an issue. Remove this Fixes?

> Cc: stable@vger.kernel.org

> Signed-off-by: Xiaochen Shen <shenxiaochen@open-hieco.net>
> ---
>   arch/x86/kernel/cpu/resctrl/core.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
> index 3792ab4819dc..10de1594d328 100644
> --- a/arch/x86/kernel/cpu/resctrl/core.c
> +++ b/arch/x86/kernel/cpu/resctrl/core.c
> @@ -825,7 +825,8 @@ static __init bool get_mem_config(void)
>   
>   	if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
>   		return __get_mem_config_intel(&hw_res->r_resctrl);
> -	else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
> +	else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
> +		 boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
>   		return __rdt_get_mem_config_amd(&hw_res->r_resctrl);
>   
>   	return false;
> @@ -987,7 +988,8 @@ static __init void rdt_init_res_defs(void)
>   {
>   	if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
>   		rdt_init_res_defs_intel();
> -	else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
> +	else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
> +		 boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
>   		rdt_init_res_defs_amd();
>   }
>   

Thanks.

-Fenghua

  reply	other threads:[~2025-12-06  3:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04  2:37 [PATCH 0/2] x86/resctrl: Fix Platform QoS issues " Xiaochen Shen
2025-12-04  2:37 ` [PATCH 1/2] x86/resctrl: Add missing resctrl initialization " Xiaochen Shen
2025-12-06  3:30   ` Fenghua Yu [this message]
2025-12-06 10:47     ` Xiaochen Shen
2025-12-04  2:37 ` [PATCH 2/2] x86/resctrl: Fix memory bandwidth counter width " Xiaochen Shen
2025-12-04 17:11   ` Luck, Tony
2025-12-05  2:38     ` Xiaochen Shen
2025-12-05 20:33       ` Luck, Tony
2025-12-06 16:14         ` Xiaochen Shen
2025-12-07  2:26           ` Xiaochen Shen
2025-12-08 16:52           ` Luck, Tony
2025-12-07  0:56         ` Xiaochen Shen
2025-12-05 21:57       ` Reinette Chatre
2025-12-06 16:19         ` Xiaochen Shen
2025-12-04 23:30 ` [PATCH 0/2] x86/resctrl: Fix Platform QoS issues " Reinette Chatre
2025-12-05  2:47   ` Xiaochen Shen

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=d3e960af-8df0-4c62-894d-be040d67ea19@nvidia.com \
    --to=fenghuay@nvidia.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=shenxiaochen@open-hieco.net \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®