From nobody Sat Jun 13 08:46:26 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 7133335CB61; Fri, 8 May 2026 10:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778237800; cv=none; b=TT7uIVr4LCbx8PpNDpzWXJXKdwCORrZSWklGRewZc53K3/n097ztxWI7/0/MUmVrXYDiKE565Xi79kKH49QHCV792KUAGBu1AgsAYEANwFi2moiNIO6xPg1kIwK6f9eEkYfosc6yR+wIKayzQ2dXBU357DAcsTLiwQsuCGrHW9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778237800; c=relaxed/simple; bh=hMa7Bqs/wNTWrXHCY+CDw3Dg3Gcf8RfPC9Mq/aiONOA=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=Fk4siEcnFNtwK0MUp5c1AvmWvz15JB5VKMj0GmnbLJaJviBLLMlaUhe7NfB8waWVIRClp2T48RpCpIl8B1vEbFscrR3XAOMXfYf2WigiWCC+VMR5EgPj0dMAJr5TPRRaDQZsXLZhECyuykVgbKfVaV0trth+q+B1qnhncZi8WsE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=k/ND8Qrw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yfeY6sRU; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="k/ND8Qrw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yfeY6sRU" Date: Fri, 08 May 2026 10:56:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1778237797; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N49iQgY2eF2uazrz1W8P1sRC8W6OKUxNNRnlZkRDSXs=; b=k/ND8QrwSFg8JHjeX+0A/PAB4dl37oy2HUUKmWW4DxQ30S0MoNNeEsTRAXoLxE6yjFHn/g D/zgcxMkvXbg8WpZEVCZuuBYa4C20naGxfqp8CfleDTAHUJmIgspC4tTC6BbQNzZTtTFGb h0mt4Fc4FpcehvSEPdhFTqxHuH6r4bFb6j1i6hr03RDUV6OHCm/rQp8idhlXCoosSqB6bu shYI0zF2L7GGmZKHpuBpTQFUCPRFA72Ct+7hnT8wgA51iGwvR8iS62haVwAN2JzLWTmt3y e/0T/4KzTgOq2J1lBJWujutx+szKiMPU16EXnpRiHhUsSWtkLUxGcgk+rjykrQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1778237797; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N49iQgY2eF2uazrz1W8P1sRC8W6OKUxNNRnlZkRDSXs=; b=yfeY6sRUhFgejoqVYQM9ywEo0X9dDllhDYyLR+lLIhGbamhTCZq3gDs4XxnKIPouN7jh/9 kP0QQo5cnbb7jVAg== From: "tip-bot2 for Ben Horgan" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cache] fs/resctrl: Add monitor property 'mbm_cntr_assign_fixed' Cc: Ben Horgan , "Borislav Petkov (AMD)" , Babu Moger , Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177823779554.864.405411780333049669.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cache branch of tip: Commit-ID: ee3d4c81d89c92fbeb65807971ac22b3dfa49220 Gitweb: https://git.kernel.org/tip/ee3d4c81d89c92fbeb65807971ac22b3d= fa49220 Author: Ben Horgan AuthorDate: Wed, 06 May 2026 09:28:52 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Thu, 07 May 2026 16:29:14 +02:00 fs/resctrl: Add monitor property 'mbm_cntr_assign_fixed' Commit 3b497c3f4f04 ("fs/resctrl: Introduce the interface to display monitoring = modes") introduced CONFIG_RESCTRL_ASSIGN_FIXED but left adding the Kconfig entry until it was necessary. The counter assignment mode is fixed in MPAM, even when there are assignable counters, and so addressing this is needed to support MPAM. To avoid the burden of another Kconfig entry, replace CONFIG_RESCTRL_ASSIGN_FIXED with a new property in 'struct resctrl_mon', 'mbm_cntr_assign_fixed' to be set by the architecture. Do not request the architecture to change the counter assignment mode if it does not support doing so. Provide insight to user space about why such a request fails. Signed-off-by: Ben Horgan Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Babu Moger Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/20260506082855.3694761-1-ben.horgan@arm.com --- fs/resctrl/monitor.c | 8 +++++++- include/linux/resctrl.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index 916f7a9..5fbcc64 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -1456,7 +1456,7 @@ int resctrl_mbm_assign_mode_show(struct kernfs_open_f= ile *of, else seq_puts(s, "[default]\n"); =20 - if (!IS_ENABLED(CONFIG_RESCTRL_ASSIGN_FIXED)) { + if (!r->mon.mbm_cntr_assign_fixed) { if (enabled) seq_puts(s, "default\n"); else @@ -1507,6 +1507,12 @@ ssize_t resctrl_mbm_assign_mode_write(struct kernfs_= open_file *of, char *buf, } =20 if (enable !=3D resctrl_arch_mbm_cntr_assign_enabled(r)) { + if (r->mon.mbm_cntr_assign_fixed) { + ret =3D -EINVAL; + rdt_last_cmd_puts("Counter assignment mode is not configurable\n"); + goto out_unlock; + } + ret =3D resctrl_arch_mbm_cntr_assign_set(r, enable); if (ret) goto out_unlock; diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 06e8c72..73ff522 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -294,6 +294,7 @@ enum resctrl_schema_fmt { * @mbm_assign_on_mkdir: True if counters should automatically be assigned= to MBM * events of monitor groups created via mkdir. * @mbm_cntr_configurable: True if assignable counters are configurable. + * @mbm_cntr_assign_fixed: True if the counter assignment mode is fixed. */ struct resctrl_mon { u32 num_rmid; @@ -302,6 +303,7 @@ struct resctrl_mon { bool mbm_cntr_assignable; bool mbm_assign_on_mkdir; bool mbm_cntr_configurable; + bool mbm_cntr_assign_fixed; }; =20 /**