lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bfb14b6-5ffc-4d3e-85d1-7e6104f8ec8c@intel.com>
Date: Tue, 2 Dec 2025 08:21:36 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghuay@...dia.com>, "Maciej
 Wieczor-Retman" <maciej.wieczor-retman@...el.com>, Peter Newman
	<peternewman@...gle.com>, James Morse <james.morse@....com>, Babu Moger
	<babu.moger@....com>, Drew Fustini <dfustini@...libre.com>, Dave Martin
	<Dave.Martin@....com>, Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
	<patches@...ts.linux.dev>
Subject: Re: [PATCH v14 20/32] x86/resctrl: Read telemetry events

Hi Tony,

On 11/24/25 10:53 AM, Tony Luck wrote:
> Introduce intel_aet_read_event() to read telemetry events for resource
> RDT_RESOURCE_PERF_PKG. There may be multiple aggregators tracking each package,
> so scan all of them and add up all counters. Aggregators may return an invalid
> data indication if they have received no records for a given RMID. User will
> see "Unavailable" if none of the aggregators on a package provide valid counts.
> 
> Resctrl now uses readq() so depends on X86_64. Update Kconfig.
> 
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---

...

> diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c
> index b6b50650e634..bf3c70590d4c 100644
> --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c
> +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c
> @@ -12,13 +12,17 @@
>  #define pr_fmt(fmt)   "resctrl: " fmt
>  
>  #include <linux/array_size.h>
> +#include <linux/bits.h>
>  #include <linux/cleanup.h>
>  #include <linux/compiler_types.h>
> +#include <linux/container_of.h>
>  #include <linux/cpu.h>
>  #include <linux/err.h>
> +#include <linux/errno.h>
>  #include <linux/init.h>
>  #include <linux/intel_pmt_features.h>
>  #include <linux/intel_vsec.h>
> +#include <linux/io.h>
>  #include <linux/overflow.h>
>  #include <linux/printk.h>
>  #include <linux/resctrl.h>
> @@ -221,3 +225,50 @@ void __exit intel_aet_exit(void)
>  		}
>  	}
>  }
> +
> +#define DATA_VALID	BIT_ULL(63)
> +#define DATA_BITS	GENMASK_ULL(62, 0)
> +
> +/*
> + * Read counter for an event on a domain (summing all aggregators
> + * on the domain). If an aggregator hasn't received any data for a
> + * specific RMID, the MMIO read indicates that data is not valid.
> + * Return success if at least one aggregator has valid data.

unnecessary short lines

> + */
> +int intel_aet_read_event(int domid, u32 rmid, void *arch_priv, u64 *val)
> +{

| Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>

Reinette


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ