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 4A913313548 for ; Mon, 24 Nov 2025 15:21:09 +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=1763997671; cv=none; b=qNQthLlP5FdRicvVWs74nmBfBEKHkAR3KQwe2pLIc09wDfwJGBl1vBY8gzNcF8JeOKiikmCKCLxHdyUMTMHeO1MzCPXOtz5nGatXbcdQImDb8H495apjhmfa1qHRND3OuwAjQfn+FJKLw5S2ONEnYedYW/QZXeNRt9omFRCugAA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763997671; c=relaxed/simple; bh=BsdAQLGpRLJSdHZqTd1Sjbh6N1hN90ov2SRgLAfMpPk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=N7moYAHMJgWH6xEnb6GBtaQWnsp2mgi+JKEhV/joHkDMXD1A3wuUelJbcLC/LjNJ/I6cIKoWAerxiCbgaIIByzzgR9xJc8els5bi6MsGowuLs15cVMudcQl+IQ0qDJdilUiJrlxfrH9BIPgSI+DMtoH8EqbbMsMYmPoKV6KWxxI= 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=cyiy0pY5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=LvfBeTAu; 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="cyiy0pY5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="LvfBeTAu" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AO8tJqH2479491 for ; Mon, 24 Nov 2025 15:21:08 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=7Xp5hyyL92DGXPcsi62gt/ZC nMgydkx2tDNxw9WvsLg=; b=cyiy0pY5tq3c1wYdYzJOePxX6Pn4Do4Xu7ovIMjm y+ERWtY5iZXG1Q74vA+LYw/vWGbs7nXq1Rl8exwK/TdGFVac1l+lWNcPsHCdVw8Q jqiWbzO124WbyPLndoNDD6zBVy8YkTX+scynTB9HzSaq4IH0/x0v6eOEpTNQ7OWp peThRHbSGlYGzn3vIGa54OfkhZ/v39Vnpo8R6KtzIDRmG8qkhoS7dE3hRItaCtxs VpOYVrw0w2SM/nrA7sv12svu7/2AYABD2HUGeuvsgMysAAs7TTdP2dlkqrjSXpVn PSLpiWU5uj0CVOFc53Z5Hy5Agm+2cwxucOe9NAQEFMy8KQ== Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ak68dwe0b-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 24 Nov 2025 15:21:08 +0000 (GMT) Received: by mail-vs1-f71.google.com with SMTP id ada2fe7eead31-5dfaab3a44dso8675891137.1 for ; Mon, 24 Nov 2025 07:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1763997667; x=1764602467; 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=7Xp5hyyL92DGXPcsi62gt/ZCnMgydkx2tDNxw9WvsLg=; b=LvfBeTAuZhCRC0nuCRvXRwq40Bbrvr0zqZG9cA3cAHAmgeN9czioVHU4QHgTIBcJpJ SvYNc70Hg44zzhvY6QpqwxDeFQ33/1Bt1oGpuIy+VP9kk/dQ2O70FinglXeibiTiJOkz UzBCD4oLkktYbfYnvTYM007fFar7jSvZvRFocieGLkCwiJjmzlFuDDwYj7cjxjGRShBi Efbq9AEzxmKXuKP3FC88Xx0b/8gg56FGZ2GYPXuflBlaQASnNNSJNUWFtOqjnIOCGl5f YoDHks2sR1f/2brXs7xbV5DPTSJ/KJAY5Iy0wU6nhFLVaQ330gNkCHNMQW+MleaCOMDL q1WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763997667; x=1764602467; 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=7Xp5hyyL92DGXPcsi62gt/ZCnMgydkx2tDNxw9WvsLg=; b=kDBxMiYglkiIJMyfOX0XMaOLa6uw09yVIg20V0J3/9H5OAmOczo1Yqn11C4ENS0hNd vYK2DG89Qc0UCLsJZd5AgJFOFQeLI60s7Mt1h6vgQ/hJBp8kSAz8o04d2KcIdxVFi8q+ lyNpVuc9y0k1ibzHTlPSo83fibMf//fZzE9kIhwN5EwQYjtjqf7S3vwmSNhQt8fWhfTE BlDUJ6Wm7ous84XuadMS8rsK6Qr9OxZd+i1mUuA77Hva7NGUW+028qt+uqu6dlMA3Hn2 +UdZc+ApHz9VyYHV/9Nu2CBVsJe5ASYCG6wpfxs0qD0czOVN7ElMoyUBdxX0bsyL0bu/ EtQg== X-Forwarded-Encrypted: i=1; AJvYcCVz3XCi5/2nFrYjlKa6oaBSp/8Qj/R3Pcy4TuotmSPQnJv4EEWgkgbij+yjdUvPLGsmWf40K6Zl5CkfArM=@vger.kernel.org X-Gm-Message-State: AOJu0Yyqht0yuJh1Z9spABFndW1Wch5EselpkA7+KSROQxXgIwcdp5pc xJXmpp6s8M/H7k2vM+oaLFqR9be+TiSNWWAfBOHaE0wLC1N3ueKdwE/dEGLZxxT+fgUBqUcfTI1 ApQ0anoX8WsabOHoGLc55tOe4SXSl6QU+sImhwRg6NMxvI6NaZlpEh4gAsqvSQFk/QHY= X-Gm-Gg: ASbGncuYbqvBnoSxe/uXyjxuSdS1L+A9bNuwj897AlwvwcnZdLnXFpPCMZrjbgCLBdv UYlOajuLPdL8H4dI5TZSzJcx2Qn6GbifIba7/xk+ZG6xh67Y9v4dhZIEOtipjTu2/t7ld0in8kf N/nWsvssFczTv1W9F3yqoxECVZ9dI3hLjYWVizXprvPcOOx94w+sh17xUCX842HEKh9sIXEHbJt 7e34xp7YsS4hACiwO+x7NSTx1hBuxS3PLkD9pzgFB28lNxKT9ACgMTocTIRyUCF3NW+6+g9ngZI R2UF/FyI5DQ4xNOdF7iO5IeLquctE4D7KoHXheRBwLlmPUr0aV31AAyyejTaKPpKsHhGyMyIGZq cQpgm7NFg4P3rJQossnMvJGAq X-Received: by 2002:a67:e7ca:0:b0:5db:db1d:e1cc with SMTP id ada2fe7eead31-5e1de3add6bmr3993489137.23.1763997667147; Mon, 24 Nov 2025 07:21:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwLbgq+f0syhYUIH8yRhYl+rqLz6oua3c3D1yhqylImpHoqxcKHLhjT0WLSt++6fQeJ9uiEQ== X-Received: by 2002:a67:e7ca:0:b0:5db:db1d:e1cc with SMTP id ada2fe7eead31-5e1de3add6bmr3993454137.23.1763997666665; Mon, 24 Nov 2025 07:21:06 -0800 (PST) Received: from localhost ([2a01:4b00:b703:c200:1ac0:4dff:fe39:5426]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-477bf226c2asm199781335e9.10.2025.11.24.07.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Nov 2025 07:21:06 -0800 (PST) From: Punit Agrawal To: Ben Horgan , james.morse@arm.com Cc: amitsinght@marvell.com, baisheng.gao@unisoc.com, baolin.wang@linux.alibaba.com, bobo.shaobowang@huawei.com, carl@os.amperecomputing.com, catalin.marinas@arm.com, dakr@kernel.org, dave.martin@arm.com, david@redhat.com, dfustini@baylibre.com, fenghuay@nvidia.com, gregkh@linuxfoundation.org, gshan@redhat.com, guohanjun@huawei.com, jeremy.linton@arm.com, jonathan.cameron@huawei.com, kobak@nvidia.com, lcherian@marvell.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, lpieralisi@kernel.org, peternewman@google.com, quic_jiles@quicinc.com, rafael@kernel.org, robh@kernel.org, rohit.mathew@arm.com, scott@os.amperecomputing.com, sdonthineni@nvidia.com, sudeep.holla@arm.com, tan.shaopeng@fujitsu.com, will@kernel.org, xhao@linux.alibaba.com, reinette.chatre@intel.com Subject: Re: [PATCH v6 00/34] arm_mpam: Add basic mpam driver In-Reply-To: <20251119122305.302149-1-ben.horgan@arm.com> (Ben Horgan's message of "Wed, 19 Nov 2025 12:22:30 +0000") References: <20251119122305.302149-1-ben.horgan@arm.com> Date: Mon, 24 Nov 2025 15:21:05 +0000 Message-ID: <877bvfa23i.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-Proofpoint-GUID: etFIp8V2MgHre-lZeA-ecPNpQJIGylV7 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI0MDEzNCBTYWx0ZWRfX8A5rGzWKruPn 3Ad4IckJEy0MS/8mFMj4hsI9B4sK46YU+B2aGvjHjnJAQajaU6AwIspWzCinevFZRaRz5clXWPR qoTfV9Y3Fa4LkBkNWyIYi9rfJuhafhouBsYeJNsrC0LXupxCWaFnGHYelUjrPHcDWplSpDO1sn3 juviOBd9KN2TvYtaLzY4zEGHCdy/L/neDeXq2RDrvu0yUkNWlTWQ3WnSrYoshlQtZyhOs0d7owX t1Ebi2ehCL8rzfKVY6NknuTmT338h9HFOGMT8cERYu9JI0807onRggitnLYrpiLHkJefk29yBAQ OieecIO8gDssw0n0OUQPLTuVab2emoFKnB5vd5g2w== X-Authority-Analysis: v=2.4 cv=UsBu9uwB c=1 sm=1 tr=0 ts=692477e4 cx=c_pps a=P2rfLEam3zuxRRdjJWA2cw==:117 a=xqWC_Br6kY4A:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=7CQSdrXTAAAA:8 a=VwQbUJbxAAAA:8 a=kNSAGAUgJmWAU3osOT0A:9 a=ODZdjJIeia2B_SHc_B0f:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-ORIG-GUID: etFIp8V2MgHre-lZeA-ecPNpQJIGylV7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-24_06,2025-11-24_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511240134 Hi Ben, James Ben Horgan writes: > Hi all, > > Just a handful of minor changes based on v5 review comments. See individual > patches for change lgos. I haven't asked James to host any branches for this > revision but please let me know if this would be helpful to anyone. Thanks for > all the help with reviews and testing. > > Previous cover letter from James: > > This is just enough MPAM driver for ACPI. DT got ripped out. If you need DT > support - please share your DTS so the DT folk know the binding is what is > needed. > This doesn't contain any of the resctrl code, meaning you can't actually drive it > from user-space yet. Because of that, its hidden behind CONFIG_EXPERT. > This will change once the user interface is connected up. > > This is the initial group of patches that allows the resctrl code to be built > on top. Including that will increase the number of trees that may need to > coordinate, so breaking it up make sense. > > The locking got simplified, but is still strange - this is because of the 'mpam-fb' > firmware interface specification that is still alpha. That thing needs to wait for > an interrupt after every system register write, which significantly impacts the > driver. Some features just won't work, e.g. reading the monitor registers via > perf. > > 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) > > The expectation is this will go via the arm64 tree. > > This series is based on v6.18-rc4, and can be retrieved from: (no v6 version) > https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/driver/v5 > > The rest of the driver can be found here: (no v6 version) > https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v6.18-rc4-v5 > > What is MPAM? Set your time-machine to 2020: > https://lore.kernel.org/lkml/20201030161120.227225-1-james.morse@arm.com/ Although a little late to the party, I've managed to throw together enough firmware to describe the MPAM hardware and take this set (more specifically mpam/snapshot/v6.18-rc4-v5 branch from James' repository) for a spin. Using the branch, the kernel is able to probe the hardware and discover the advertised features. Yay! We are in business. Having said that, there are a few quirks of the platform that run into issues with later patches in the branch. The platform has MSCs attached to shared L2 caches which are being skipped during later stages of initialisation. IIUC, the L2 MSCs' limitations stems from the assumptions in the resctrl interface. I was wondering if there are any patches available to relax these limitations? I can give them a try. Or do these need to be put together from the ground up? Any pointers greatly appreciated. Thanks, Punit [...]