From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.12 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796365647; b=TSEmz2HktGmOSNO6GRuq8Lsk0sWzkdpt8qOFWXM5fFG4tirV05vCNvrOjrHNgPmhgOc+ O+mubLon/+6J9ujjWhoiPFtWXRgDjlfBITV+tPth2a1NXdYQz0zT27/mI9hNJ2pSCEymr UO4EI/KIbGJ/oHFK0d9PX06MRCTAeacmYZKsqCoyKpj6WotqtYQDh16kROW7c3qCGbr2A Zo1VPVFWpO6GBXbBSwIKJxJxN3k04u1QIXNC42cDXtalU9/2W6Wu9SFc4HwnXN0u/eyH/ S8to3MIqTSrSStnO/3e3i5WaddRs+p2l+b89xRB9fEDiJWxrExchSEcY6t4fd2lzFNA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796365647; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Received: Received:Received:Received:Date:From:To:CC:Subject:Message-ID: References:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; bh=zRJZPAGXIDSI4+PsjoN0KzpH8zvny/Ma7QSGlMVHLUA=; b=up+vTp8lJ+aHUT6EKRbixnhmF31JntUYGBRvds4AQg2RpqSg4elTsdK2JqMeBr1lUaV5 zIl6m4NYUAG7LHuf7gRPL5Tnj8aSKsbUiQnbMUK5diIh+4GaVg4w3QEzRS0g82Tvs5XLx 2C6+78i9LkcbDmpBT+IrQ1FVsKrIsr5ZPws5KJcOzwrnMQGrdVSrsPqhqVsqoiznTZ5PS KdaGPsoOgHh5QdXj4xKNMWBxIDPCB0u6Bze2oJSHpo4X0u55fZvF4WCRIdhtIddN2aq03 TRjHmHKgGPpvu3EW1kY14i5oZcawquKTnX6mmUJBHgrNASDAfOtLGJrL5opuTbCeM0A== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=fkSQbVI0; arc=pass header.oldest-pass=0 smtp.remote-ip=192.198.163.12 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4ECFB606A32D for ; Fri, 4 Dec 2026 06:27:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4ECFB606A32D 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.a=rsa-sha256 header.s=Intel header.b=fkSQbVI0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796365646; x=1827901646; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=zRJZPAGXIDSI4+PsjoN0KzpH8zvny/Ma7QSGlMVHLUA=; b=fkSQbVI0ULgodrma554cg39tM7lAu4p8/SCM0cD74rLW3/Nxx7FxoeM4 /Q7vOTpYxHklZvcOUAEonGZQ7j2Y8ysnSQz0Fez8vucZMdOucZlTXQneZ TYZFCluTbBMvzq2DqzGW3fT8gt77mOP+7dEYI3z/l/Mr3OYqDZvvP510E E2UAs6t1L8hAm2N+aIKLZA/R6N9pv94zPzYp1Szs0+9K0RSve2xyAmw9W 1koFBndy35003ep6V/eatjol6OUGrQOXa0OSgqOONEk8AQxSfe5Pd4aav +BojLCXFcZQejHHP9x2PazV+fub2nn6F+ajaGp7z8+O4BtsMigulRUiTc g==; X-CSE-ConnectionGUID: FuJMYs0dTpKAQNEO1lUf8A== X-CSE-MsgGUID: Q+7Kh62zQ8uFimpDi3q/pA== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5246433" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5246433" Received: from fmviesa013.fm.intel.com ([10.60.135.153]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 22:27:25 -0800 X-CSE-ConnectionGUID: KyKrM7PLSGSb7UKYURT/1A== X-CSE-MsgGUID: 9NjCLMoGRte6xcRmMMeKZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="15974138" Received: from fmsmsx902.amr.corp.intel.com ([10.18.126.91]) by fmviesa013.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 22:27:26 -0800 Received: from FMSMSX903.amr.corp.intel.com (10.18.126.92) by fmsmsx902.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Thu, 3 Dec 2026 22:27:24 -0800 Received: from fmsedg901.ED.cps.intel.com (10.1.192.143) 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.57 via Frontend Transport; Thu, 3 Dec 2026 22:27:24 -0800 Received: from PH8PR06CU001.outbound.protection.outlook.com (40.107.209.56) 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.57; Thu, 3 Dec 2026 22:27:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nsnU4qRJkrKFgogwEnviauR5wcqEyoBP41dMkQUpkWS3el0Bzb5N+RWtxz0ob6LZHjQDJXtgpXlZSsndSAz64kMlpAWOgSEZtahOnoVtkGE8jHYJrkunht3/R9AU4VX1MW8kM41AVHH3jj2LNasXTCMNeVTMv9rmbo2sDnCubgUJaLIVcoJ6NjOnPEUh3pMvBndA0ZeL7+xoq0vzzRwufeG0nBoekIx5YglDBiHxzwYFybDpdXcXt5CTC4D01a9qbnibb5Bmt5fJrYsCt/9c7NsJfxmAkT1CsEoSHFrkNCu8FeNrVSUktsqXMHtWx4glvFpcMrPqR3MtRzjukTIuGA== 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=zRJZPAGXIDSI4+PsjoN0KzpH8zvny/Ma7QSGlMVHLUA=; b=lrFFflPJeOpXxTd8hjKFR8SwLk0P4MjUS6H2itYnO5O3rRMmQy0ZHjjOCC0BYMFo2ACMpolM+16ghG77vg54mjoNASSAuUMsKtRxwMaVyIE4hy+Z5bVAaGowFhXjznCx6OA1/+2opL1WnCmPxCoIrHs3CGpMnFnwXO7GIMpVKUG3Ylo4CREOVLV+joUHgdY643090sHuzq97smlAbcA5xLro2mJeT5pJepm/lJHUr6Nj9Ezyt17GWZGG7GB4BvqCl4eOFMsdBLCS5jtPehROdlNJbnNTWja2qM9+UpNnjBLHCOyzdBLOoXwQOQk5/9NZFo7kDmxghgZXL0dEcdMnJw== 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: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB6020.namprd11.prod.outlook.com (2603:10b6:8:61::19) by PH7PR11MB6932.namprd11.prod.outlook.com (2603:10b6:510:207::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.12; Fri, 4 Dec 2026 06:27:15 +0000 Received: from DM4PR11MB6020.namprd11.prod.outlook.com ([fe80::3058:1480:e4ac:5765]) by DM4PR11MB6020.namprd11.prod.outlook.com ([fe80::3058:1480:e4ac:5765%3]) with mapi id 15.21.0688.011; Fri, 4 Dec 2026 06:27:14 +0000 Date: Fri, 4 Dec 2026 14:16:13 +0800 From: Chen Yu To: Reinette Chatre CC: , , , , , , , , , , , Subject: Re: [PATCH v10 05/12] x86/resctrl: Parse ACPI ERDT table and save CACD cpumask per RMD Message-ID: References: <24cde53e-34fb-499b-965a-1cbaa2ac273a@intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24cde53e-34fb-499b-965a-1cbaa2ac273a@intel.com> X-ClientProxiedBy: SIAPR04CA0020.apcprd04.prod.outlook.com (2603:1096:4:28a::18) To DM4PR11MB6020.namprd11.prod.outlook.com (2603:10b6:8:61::19) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6020:EE_|PH7PR11MB6932:EE_ X-MS-Office365-Filtering-Correlation-Id: 86115051-cb8d-4b4f-a657-08df51cfa2c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|366016|23010399003|1800799024|5023799004|4143699003|11063799006|6133799003|261009223027099003|3023799007|22082099003|18002099003|56012099006|10067099003|261021123027099003|261028144727099003|261102123227099003|261022075727099003|261026121527099003|261026140227099003|261021121427099003|261022105027099003; X-Microsoft-Antispam-Message-Info: ztM7DT0Z8DDOlSBj8oN4yKLVUWRJhd4rUjOuK5ymrQr13F64YgqlUq4HxCtjGxVbMZNpL+Ymsj+gYO9OOkiO/NdxIbm/BIQsMWmdFdLB2Q7+ZS2ZMRlA3+S9Di25qlx9yBhKM9Dse5sBTuL1kf5fPq2cufePq4qqkwyoiqmn4WGY1q+Lb1ReRpfMPUjTYtOTjbIqcN7/HPaQ8TJyUk/RlmDvbfN2tUqsGC9y2WEqx4z7sCiabkrkTnnlUEgmV1A0Ob31oFYfQb9M+w8aPtdcreNesrs7q1kb84anM1zz1dIdUHdZKjCyHiuFpnUC4hLveV3StpbpyMzr+jer3kZV3zxkM+1jqHMc5gWP1an24/7AgsI0mZTpuPW4YpJsUXQP4jrR7vXPwR4P05eWvJkXhHfoOfy0AJqE0DynSpqTCTyj/OZ/HgZ9+pTFvkgWqmBc9YF8os8E1OBMJg93mWtGmi4xzEBzl/xEz9SaKiZPtUn19n2bh9KI38peekhQs75PEirMMi8fVmPoZeR6e/rNn9S9kvcipKe86dAsUGNTKNSrbP4l5c+MgjeF7lC/IdS7ijHUpFxl9LR+XjrhW/6O9p9ahsOUCvni+3W4WPnyZR9e7lgzRCo+gHqUn9xFDZpTCWgXEFamNOgtSUDklR433Ejuu2EEQwYUzFoLSyplayY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB6020.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(366016)(23010399003)(1800799024)(5023799004)(4143699003)(11063799006)(6133799003)(261009223027099003)(3023799007)(22082099003)(18002099003)(56012099006)(10067099003)(261021123027099003)(261028144727099003)(261102123227099003)(261022075727099003)(261026121527099003)(261026140227099003)(261021121427099003)(261022105027099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?GyOlnbiHwI7zJBwuEViU0T1kA61d8rvMVMk99Q0MToVJMvRVpFkJiHpJDy0F?= =?us-ascii?Q?xN2plb6eRdMHd6TImzQKpnKLFjEibBlGEHmKmFScUkK6jq+dEfKAr7EWmm4+?= =?us-ascii?Q?J4TsxpnN8oVN89nxkvC7JCM2SZH1XkIS2bKFWSiIzKz0AoQ1IfIkJ6FzHhmc?= =?us-ascii?Q?B50DCf4HUyB5hbfZ8CWbpmPIajRW6tj2ziH+5wKTyq8Y5TLDXf64Gww/NHSC?= =?us-ascii?Q?CY+welnqAXD6FkA8OFGSnAodOF/BybsmlDmq7oC6ze7UoIj047WP3UIY7DiI?= =?us-ascii?Q?+zT2JnUoYpJCTwCNq+p94Y5Dp2OGQS3rUS4ujvwmY8UbyGSlGR436PZBIgsW?= =?us-ascii?Q?JbHNx5Nu7VxYEssfA/jtPhptcdFbWaqIRjb4RF41f5C2GrZwzbR4zZxguw3r?= =?us-ascii?Q?ed/ad5HxqPpt1Q7wpF9x+MzFy88EaEvrKEtFuAzQEMIRRgtBKmRDqUO+Cjux?= =?us-ascii?Q?/GQ3gx7MJyZYo4yDL/7YWWoHNBDt6M9pR4zxTESiyoeBM8AOqotOGeNDYDi0?= =?us-ascii?Q?VTAgC6cLh97xtWZCSIs1aqDLspwZuTGGfOiJyHVJM8IZwMcheZIRPVZrNI4f?= =?us-ascii?Q?jzwWEjVzcOne1Qk/iXcSDpXC5A57zSLz/d/IZ7guu0kgTNO/b/EpfSZG3Ja4?= =?us-ascii?Q?BrTRbHnkB4PqznCvVBOuviXQaMbZfYcZItbJ42GKXPDEyYqnp5Qgr+EKI35X?= =?us-ascii?Q?yjTWGO5TgjmoV6yAGAjUM+99bRYP0hpbh2nXTKLp61lq0fPor//YyTb1SEsh?= =?us-ascii?Q?4coJ+aryJnk2WtQGbPAB1mma8MDuNrH5cRC2B9sykPZT9uFfMaxRoSihHF46?= =?us-ascii?Q?IHVg+pIcn0FTC/V9WRVI9zqXGtqMgvt6RhaVv4D8/Y5R3N99q0W+uruXQp8m?= =?us-ascii?Q?684iJGco3tUz7SRjJ+iFt7kwiNIxA7bdq1NEm/ZhIfWjqLLG7q7AOLY/78XN?= =?us-ascii?Q?mjb+mPUaDc3Rn10rDNWQLiH3b96pqN0mehP6Y+5o9Ga9RItfXfTYT05/LGNy?= =?us-ascii?Q?A6SwUn8dXGozOD/nwrwwHWlHpQWhz+KdLBYLbKITgB3gQKQXDwuM0AuVkiIb?= =?us-ascii?Q?YFvjkPqGz/42GQGr3OY7r+zpjUmYz7s/HXt6SgSfV8VOXWKW9f2ziCFekN7h?= =?us-ascii?Q?e3rU8tNbgT4f1HVGb8Y+OU30qBIW06QYbyOeNYwe637yDxJTXn6JtcxV2cUt?= =?us-ascii?Q?NQFTrOc6RELR7sO2aMlDJOfP0Yy8ET0zkwvrldIb6yvCJ5KOFVVwrhukD867?= =?us-ascii?Q?8PDX/CkXXPAsZT4nwRBZnQ+BN2c3dm5FuM4IQ0dVRgcZWYv2sFkj82GMKg5C?= =?us-ascii?Q?0DBGyi6UDbxRVYXz4I4rZbhbCLRyLpF0SKrMJW0qZfk8Ml1KPo43kkBzck4S?= =?us-ascii?Q?3I6fOjhirBacyPOZaNshyt3t/8sIvowRKSNLS7ke9BLiqvwTupqkf0sB5q3R?= =?us-ascii?Q?nmqM3jwzOyOZAweIxwLw0b0z4TsI1bibs3rGQhf28hM4has0zf6Hr+k3u34L?= =?us-ascii?Q?tUPQGaQtxTMLK6IajQ3YNK2+3HHalvGKo0ZRlIwrwZbY/puf9F8rlryOa0pb?= =?us-ascii?Q?WBCpFvjPn3mB/OFx9MPCmKWi483LmwtVqAGiqnomi/AZ3F8krL+ydvMTZfeM?= =?us-ascii?Q?lJvLthyJ1dowefCQ57wpgO4sjicGK5voR9spmMGrrpSv3kdc28ILuVxVVeKs?= =?us-ascii?Q?8LlX4unZi9srZg+M7mIXk0ReB8VZJu39xpVVdcIlReqi+Dl9Q4QwkOJc0qDx?= =?us-ascii?Q?BvBq3Vcl5g=3D=3D?= X-Exchange-RoutingPolicyChecked: cZer1Dv28+99Y7jeFPgxoOF0c0AeOtG1DtQBh5uGrg9pl7NL6iU+yDP54ZbtRVK0OxsXgWudGlLaKPCSaA9uztEQt50kHkbNQ2nHtBWP4D2Q7vXtI7rpRfnosc3ZTZyEAEUW3OABKTy/eEE+YaXcdtV6VkRd696PlRz+6kTNyK5dJTVAi45sDRF9h7L3arHD0xEB4zaNt08OW/UZa8wwL+UdhMK5W5XRXvSLjGf2qyR4QzjPLTsuDlFxxtugA08hRv++m3jkXAfDp6NR0aUHPP+I52xaH4XvuAzuvAKckENJgxSCbQJQxmQls1UR8zerMNbCvOEPDEhMcG1McwbdOg== X-MS-Exchange-CrossTenant-Network-Message-Id: 86115051-cb8d-4b4f-a657-08df51cfa2c9 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6020.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 06:27:14.5052 (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: mnIuiONqfcpFnkRmrHjb7a8f/0s2CGWJy4/iEuSEUpcQATb3B3yVsvimdBevb0BU9ixtJavsNp63YLqbvwvqaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6932 X-OriginatorOrg: intel.com Hi Reinette, On Thu, Dec 03, 2026 at 08:51:30PM -0800, Reinette Chatre wrote: > Hi Chenyu, > > On 12/3/26 7:16 PM, Chen Yu wrote: > > On Thu, Dec 03, 2026 at 01:43:45PM -0800, Reinette Chatre wrote: > >> On 12/3/26 7:50 AM, Chen Yu wrote: > >>> On Wed, Dec 02, 2026 at 11:12:26AM -0800, Reinette Chatre wrote: > >>>> On 11/26/26 6:44 AM, Chen Yu wrote: > >>>>> On Wed, Nov 25, 2026 at 11:04:38AM -0800, Reinette Chatre wrote: > >>>>>> On 11/5/26 2:08 AM, Chen Yu wrote: > >>>>>> ... > >>>>>> > >>>>>>> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > >>>>>>> index b5a86e5aa4e3..2b9a13be5975 100644 > >>>>>>> --- a/arch/x86/kernel/cpu/resctrl/core.c > >>>>>>> +++ b/arch/x86/kernel/cpu/resctrl/core.c > >>>>>>> @@ -1018,11 +1018,18 @@ static __init void check_quirks(void) > >>>>>>> > >>>>>>> static __init bool get_rdt_resources(void) > >>>>>>> { > >>>>>>> + bool ret; > >>>>>>> + > >>>>>>> snc_nodes_per_l3_cache = snc_get_config(); > >>>>>>> + erdt_init(); > >>>>>>> rdt_alloc_capable = get_rdt_alloc_resources(); > >>>>>>> rdt_mon_capable = get_rdt_mon_resources(); > >>>>>>> > >>>>>>> - return (rdt_mon_capable || rdt_alloc_capable); > >>>>>>> + ret = (rdt_mon_capable || rdt_alloc_capable); > >>>>>>> + if (!ret) > >>>>>>> + erdt_exit(); > >>>>>>> + > >>>>>>> + return ret; > >>>>>>> } > >>>>>> > >>>>>> Looking at the solution as a whole I do not think that this enumeration is > >>>>>> ideal. erdt_init() sets erdt_enabled irrespective of > >>>>>> erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) being true. Specifically, a user > >>>>>> may boot with "rdt=!cmt", which is the only ERDT enabled feature, and that > >>>>>> will result in erdt_enabled being true but that does not actually mean "ERDT > >>>>>> is in use". > >>>>>> > >>>>>> I think there is a real problem because of this when looking at the CPU > >>>>>> online code that gates the domain binding and configuration on erdt_enabled. > >>>>>> If I understand correctly a CACD inconsistency drops the CPU out of _every_ > >>>>>> L3 CAT, L2 CAT, MBA and MBM domain, even though no ERDT data is ever read. > >>>>>> > >>>>>> This looks to be a recurring problem and so far the solution has been to > >>>>>> add additional gates based on erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) at various places, > >>>>>> but I wonder if this can be simplified by changing the contract. > >>>>>> > >>>>>> Instead of erdt_enabled meaning: > >>>>>> /* True when the ERDT ACPI table describes at least one domain with at least one CPU. */ > >>>>>> could it mean (something like) > >>>>>> /* ERDT is in use */ ? > >>>>>> > >>>>> > >>>>> OK, does "ERDT is in use " stand for: > >>>>> > >>>>> At least one ERDT feature in "MMIO-based CMT, region-aware MBM, region-aware MBA" > >>>>> is enabled on this system? > >>>> > >>>> That is more accurate, yes. I do not know how you intend to use this list, if it > >>>> is just to replace the existing comment it may be something that could easily become > >>>> out of date as new features are added. > >>>> > >>> > >>> OK, to keep it non-feature-dependent, let me rephrase it to > >>> " True when ERDT is in use, i.e. at least one feature is backed by ERDT. " > >> > >> I think that states the same thing twice. Could it be simplified to: > >> /* True when at least one feature is backed by ERDT. */ > >> > >>>> > >>>> One option to deal with this may be something like: > >>>> > >>>> /* > >>>> * ERDT can only be used for a feature that the CPU enumerates and the user has > >>>> * not disabled. Keep in sync with erdt_in_use(). > >>>> */ > >>>> static __init bool erdt_may_be_used(void) > >>>> { > >>>> return rdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC); > >>>> } > >>>> > >>>> /* ERDT is in use when at least one feature is backed by ERDT. */ > >> > >> Note how the two comments would tie erdt_enabled and erdt_in_use() together. > >> > >>>> static __init bool erdt_in_use(void) > >>>> { > >>>> return erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC); > >>>> } > >>>> > >> > >> ... > >> > >>>> One issue that remains seems unlikely? When more ERDT features are supported > >>>> then an issue during parsing of a user-disabled feature would impact all ERDT > >>>> features. One option here is to move the rdt_cpu_has() check into parse_rmdd_table() > >>>> so that the feature specific table is only parsed when the CPU enumerates the feature. > >>>> > >>> > >>> If I understand correctly, what you mean is a case like below. > >>> Say ERDT later also backs MBM (via MMRC table): > >>> 1. The user boots with rdt=!mbmtotal,!mbmlocal. > >>> 2. CMT is still wanted, so erdt_may_be_used() is true and the whole > >>> ERDT table is parsed. > >>> 3. The MMRC is broken, so mmrc_init() fails. > >>> 4. parse_rmdd_table() fails and ERDT is torn down completely, so victim > >>> CMT loses its MMIO support. > >> > >> Right. > >> > >>> > >>> I'm thinking of adding this erdt_may_be_used() check in erdt_init() in > >>> the current commit, but in a later commit, when CMRC parsing is introduced > >>> in ("x86/resctrl: Parse ACPI CMRC table"), remove this erdt_may_be_used() > >>> in erdt_init(), and delegate to parse_rmdd_table() to skip the CMRC if the > >>> user asks to do so: > >> > >> Can this be avoided? Ideally the patches in the series should build on each > >> other and later patches are not expected to undo changes made earlier in series. > >> > > > > OK. I plan not to add erdt_may_be_used() to the current commit: ERDT parsing will > > be unconditional, and the CMRC patch will directly use rdt_cpu_has() to filter CMT, > > so no synchronization between erdt_may_be_used() and erdt_in_use() is needed. The > > tradeoff is that this intermediate commit can parse ERDT even when CMT is disabled > > and may produce misleading ERDT log information, so users should use ERDT only after > > applying the final patch set, where the CMRC rdt_cpu_has() gate prevents such processing. > > > I'd like to highlight again that I think this scenario is unlikely since it would > depend on a firmware error combined with user booting with rdt=!. > As I understand this direction also does not avoid ERDT parsing entirely if a feature > does not need it, it only avoids the ERDT tables related to the feature. The misleading > ERDT log information would thus remain. > > For simplicity, I think the checks contained in erdt_init() would suffice. > I see, let me revert it back to what you proposed in the beginning, to do the check in erdt_init(). thanks, Chenyu