From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 4E63C3537CE for ; Tue, 3 Mar 2026 20:18:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772569127; cv=none; b=CKVhyF/uKLu0sFL5gCqjvNWz9kfGeBbfwYDCiYtmhKtfww3v4YDqrqRMzYfvIsXow0lPusnddi01fy3FD6ccH2JNOO+QYlcMwGNpsVJIumBYyX78hCp5DPE1jo5lH/Rf/dgO/8DV18V/eP+CH9R9LXfkeEhw6HV2OtObL/3uWp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772569127; c=relaxed/simple; bh=XP5EL17iKgU9V9WW00QNpjGSzNhaRGr7w+/GGq/JKNQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=vGox6aGy/5ySSNLcC3rMZrLKpVdDfvtq58KccrA5XRsP7FR3yPmV0KHNcaUc4zmaorQx1N4S/mYi7JxpzpoHz0EACENzO67CuyFIdu+45/mTXVlWxtD0quO1RbJxf78bj1DCA4KiE38PI0xAADL3821mrGdOc1n9xOtdsC81GxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=G9ITdesh; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZeHf2wqx; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="G9ITdesh"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZeHf2wqx" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 623H1GH7728169 for ; Tue, 3 Mar 2026 20:18:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=OK+IIqPNLkgbz36+VPfXuCiJ Eyq7012HaDlxd3sHfXY=; b=G9ITdeshOZZ5t5O34VTKAFmPzigux6+UB8CdpDYB /dSskvXpGRAl/Ovl/kz9QRZhCw4TYkqQdTq+/JnmcRndNyb/RWcOYFeuOkUch8zU PFVzYKrWH2XHRaPmQe7Mliqqkb421nMTy38bmDc+GSubVukvRiU3/C4+bvi9QngO xcFf9bncm8K5JKMrzo9KJLaAh+78MW6TBhzMMjtp1raLIC49tRwF6oBPgmThRzeY LRrsGOhXLoCoivM3MU+7KS1P2yQXqtVuKYosROicOAUqZ3hak6cMpWA0gDaJayKR jCfvrtZgHBWeEwdJMfyy4IFQ+DNra4V6mG68p9Jr7Qhx+Q== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cns5fu1ee-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 03 Mar 2026 20:18:45 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8cb37db8b79so4619503285a.3 for ; Tue, 03 Mar 2026 12:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772569124; x=1773173924; darn=vger.kernel.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=OK+IIqPNLkgbz36+VPfXuCiJEyq7012HaDlxd3sHfXY=; b=ZeHf2wqxEqxCvLc378fTUyqw415DfFmBX79coMr/Gv4fAv+Xe8rJR6ykqq9lrHOEbF Oy4nceSblK7IBdpKYFqqUqxy9dDRN4Ey7nheeoQEAoAFVEBBQfK2dX7vpACdHMWCce8D 6ovnDuElRcAkOT3tkRW1aWEHOG6hgpR3Ec5RzSJ7ZSi8hK/fsg4Cv7MoWQQsARSwXIv8 pihnDP2di/GC6jU0D8obpAKXWMkxdRX5SbnmglcezBvVGgzns0ty+nlVVVtVeaFEaxOF ST4CJ2QTopJdd++lrlpVUuGGd34U8Do0x/SudE/Tc/F6t2TKzo8LTr/7HLTkXpbPOnr1 GF/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772569124; x=1773173924; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=OK+IIqPNLkgbz36+VPfXuCiJEyq7012HaDlxd3sHfXY=; b=kFuop5u8Z/Y2lpV+ay9sopLZVFluNayT6PhjsMqMMjK/zFJjoh7xzMIpFZwglI7+Wo KSRg53apXHVlLH3/5jyDj4MN9Vrol7zvbPBSMrPIpsg7WB9zSGn4ituL0iZNcDYVpEop 091JWb5zE+siV3zMkt/nyLQcqSiREAZCfnuTQNByibCOqnQ5/SG/ID2rxKqo2yIVYR9o J/t5NhoURj0cc45eThBOUBIfA+p8Edgn6VbO2NaUFDpKYahlPZknnuTFFDsuzytdvspr 1zNVbw70va/NoW9xiRswcQ5bYlJbShPbla1rITF2DtzK0RWQpFG90pquq42SDx8sqXtf jrbg== X-Forwarded-Encrypted: i=1; AJvYcCWmV/ovlv/NEp5kXAClww79Qp4xTRDNNkKJSRzImQU5BWbN7h5nhqYD6aFUpT0YhJxoJKkTGhTGLgp+ajo=@vger.kernel.org X-Gm-Message-State: AOJu0Yzikeh+F/0SlRwjKZqZLMTL3o4sGVFsLYiwlK86X3KpTfmkFO9L o3P4nKtW1Vhe8tKIeLHDG734vkJ9LkkY/yRvlPngXd/IYlIt6Yni20XlxF8p3V2XgiSUOiuEzD2 A2fpSBAMt+W06WCDkLYo6jivdVupE/R8MaYulx+drgC9wSlRvS6MmEwKh1DQ5JZ1NpyA= X-Gm-Gg: ATEYQzxYpMiRp3VICMseMW9/e39ceCSF+pJlH81J9SlH0x2vxSOKPwNzsOCbIfxYbm7 oms22WDi/sRiqLnk8YHQYs4kbdZaPpLhDu8CQ1Y7xib08b8MiQY3HQZKBQJhspWMdb4bQBAKSnc xknOeoXmRZQwpYdSYO8qLRKdpu+DFa24CAneZBsppPIESZxGHqL2zP772/uxmuPHooIIESR8e93 K8BG1OzwZC0+Hhp4SN/IusrxHkiWPXH7ItcXdiHoJNEYbsFgEKEJP3oknIsB3ja0FFuiBAbRYAz mf3/A1577xhZnNXKYQek6kC6qMVFr6KfkGJbM3+BHMaIbpg7rtnQtzsrGpbGcekPGFVxr5KIHtH ORxH09gqrvo0hXOzCfcvHMci7OP0/PTTW0evAxg== X-Received: by 2002:a05:620a:471e:b0:8ca:4545:aeee with SMTP id af79cd13be357-8cbc8df0a40mr2322000885a.37.1772569124330; Tue, 03 Mar 2026 12:18:44 -0800 (PST) X-Received: by 2002:a05:620a:471e:b0:8ca:4545:aeee with SMTP id af79cd13be357-8cbc8df0a40mr2321994585a.37.1772569123830; Tue, 03 Mar 2026 12:18:43 -0800 (PST) Received: from localhost ([2a01:4b00:b703:c200:1ac0:4dff:fe39:5426]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-485133a933bsm21421905e9.14.2026.03.03.12.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2026 12:18:43 -0800 (PST) From: Punit Agrawal To: Ben Horgan Cc: amitsinght@marvell.com, baisheng.gao@unisoc.com, baolin.wang@linux.alibaba.com, carl@os.amperecomputing.com, dave.martin@arm.com, david@kernel.org, dfustini@baylibre.com, fenghuay@nvidia.com, gshan@redhat.com, james.morse@arm.com, jonathan.cameron@huawei.com, kobak@nvidia.com, lcherian@marvell.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, peternewman@google.com, punit.agrawal@oss.qualcomm.com, quic_jiles@quicinc.com, reinette.chatre@intel.com, rohit.mathew@arm.com, scott@os.amperecomputing.com, sdonthineni@nvidia.com, tan.shaopeng@fujitsu.com, xhao@linux.alibaba.com, catalin.marinas@arm.com, will@kernel.org, corbet@lwn.net, maz@kernel.org, oupton@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, kvmarm@lists.linux.dev, zengheng4@huawei.com, linux-doc@vger.kernel.org Subject: Re: [PATCH v5 00/41] arm_mpam: Add KVM/arm64 and resctrl glue code In-Reply-To: <20260224175720.2663924-1-ben.horgan@arm.com> (Ben Horgan's message of "Tue, 24 Feb 2026 17:56:39 +0000") References: <20260224175720.2663924-1-ben.horgan@arm.com> Date: Tue, 03 Mar 2026 20:18:42 +0000 Message-ID: <87y0k8r7j1.fsf@stealth> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Authority-Analysis: v=2.4 cv=Pv2ergM3 c=1 sm=1 tr=0 ts=69a74225 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=7CQSdrXTAAAA:8 a=EUspDBNiAAAA:8 a=kEJNvqoAXZf1GWF-TxsA:9 a=PEH46H7Ffwr30OY-TuGO:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-ORIG-GUID: 0TpPyahgilWqg0bUX_oqupF2wBBE8wb6 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE2NSBTYWx0ZWRfX5NR+cac0HysG IObyT037L4RMSLDIOAhgMhAyIOB6/FaaxOVHoxlugEYgfEx79xLxYjUdsOsXhoeawVfxE8bChGR 2R/6wSUiHDx4XG300WKLToLH4QO8fmrBC4x10y379qq2GKGmfBF07usNcYx1GEhMzu3FOWp8KRj 6tdsurHE9CANhSk84GH40mQmCqbKwYBtHj5xfRHrTGcdeP0A/hbMxTLfrzDwMOjwY/EQ1GqtgX+ 0PzeTmIxyXUXe8vlPnfSZg90vQcM4TTKWHVO5h+M8KOiap34SQiy2M8V29hsnQw+OP+YfUQvluq cT27CBPdCkJvkmh/b/q/WpjUhZARwTR4jQGl058EZxeg3dpaVXT9FthTH70+r4ubRMFpgXuzF7K 254jMsX8eJrLA9/wCU9YTNa9sLrwDP7KyRa05oHdvkVjsw+zpSaRNLUgHYBbhqbwxexuSqUgJoq TKr2M0LVlWoLHBxTr0g== X-Proofpoint-GUID: 0TpPyahgilWqg0bUX_oqupF2wBBE8wb6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 priorityscore=1501 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603030165 Hi Ben, Ben Horgan writes: > The main change in this version of the mpam missing pieces series is to > update the cdp emulation to match the resctrl interface. L2 and L3 > resources can now enable cdp separately. Cdp can't be hidden correctly for > memory bandwidth allocation, as max per partid can't be emulated with more > partids, and so we hide this completely when cdp is enabled. There is a little > restructuring and a few smaller changes. > > Changelogs in patches > > It would be great to get this series merged this cycle. For that we'll need > more testing and reviewing. Thanks! > > From James' cover letter: > > This is the missing piece to make MPAM usable resctrl in user-space. This has > shed its debugfs code and the read/write 'event configuration' for the monitors > to make the series smaller. > > This adds the arch code and KVM support first. I anticipate the whole thing > going via arm64, but if goes via tip instead, the an immutable branch with those > patches should be easy to do. > > Generally the resctrl glue code works by picking what MPAM features it can expose > from the MPAM drive, then configuring the structs that back the resctrl helpers. > If your platform is sufficiently Xeon shaped, you should be able to get L2/L3 CPOR > bitmaps exposed via resctrl. CSU counters work if they are on/after the L3. MBWU > counters are considerably more hairy, and depend on hueristics around the topology, > and a bunch of stuff trying to emulate ABMC. > If it didn't pick what you wanted it to, please share the debug messages produced > when enabling dynamic debug and booting with: > | dyndbg="file mpam_resctrl.c +pl" > > I've not found a platform that can test all the behaviours around the monitors, > so this is where I'd expect the most bugs. > > The MPAM spec that describes all the system and MMIO registers can be found here: > https://developer.arm.com/documentation/ddi0598/db/?lang=en > (Ignored the 'RETIRED' warning - that is just arm moving the documentation around. > This document has the best overview) > > > Based on v7.0-rc1 > > The series can be retrieved from: > https://gitlab.arm.com/linux-arm/linux-bh.git mpam_resctrl_glue_v5 I booted with the series applied on an MPAM capable platform. The driver is able to probe the L2 attached MSCs. In terms of features, bit-mapped based cache portion partitioning works as expected. The platform also supports additional controls (cache capacity and priority partitioning) and monitors (memory bandwidth and cache storage). The ones supported in MPAM driver probe OK but don't seem to be exposed. E.g., mpam:mpam_resctrl_pick_counters: class 2 is a cache but not the L3 It looks like some of it is due to an impedance mismatch with resctrl expectations but hopefully we can get to it with the basics in-place. Feel free to add Tested-by: Punit Agrawal Thanks, Punit