Re: [PATCH v5 2/2] x86/resctrl: Read supported bandwidth sources using CPUID command

From: Reinette Chatre
Date: Tue Jan 16 2024 - 14:56:00 EST


Hi Babu,

On 1/15/2024 2:52 PM, Babu Moger wrote:
> If the BMEC (Bandwidth Monitoring Event Configuration) feature is
> supported, the bandwidth events can be configured. The maximum supported
> bandwidth bitmask can be determined by following CPUID command.
>
> CPUID_Fn80000020_ECX_x03 [Platform QoS Monitoring Bandwidth Event
> Configuration] Read-only. Reset: 0000_007Fh.
> Bits Description
> 31:7 Reserved
> 6:0 Identifies the bandwidth sources that can be tracked.
>
> The bandwidth sources can change with the processor generations.
> Read the supported bandwidth sources using the CPUID command.
>
> While at it, move the mask checking to mon_config_write() before
> iterating over all the domains. Also, print the valid bitmask when
> the user tries to configure invalid event configuration value.
>
> The CPUID details are documented in the PPR listed below [1].
> [1] Processor Programming Reference (PPR) Vol 1.1 for AMD Family 19h Model
> 11h B1 - 55901 Rev 0.25.
>
> Fixes: dc2a3e857981 ("x86/resctrl: Add interface to read mbm_total_bytes_config")
> Signed-off-by: Babu Moger <babu.moger@xxxxxxx>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537
> ---

Thank you.

Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Reinette