From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.migadu.com (out-230.mta1.migadu.com [95.215.58.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11776423EA7 for ; Thu, 13 Aug 2026 06:43:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.230 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786603424; cv=none; b=WIF5T0SenjG6KpeVXXFPnfAX43wrhyRkvmwX17lTxh7NM4OUSKujQ0AiIUV6lt3M7FHjtI4fVl7WUtZHVab85w5VwktGpgtZLc801T63qYpCBCfMmnSKqWUR2uuzKAX52lsJoZchzshaLoC+IsBYDyu7tDATSaDX+QTuF9C33uU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786603424; c=relaxed/simple; bh=l6gRbV2WJ7OUckRl6uqzcRAzhDFD0hKtIb5+EUyFjHM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pm2/NNKVHde6bUcDor2PSNQzUE+Fua9HlzuK6PEPT7frokoh93/DCdZU16BPeeS3TlXhKYpdRtKCp4d3wD2m/I899Y2vOd/6Tl4QyefN6H8gvZUu0t7oCdIVDiH+kQ8YHfn9nYRnmRmz7wYx/rJOBSY7+V/LJQMFwMzQfQt2yMg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=wMoFFII+; arc=none smtp.client-ip=95.215.58.230 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wMoFFII+" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=l6gRbV2WJ7OUckRl6uqzcRAzhDFD0hKtIb5+EUyFjHM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1786603415; v=1; x=1787208215; b=wMoFFII+ICMWw7eadx3H5fu5tCRHeQXMbUWFx4ecJzUqVumZ7uMsttH7jp3HRW3/81zA+IrG lL8JIuN9le06LQoxPjbqg+vtzTstioM+Axrc15d39nanYO0iMCjyOTz9m0f0IF75Y7eum04rJXQ D/GN8kaf6gWFxP7ILq/hv19I= X-Envelope-To: linux-kernel@vger.kernel.org Received: from three-body (240e:398:91:37f0:2e7e:cdf5:29fd:7e8) by smtp.migadu.com with ESMTPS id 800c8c939fc69bbe; Thu, 13 Aug 2026 06:43:35 +0000 X-Migadu-Flow: FLOW_OUT Date: Thu, 13 Aug 2026 14:43:20 +0800 From: Chen Yu To: Chen Yu Cc: tony.luck@intel.com, reinette.chatre@intel.com, tglx@kernel.org, bp@alien8.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, fenghuay@nvidia.com, babu.moger@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, chen.yu@linux.dev Subject: Re: [PATCH v6 0/9] Introduce MMIO-based CMT access for Enhanced RDT Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Update for Sashiko review: https://sashiko.dev/#/patchset/cover.1784968626.git.yu.c.chen%40intel.com TL;DR Sashiko reported 9 issues in total, after evaluation, 1/9 is a valid concern. The next v7 version will be posted with that fix, after v7's direction has been confirmed by the resctrl community. The issue sashiko reported: Patch 9: [PATCH v6 9/9] x86/resctrl: Add MMIO-based LLC occupancy monitoring support > diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c > index 786828a0a3c2c..d33a865e59d48 100644 > --- a/arch/x86/kernel/cpu/resctrl/monitor.c > +++ b/arch/x86/kernel/cpu/resctrl/monitor.c [ ... ] > @@ -430,12 +434,15 @@ int __init rdt_get_l3_mon_config(struct rdt_resource *r) > struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r); > unsigned int threshold; > u32 eax, ebx, ecx, edx; > + int max_rmid; > > snc_nodes_per_l3_cache = snc_get_config(); > > + max_rmid = erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) ? > + erdt_get_max_rmid() : boot_cpu_data.x86_cache_max_rmid; > resctrl_rmid_realloc_limit = boot_cpu_data.x86_cache_size * 1024; > hw_res->mon_scale = boot_cpu_data.x86_cache_occ_scale / snc_nodes_per_l3_cache; > - r->mon.num_rmid = (boot_cpu_data.x86_cache_max_rmid + 1) / snc_nodes_per_l3_cache; > + r->mon.num_rmid = (max_rmid + 1) / snc_nodes_per_l3_cache; If the ERDT table specifies a max_rmid that is larger than the hardware MSR limit, could this cause an unhandled #GP exception? Yes, we should use the min of these two: + max_rmid = erdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC) ? + min(erdt_get_max_rmid(), boot_cpu_data.x86_cache_max_rmid) : + boot_cpu_data.x86_cache_max_rmid; thanks, Chenyu