From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A6D61F942 for ; Wed, 19 Aug 2026 23:08:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.15 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787180937; cv=fail; b=fXcPEG7uhTgVOWVk8+UEFkQDmoW+3dTSIJhgQ/bQ2gu8cuCxg06+Uh4lpLoBnoeRnWa2+qDI8FOAEg9ezo3ijnXLFQnKNtnHva58R/tsxpZjPPjTMLFqhxkp+stjyQMmFwVZzLlgKBrCh9N8jL3tugSzx/Df7ImvUKqHFd/ZL9A= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787180937; c=relaxed/simple; bh=JY4qXhJzXIg7T1gO2LHJocSHbpuhiXd8EUG3O5VXWNI=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=am1d5ctJmfK0zTpXsyHoBaYWZuz7AodTL0GK3h6+i3mRWu1EqQLA0WSUodopRHxHPlsrpaj798fnxdwf1oJpAxLve1kZn4Y9krRvMcSlwp9DOrURffl5o6e83/sz8KyRAv5Dnc+Vw8FeIyTuTbqK9ztgLwTJSAkB6V7z/4RqX+I= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NKoOz9W4; arc=fail smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NKoOz9W4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1787180936; x=1818716936; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=JY4qXhJzXIg7T1gO2LHJocSHbpuhiXd8EUG3O5VXWNI=; b=NKoOz9W4pkHTOCVcLeG9WieQJzCTvgzbHpmoOfl9hGDO+UWSnALjKbOl piCMWlq2upbuOwEfd4tXQImQN5dJi8dUxUwBx929v0sE+3mfr4UFfimDU cQCqxanPBiNAzNxsGVH+EypsMnA5jxHdPAjDo38vnvTGXLqLXhyAJx11f X/o1POeFac6buG/X4wNwq/EzD4mgwmOpbuoTrmcdW9hapEXcnqmSiTA9R pRRpfaJHC1RkTrNYiWJq6L8jhtNz/C6ite8UcFdzpZypxuHXbfGmA4zHO rHb59GF3uJlOwL3b5ZAZAS3paXPHYP8WptZIkve5G8IGN3C0YYmUga/mh w==; X-CSE-ConnectionGUID: T9feGIF7RDuR5SKeSTJI5w== X-CSE-MsgGUID: FXGW3xBBQjGI6QVMw4PKLg== X-IronPort-AV: E=McAfee;i="6800,10657,11880"; a="87828810" X-IronPort-AV: E=Sophos;i="6.25,232,1779174000"; d="scan'208";a="87828810" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2026 16:08:56 -0700 X-CSE-ConnectionGUID: l0FtM83ZTb+D2dFEhi11SA== X-CSE-MsgGUID: aUrNUDS3Tval3TLFqeghAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,232,1779174000"; d="scan'208";a="261924765" Received: from fmsmsx903.amr.corp.intel.com ([10.18.126.92]) by fmviesa010.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2026 16:08:55 -0700 Received: from FMSMSX901.amr.corp.intel.com (10.18.126.90) by fmsmsx903.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 19 Aug 2026 16:08:55 -0700 Received: from fmsedg901.ED.cps.intel.com (10.1.192.143) by FMSMSX901.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45 via Frontend Transport; Wed, 19 Aug 2026 16:08:55 -0700 Received: from BYAPR05CU005.outbound.protection.outlook.com (52.101.85.62) by edgegateway.intel.com (192.55.55.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 19 Aug 2026 16:08:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y5rdxz0BF8uQDvyYYiU+9XrG69FoKuOCp1JOnXX7gxmbxR/I6xqDu8U9EW0OrpqPG+/P4gwAkZ/t+9sNn1ZkjpbDCY03K34HQwgdv+XYAdBVprbxBxIwGBE+uU7YIMrFzNAna9AhV0sjx9ncpbjtdWOY7ySW/2uFNGha2UbU7Nd1lN277/vCguUHYieL2RIN6Bt992tH8ojA/cRnoEmOqoP4+Z6OH+HJu0g8zyskrVfy2TW6fy0CQM9PJdiC+sRfEiOQSgc2ItcTGBxFXr8F6BwVO1c4z43caowT2qR00aaxmM5bhElA3vO3x9YoroaAYr8ksCHkLMo2mHN0BSLFIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3Jpg5eL8HwV5a1cSj1kvbuGyd3HBzmmFO55JAS9RQqo=; b=ZsWY1TqWksXU42Si0vW7l8c5j/60X1e5FPoUMlaJBUzScg/YjmGjFMAkRQfzyCVCKoH0cDLxhnORcxw3vM4WUFegoBFgKYB7O0xFynB6EUAQ8cLljrb0YqRvrPg4Himo2VI3HW0jbULQW5gdRBlXruVKFjWkA0SI8zX8UnvlC997qWgTTbcw5hw9jayc/FjhyUWDLPR381wbtT1nLlHwWX3i0tIjvuJItY/Hb1bZON4OqQcAaiF02jc9Gt1OTJSAUXggG2oWmMcKRqYMsYsbmnSOmRospQp47hPc0BqZlBkoZVbBgjHMv/hhVetBr69dt61WMg/ZXDEP0TdW1yHRGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ2PR11MB8370.namprd11.prod.outlook.com (2603:10b6:a03:540::20) by DS0PR11MB7901.namprd11.prod.outlook.com (2603:10b6:8:f4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.339.8; Wed, 19 Aug 2026 23:08:46 +0000 Received: from SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc]) by SJ2PR11MB8370.namprd11.prod.outlook.com ([fe80::b6cf:ce77:3cdf:7cc%5]) with mapi id 15.21.0339.007; Wed, 19 Aug 2026 23:08:46 +0000 Message-ID: Date: Wed, 19 Aug 2026 16:08:44 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 8/9] x86/resctrl: Introduce erdt_cpu_has() and erdt_support() To: Chen Yu , CC: , , , , , , , , , References: <72f90c77f17acf481f6a5cbcd46d8a1e5ee132f0.1784968626.git.yu.c.chen@intel.com> Content-Language: en-US From: Reinette Chatre In-Reply-To: <72f90c77f17acf481f6a5cbcd46d8a1e5ee132f0.1784968626.git.yu.c.chen@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR04CA0246.namprd04.prod.outlook.com (2603:10b6:303:88::11) To SJ2PR11MB8370.namprd11.prod.outlook.com (2603:10b6:a03:540::20) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR11MB8370:EE_|DS0PR11MB7901:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c7de479-1e0a-49af-7e1a-08defe46d23c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|23010399003|7416014|376014|1800799024|3023799007|56012099006|10067099003|4143699003|11063799006|5023799004|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: MwPnncEKvNp9iU8Icflzp89e77XTDY/P9jrZu6LypK3VKIAkymRPW467zTsXk2zOOzgQ/qiephAf03qcSnApvxz/Mgq6iCm8mGotKiDSehcCBnktwxgH86JcuR/pQjaB1pQp1cNFx8AbIXXOL9RJ0KUVdDmniN4gNZg0q91FzazWLkRSaIpY+FLMv4TefQTsqwmmo33GCQzLxup3SohISqTRZJfRfw640Qvvy9hKTvpDgNYBQZm6gSSp/tlDRZTir/0X0JpgT1yqeaP3tHZo6TzohRN8tqnIfHv2ZJs0bSltcMROa0mJvbFi66wpFHoTkOyPnkt7WPIJsifUodDR1IEwjBiD/e+r9mQIQWgX+yTy2FfGxBPPTvtLHg8DAQRvwsqqz2PTYKwBpViwvoSvQ+1YWVsYnvj6fAX5YhG/B6HerWokomMa7wSV/oNGkYL+TgHBivV0y9kq2FRpqWvkOZCymAadb11EIU5EMV9ikoNqzg5SA+kEioeS3TiPjEmxGf+5xqhpyL7KgcpvvnvZiASc1CUam4vHpY4FtZIA0W18ifvHZi3gffpPivOCLRGDVohrQz/xVSI/j5MJL3Zhb5HW7IOkwy2LKNa7G55JwDvpzrby1JSa52DLfBhsLOqr+03wqJ38770hOETjAaSi+HzHSEJ53O/7oPowIP3fd+s= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR11MB8370.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(23010399003)(7416014)(376014)(1800799024)(3023799007)(56012099006)(10067099003)(4143699003)(11063799006)(5023799004)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NGJmSnp3TDU5VGZuYmFGd2oxWFZkWFVBSXAxL2k3a2RyTzNVWUsrenZWOGxQ?= =?utf-8?B?OVVDZXpkdzhNZzAxaW5pQklBd1U4UGlCbzV4QXdHYURoK0VUMURFTzFGb25M?= =?utf-8?B?eUtUSFJ5Q1Yxb3d5TGplSlRyTUljNFU0VVZUOWZOdmFEZGkzT2t0dU9kdGJ4?= =?utf-8?B?V2dvcjREVkMrSXQ0ZUdCUTNRNm5ZWWJPbnpxWmpCdTlFa0JMOWlqTDJISEoz?= =?utf-8?B?Y2lxTGdZaEtKTHlXRE5SWVArQnZ0SkdRSitqQmtKYnBIcmh5azNOME1wLzBZ?= =?utf-8?B?akU5U1dzbkU1WTNnalJ6ckwvcWIrWVhxRlFXZ3c5QnhpNmQrT3NSbDZxMWNF?= =?utf-8?B?QmlsRlYyU051UHU4RWtoUkFrcWNWUC9xUDNPbEppcnhhWmtnbE9Lc2pGaWpS?= =?utf-8?B?UTFHU3FCRTRIUzVMUHFjOGUxMzN2UU4wb2xJNXhmRjJQYWdWdTNaMmViS01L?= =?utf-8?B?TnZOMXdSbFZkRnhqdFVLTFVibGozWEZqaVFBOHNLUHFQQ2h6c2dZSkR2RzFu?= =?utf-8?B?eWFHMkZJVGFPQWhNU2x4N0ZCNmxr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eW4=3D?= X-Exchange-RoutingPolicyChecked: ktx7ya50kgzsXP+pbYHjrGXEPjvbA1i5a+nqliG+rYdPCc2hqbBchxK5iaps1pX2gCdoIdJbIHL/e7nbIEKgrUgWw4C/E5FWlSC5QDt5zCy9IZsC0woFD50bEafTyquaY7U1UVFDXIpKd2ukYJNQzH6h7ybaMyC5KPRejZ0IyGEIzPcli/xGUdYvKd6WQ7F3/4h9YdBvHJSA6fEvdYb/MVuIte0LSRaofUTNzZnrdUpwOGUSMExZXyKTEkPFDNYR4Zv0j6cGQqisuj3dzeMLCA2jYchgXT595KRWqtie0Sg7FSlKoxJ8QEJTXEoABgTg3Ylv4PjCG3lytQ+uKAyNMw== X-MS-Exchange-CrossTenant-Network-Message-Id: 3c7de479-1e0a-49af-7e1a-08defe46d23c X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB8370.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2026 23:08:46.2549 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: io8bzAI8EF/YRl16UyHHbAYOcN3KA3qlpCPZEOmpZ/iUMMVNVsgKoxi1cfY3Y36O0CPITlDxH6VfjA/i8Wcuo/uVFelrWB9k7CbP4ONey60= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7901 X-OriginatorOrg: intel.com Hi Chenyu, On 7/25/26 2:23 AM, Chen Yu wrote: > Introduce erdt_cpu_has() to verify if a specific RDT feature is backed > by an ERDT table. erdt_cpu_has() is derived from rdt_cpu_has(), which > not only considers firmware (ERDT table and its sub-tables) support for > an event, but also considers userspace input like "rdt=!cmt". > Similar to rdt_cpu_has(), erdt_cpu_has() expects an x86 feature flag > as parameter. > > Introduce erdt_support() as a helper called by erdt_cpu_has() to check > whether the ERDT firmware supports a given feature. > > erdt_support() deliberately claims no feature yet and returns false. A > feature may only be reported as ERDT backed once the low level accessors > that read its monitoring data via MMIO exist, otherwise callers would Are these helpers limited to monitoring ERDT features? First paragraph mentions "support for an event" and above mentions "read its monitoring data" that imply these helpers are limited to monitoring features but I do not think this is the case? > take the ERDT path and find no implementation behind it. Features are > added to erdt_support() as their MMIO implementations are introduced. nit: "are added" -> "should be added" > > Signed-off-by: Chen Yu > Tested-by: Hongyu Ning > --- > v5->v6: > New patch. Split out of the v5 "x86/resctrl: Introduce helpers to > read L3 occupancy via MMIO" patch, which carried two logical > changes. (Reinette Chatre) > Rename erdt_support_features() to erdt_support(). (Reinette Chatre) > Reword "expects x86 feature flag as parameters" to "expects an x86 > feature flag as parameter". (Reinette Chatre) > Explain in the changelog why erdt_support() returns false here: a > feature is only reported as ERDT backed once the MMIO accessors that > read its monitoring data exist. (Reinette Chatre) > Drop the unused asm/cpufeatures.h include. (Reinette Chatre) > --- > arch/x86/include/asm/resctrl.h | 1 + > arch/x86/kernel/cpu/resctrl/core.c | 23 +++++++++++++++++++++++ > arch/x86/kernel/cpu/resctrl/erdt.c | 5 +++++ > arch/x86/kernel/cpu/resctrl/internal.h | 2 ++ > 4 files changed, 31 insertions(+) > > diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h > index e60c2aea7ebd..5491853113dd 100644 > --- a/arch/x86/include/asm/resctrl.h > +++ b/arch/x86/include/asm/resctrl.h > @@ -49,6 +49,7 @@ DECLARE_STATIC_KEY_FALSE(rdt_enable_key); > DECLARE_STATIC_KEY_FALSE(rdt_alloc_enable_key); > DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key); > > +bool erdt_cpu_has(int flag); > int erdt_get_scale(void); > Can this declaration be dropped? Below there is a duplicate declaration added to arch/x86/kernel/cpu/resctrl/internal.h that should be sufficient? > static inline bool resctrl_arch_alloc_capable(void) > diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > index c2568b29474e..74087d04f1da 100644 > --- a/arch/x86/kernel/cpu/resctrl/core.c > +++ b/arch/x86/kernel/cpu/resctrl/core.c > @@ -887,6 +887,29 @@ bool rdt_cpu_has(int flag) > return ret; > } > > +bool erdt_cpu_has(int flag) > +{ > + struct rdt_options *o; > + bool ret; > + > + ret = erdt_support(flag); > + > + if (!ret) > + return ret; > + > + for (o = rdt_options; o < &rdt_options[NUM_RDT_OPTIONS]; o++) { > + if (flag == o->flag) { > + if (o->force_off) > + ret = false; > + if (o->force_on) > + ret = true; > + break; > + } > + } > + > + return ret; > +} > + > bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt) > { > if (!rdt_cpu_has(X86_FEATURE_BMEC)) > diff --git a/arch/x86/kernel/cpu/resctrl/erdt.c b/arch/x86/kernel/cpu/resctrl/erdt.c > index 422618991927..167d2dfc368d 100644 > --- a/arch/x86/kernel/cpu/resctrl/erdt.c > +++ b/arch/x86/kernel/cpu/resctrl/erdt.c > @@ -37,6 +37,11 @@ static int erdt_max_rmid; > /* Scale to bytes for the monitoring counters when ERDT is enabled. */ > static int erdt_scale; > > +bool erdt_support(int flag) > +{ > + return false; > +} > + > int erdt_get_max_rmid(void) > { > return erdt_max_rmid; > diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h > index 27f28b0fead8..d14a36d65b05 100644 > --- a/arch/x86/kernel/cpu/resctrl/internal.h > +++ b/arch/x86/kernel/cpu/resctrl/internal.h > @@ -289,6 +289,8 @@ static inline void intel_aet_mon_domain_setup(int cpu, int id, struct rdt_resour > static inline bool intel_handle_aet_option(bool force_off, char *tok) { return false; } > #endif > > +bool erdt_support(int flag); > +bool erdt_cpu_has(int flag); > int erdt_get_max_rmid(void); > int erdt_init(void); > void erdt_exit(void); Reinette