Skip to content

Please pull MPAM 26.04 linux nvidia bos.glue.others.cpu less.hardlimit#429

Open
fyu1 wants to merge 111 commits into
NVIDIA:26.04_linux-nvidia-bosfrom
fyu1:26.04_linux-nvidia-bos.glue.others.cpu_less.hardlimit
Open

Please pull MPAM 26.04 linux nvidia bos.glue.others.cpu less.hardlimit#429
fyu1 wants to merge 111 commits into
NVIDIA:26.04_linux-nvidia-bosfrom
fyu1:26.04_linux-nvidia-bos.glue.others.cpu_less.hardlimit

Conversation

@fyu1
Copy link
Copy Markdown
Collaborator

@fyu1 fyu1 commented May 18, 2026

This MPAM PR has 4 parts:

  1. The first 47 patches are cherry picked from 7.1-rc upstream for MPAM part 2 glue series;
  2. The patch 48 enable RESCTRL_FS in annotations
  3. The patches 49-114 are VR features (iommu, cmin/cmax, cpu-less and hardlimit) and are forward ported from 6.17 hwe kernel.
  4. The patch 115 fixes a couple of bugs on Grace.

Let me fix a few small issue before you could review and merge the PR.

@nirmoy
Copy link
Copy Markdown
Collaborator

nirmoy commented May 18, 2026

Boro watcher review skipped

The GitHub watcher skips automatic boro reviews for PRs with more than 50 commits. This PR currently has 100 commits.

To run the review anyway, ask BaseOS_Kernel_Bot in #baseos-kernel:

review https://github.com/NVIDIA/NV-Kernels/pull/429

Head: 528acc74034c

This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher sees a newer PR head.

@fyu1 fyu1 changed the title Please pull 26.04 linux nvidia bos.glue.others.cpu less.hardlimit Please pull MPAM 26.04 linux nvidia bos.glue.others.cpu less.hardlimit May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 111 commits...

Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 528acc74034c │ [SAUCE] fix mbm_l3_assign and mon_local_bytes                    │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 08b0e6b9c4e9 │ [SAUCE] documentation: resctrl: document max_lim and mb_hlim for │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ c43f81471a7f │ [SAUCE] resctrl: add mba max_lim sysfs and visibility from init  │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 8ee5f5c13af6 │ [SAUCE] resctrl/mpam: populate mba mb_max_lim from mpam probe    │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 98359be5fbde │ [SAUCE] resctrl: add membw.mb_max_lim and arch_has_mb_max_lim    │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 26a6927e48d8 │ [SAUCE] resctrl/mpam: bind mb_hlim resource to mba mpam class    │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 692ab7cb5e5d │ [SAUCE] resctrl/mpam: track mbw max hard-limit in config         │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b933d1e4b9a8 │ [SAUCE] resctrl/mpam: probe mpamf_mbw_idr max_lim and hardlim_rw │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 05a3cb83754e │ [SAUCE] resctrl: wire mb_hlim schemata parsing and group setup   │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ bd9ed5e5d6fd │ [SAUCE] resctrl: add mb_hlim resource id and schema type         │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 021116cf767f │ [SAUCE] iommu/arm-smmu-v3: fix mpam for indentity-mappings       │ N/A        │ N/A     │ sdonthin, fenghuay        │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 4eb09a4ce3d1 │ [SAUCE] resctrl/mpam: reset ris by applying explicit default con │ N/A        │ N/A     │ sdonthin, fenghuay        │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 9d421853e37f │ [SAUCE] arm_mpam: include all associated                         │ N/A        │ N/A     │ sdonthin, fenghuay        │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 6f098bb96fb4 │ [SAUCE] arm_mpam: handle cpu-less numa nodes                     │ N/A        │ N/A     │ sdonthin, fenghuay        │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 8b2486b0cece │ [SAUCE] arm_mpam: avoid msc teardown for the sw programming erro │ N/A        │ N/A     │ sdonthin, fenghuay        │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 7aba480c6de6 │ [SAUCE] arm_mpam: resctrl: add the glue code to convert to/from  │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b4fd4e78d2ce │ [SAUCE] fs/resctrl: add l2 and l3 'max' resource schema          │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ e6b34027297e │ [SAUCE] fs/resctrl: expose the schema format to user-space       │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 0cde0fc228e8 │ [SAUCE] fs/resctrl: add fflags_from_schema() for files based on  │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 653b836914c8 │ [SAUCE] fs/resctrl: add additional files for percentage and bitm │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 2214dfae43eb │ [SAUCE] fs/resctrl: remove 'range' schema format                 │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 395362c03fe8 │ [SAUCE] arm_mpam: resctrl: convert mb resource to use percentage │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 37c0b389ec70 │ [SAUCE] x86/resctrl: move over to specifying mba control formats │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 09068268b50b │ [SAUCE] fs/resctrl: add specific schema types for 'range'        │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 54e969e8c8da │ [SAUCE] fs/resctrl: use schema format to check the resource is a │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 6ef9c5900811 │ [SAUCE] fs/resctrl: add a schema format to the schema, allowing  │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ e13c5ec40676 │ [SAUCE] fs/resctrl: rename resctrl_get_default_ctrl() to include │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 6756bea16ce5 │ [SAUCE] fs/resctrl: move mba supported check to parse_line() ins │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ e5bac76f7920 │ [SAUCE] fs/resctrl: abstract duplicate domain test to a helper   │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ abbbc088b493 │ [SAUCE] fs/resctrl: group all the mba specific properties in a s │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 03963c1de829 │ [SAUCE] arm_mpam: rename mbw conversion to 'fract16' for code re │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 0919a4a9b911 │ [SAUCE] arm_mpam: allow cmax/cmin to be configured               │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ c8ea6796ab48 │ [SAUCE] fs/resctrl: uniform data type of component_id/domid/id/c │ N/A        │ N/A     │ nie, morse, fenghuay      │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 759999febb03 │ [SAUCE] fs/restrl: allow the overflow handler to be disabled     │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d6a3059e5eb0 │ [SAUCE] arm_mpam: resctrl: determine if any exposed counter can  │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 995d6eb61b2a │ [SAUCE] x86/resctrl: add stub to allow other architecture to dis │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b7710820897f │ [SAUCE] fs/resctrl: add support for assigning iommu_groups to re │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 01ce66aafb1f │ [SAUCE] arm_mpam: resctrl: add iommu helpers to get/set the part │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ fc5461c786ec │ [SAUCE] kobject: add kset_get_next_obj() to allow a kset to be w │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 54198ec24988 │ [SAUCE] iommu: add helper to retrieve iommu kset                 │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 0c68f7cddba8 │ [SAUCE] iommu: add helpers to retrieve iommu_groups by id or kob │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d41eb682d1e2 │ [SAUCE] iommu: add helpers to get and set the qos state          │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ fede0c715030 │ [SAUCE] iommu/arm-smmu-v3: add mpam helpers to query and set sta │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f8372cc0eccd │ [SAUCE] iommu/arm-smmu-v3: register smmu capabilities with mpam  │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b0a52ac827ab │ [SAUCE] fs/resctrl: add this_is_not_abi mount option             │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 499cff4ffac0 │ [SAUCE] arm_mpam: allow msc to be forced to have an unknown loca │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 462ace23cb88 │ [SAUCE] arm_mpam: allow the maximum partid to be overridden from │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ a9eb59b0a15e │ [SAUCE] arm_mpam: split the locking around the mon_sel registers │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d212f0ec1bf8 │ [SAUCE] fs/resctrl,x86/resctrl: factor mba rounding to be per-ar │ N/A        │ N/A     │ Martin, morse, fenghuay   │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b0e63b34610a │ [SAUCE] arm_mpam: add resctrl_arch_round_bw()                    │ N/A        │ N/A     │ Martin, morse, fenghuay   │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ cea265a3fe5d │ [SAUCE] arm_mpam: expose the number of nrdy retries in debugfs   │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 6ab0589536bf │ [SAUCE] arm_mpam: add force-disable debugfs trigger              │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 2502c03ad9db │ [SAUCE] arm_mpam: add debugfs entries to show the msc/ris the dr │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 03743ceef084 │ [SAUCE] debugfs: add helpers for creating cpumask entries in deb │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 5edcd8794190 │ [SAUCE] fs/resctrl: avoid a race with dom_data_exit() and rmid_p │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f7c4ad1059a3 │ [SAUCE] fs/resctrl: avoid a race with dom_data_exit() and closid │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 69c0f2e18055 │ [SAUCE] arm_mpam: resctrl: add resctrl_arch_cntr_read() & resctr │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ fc0583081c53 │ [SAUCE] arm_mpam: resctrl: add resctrl_arch_rmid_read() and resc │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 2d636ae29431 │ [SAUCE] arm_mpam: resctrl: add resctrl_arch_config_cntr() for ab │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ a7362f614447 │ [SAUCE] arm_mpam: resctrl: add kunit test for abmc/cdp interacti │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b4fca44e044e │ [SAUCE] arm_mpam: resctrl: pre-allocate assignable monitors      │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 365864f93c81 │ [SAUCE] arm_mpam: resctrl: pre-allocate free running monitors    │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f4aa9300baa3 │ [SAUCE] untested: arm_mpam: resctrl: pick classes for use as mbm │ N/A        │ N/A     │ morse, fenghuay           │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 4f4c34e525a9 │ [SAUCE] update annotations to set config_resctrl_fs              │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 1f1d6e8060c9 │ 4d5bbbafc170 arm_mpam: resctrl: Make resctrl_mon_ctx_waiters sta │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 861951fa2df9 │ 67c0a487efa5 arm_mpam: resctrl: Fix the check for no monitor com │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 03d37c73a4f3 │ f758340da529 arm_mpam: resctrl: Fix MBA CDP alloc_capable handli │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d64319c2de6a │ 79727019ce3d fs/resctrl: Add missing return value descriptions   │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d695305e87cd │ c611752be9d7 MAINTAINERS: Update resctrl entry                   │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 7b3040b4405e │ d2bf45d067c7 fs/resctrl: Add "*" shorthand to set io_alloc CBM f │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 89365950d0e0 │ d06b8e7c97c3 fs/resctrl: Report invalid domain ID when parsing i │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 210c22f92872 │ 4ce0a2ccc035 arm64: mpam: Add initial MPAM documentation         │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 3f4b0259a6b5 │ aeb8595a5f8b arm_mpam: Quirk CMN-650's CSU NRDY behaviour        │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 2972f9f5fd62 │ dc48eb1ff27c arm_mpam: Add workaround for T241-MPAM-6            │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 4d990ece5959 │ a7efe23ed6dd arm_mpam: Add workaround for T241-MPAM-4            │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d591d5aab2a3 │ 70e81fbedc65 arm_mpam: Add workaround for T241-MPAM-1            │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 58c3d617c46e │ fa7745218c98 arm_mpam: Add quirk framework                       │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ c6f0b1044836 │ fb481ec08699 arm_mpam: resctrl: Call resctrl_init() on platforms │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ fc4306b23dae │ 4aab135bda16 arm64: mpam: Select ARCH_HAS_CPU_RESCTRL            │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 4b9cda602c47 │ ec9a788620be ALSA: usb-audio: Replace hard-coded number with MAX │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 6e84ac62e4ae │ efc775eadce2 arm_mpam: resctrl: Add empty definitions for assort │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ eea69ee93daa │ 49b04e401825 arm_mpam: resctrl: Update the rmid reallocation lim │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 2c1e9cc27bb5 │ fb56b29932ca arm_mpam: resctrl: Add resctrl_arch_rmid_read()     │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 90f2d2c812f9 │ 2a3c79c61539 arm_mpam: resctrl: Allow resctrl to allocate monito │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ dabef5338531 │ 1458c4f05335 arm_mpam: resctrl: Add support for csu counters     │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b2e6a269b17c │ 264c285999fc arm_mpam: resctrl: Add monitor initialisation and d │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 94f721554ea1 │ 5dc8f73eaa5d arm_mpam: resctrl: Add kunit test for control forma │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 1498105f0246 │ 36528c7681b8 arm_mpam: resctrl: Add support for 'MB' resource    │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b65db4a996cc │ 1c1e2968a860 arm_mpam: resctrl: Wait for cacheinfo to be ready   │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ efec4029e64f │ 3e9b35823aab arm_mpam: resctrl: Add rmid index helpers           │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ cf973817e430 │ 80d147d29313 arm_mpam: resctrl: Convert to/from MPAMs fixed-poin │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 43b85376c00a │ 01a0021f6c39 arm_mpam: resctrl: Hide CDP emulation behind CONFIG │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d0d32087a193 │ 6789fb99282c arm_mpam: resctrl: Add CDP emulation                │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ a02d2de30536 │ 9d2e1a99fae5 arm_mpam: resctrl: Add plumbing against arm64 task  │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ a168442b69d0 │ 9cd2b522be2c arm_mpam: resctrl: Implement helpers to update conf │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 6a605a7c92b3 │ 02cc66168788 arm_mpam: resctrl: Add resctrl_arch_get_config()    │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ dc6c600f40e7 │ 370d166d878d arm_mpam: resctrl: Implement resctrl_arch_reset_all │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 66856e44cf31 │ 52a4edb16121 arm_mpam: resctrl: Pick the caches we will use as r │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ acb5161fbc8b │ 09e61daf8e96 arm_mpam: resctrl: Add boilerplate cpuhp and domain │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 040a3c462873 │ 2cf9ca3fae38 arm64: mpam: Add helpers to change a task or cpu's  │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ e5997b3f7bb3 │ 37fe0f984d9c arm64: mpam: Initialise and context switch the MPAM │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 21ae57dad250 │ 735dad999905 arm64: mpam: Add cpu_pm notifier to restore MPAM sy │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 4f6c8197d77a │ 831a7f16728c arm64: mpam: Advertise the CPUs MPAM limits to the  │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f0902a5cdf14 │ c544f00a4732 arm64: mpam: Drop the CONFIG_EXPERT restriction     │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 43f5e029d64e │ 87b78a5d70e8 arm64: mpam: Re-initialise MPAM regs when CPU comes │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 05beba071b36 │ 8e06d04ff1cf arm64: mpam: Context switch the MPAM registers      │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 812eb94d1429 │ 2e7c684bdb50 KVM: arm64: Make MPAMSM_EL1 accesses UNDEF          │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 191dcb3c49ad │ eda1cd1f9d29 KVM: arm64: Preserve host MPAM configuration when c │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f3314d5063b1 │ 29fa1be82b83 arm64/sysreg: Add MPAMSM_EL1 register               │ match      │ match   │ preserved + fenghuay adde │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 28f5d84f0901 │ a1cb6577f575 arm_mpam: Reset when feature configuration bit unse │ match      │ match   │ preserved + f
...(truncated)

@clsotog
Copy link
Copy Markdown
Collaborator

clsotog commented May 18, 2026

Some findings from Codex:

  • [P1] drivers/resctrl/mpam_fb.c:124 and :155: the PCC buffer-size checks are reversed. if (msg_len < chan->pcc_shmem_size) return -EINVAL; rejects normal fitting messages and allows oversized messages to reach memcpy(). This should be msg_len > chan->pcc_shmem_size.
  • [P1] drivers/resctrl/mpam_fb.c:116 and :147: SCMI transfer errors are ignored. Reads return success with possibly uninitialized result, and writes report success even if firmware rejected the transfer. The return from mpam_transfer_buf() needs to propagate back to
    callers.
  • [P1] drivers/acpi/arm64/mpam.c:184: the interconnect descriptor UUID check is inverted. The code errors when guid_equal() is true, so valid descriptor tables are rejected and invalid UUIDs continue parsing.
  • [P1] drivers/resctrl/mpam_resctrl.c:1645: mpam_resctrl_monitor_init() ignores the return value from mpam_resctrl_monitor_init_abmc(). On allocation failure, assigned_counters can be left as an ERR_PTR, setup still succeeds, and later counter assignment paths can
    dereference it.
  • [P2] fs/resctrl/rdtgroup.c:906: show_rdt_iommu() calls iommu_group_get_from_kobj() but never calls iommu_group_put() for each returned group. Reading the tasks file leaks one IOMMU group reference per listed group.

@nirmoy nirmoy added the help wanted Extra attention is needed label May 21, 2026
@nvidia-bfigg nvidia-bfigg force-pushed the 26.04_linux-nvidia-bos branch from b496691 to 3ab3db0 Compare May 22, 2026 12:02
@fyu1
Copy link
Copy Markdown
Collaborator Author

fyu1 commented May 22, 2026

Some findings from Codex:

  • [P1] drivers/resctrl/mpam_fb.c:124 and :155: the PCC buffer-size checks are reversed. if (msg_len < chan->pcc_shmem_size) return -EINVAL; rejects normal fitting messages and allows oversized messages to reach memcpy(). This should be msg_len > chan->pcc_shmem_size.
  • [P1] drivers/resctrl/mpam_fb.c:116 and :147: SCMI transfer errors are ignored. Reads return success with possibly uninitialized result, and writes report success even if firmware rejected the transfer. The return from mpam_transfer_buf() needs to propagate back to
    callers.
    Firmware Backend (FB) MSC access feature is not supported on Grace/Vera. I will remove the two FB related patches. So the above two issues should be gone.
  • [P1] drivers/acpi/arm64/mpam.c:184: the interconnect descriptor UUID check is inverted. The code errors when guid_equal() is true, so valid descriptor tables are rejected and invalid UUIDs continue parsing.
    Currently Grace/Vera don't support interconnect type of MSC. The code here just show it's not supported. If the feature is supported in the future. This code needs to be changed and mode code will be added.
    So no change here now.
  • [P1] drivers/resctrl/mpam_resctrl.c:1645: mpam_resctrl_monitor_init() ignores the return value from mpam_resctrl_monitor_init_abmc(). On allocation failure, assigned_counters can be left as an ERR_PTR, setup still succeeds, and later counter assignment paths can
    dereference it.
    Fixed.
  • [P2] fs/resctrl/rdtgroup.c:906: show_rdt_iommu() calls iommu_group_get_from_kobj() but never calls iommu_group_put() for each returned group. Reading the tasks file leaks one IOMMU group reference per listed group.
    Fixed.

Thank you for your comments!

@nvidia-bfigg nvidia-bfigg force-pushed the 26.04_linux-nvidia-bos branch from 3ab3db0 to 704a746 Compare May 22, 2026 19:37
henryZe and others added 13 commits May 22, 2026 21:30
The per-RIS flag, in_reset_state, indicates whether or not the MSC
registers are in reset state, and allows avoiding resetting when they are
already in reset state. However, when mpam_apply_config() updates the
configuration it doesn't update the in_reset_state flag and so even after
the configuration update in_reset_state can be true and mpam_reset_ris()
will skip the actual register restoration on subsequent resets.

Once resctrl has a MPAM backend it will use resctrl_arch_reset_all_ctrls()
to reset the MSC configuration on unmount and, if the in_reset_state flag
is bogusly true, fail to reset the MSC configuration. The resulting
non-reset MSC configuration can lead to persistent performance restrictions
even after resctrl is unmounted.

Fix by clearing in_reset_state to false immediately after successful
configuration application, ensuring that the next reset operation
properly restores MSC register defaults.

Fixes: 09b89d2 ("arm_mpam: Allow configuration to be applied and restored during cpu online")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Acked-by: Ben Horgan <ben.horgan@arm.com>
[Horgan: rewrite commit message to not be specific to resctrl unmount]
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit f91e913)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
To indicate that the configuration, of the controls used by resctrl, in a
RIS need resetting to driver defaults the reset flags in mpam_config are
set. However, these flags are only ever set temporarily at RIS scope in
mpam_reset_ris() and hence mpam_cpu_online() will never reset these
controls to default. As the hardware reset is unknown this leads to unknown
configuration when the control values haven't been configured away from the
defaults.

Use the policy that an unset feature configuration bit means reset. In this
way the mpam_config in the component can encode that it should be in reset
state and mpam_reprogram_msc() will reset controls as needed.

Fixes: 09b89d2 ("arm_mpam: Allow configuration to be applied and restored during cpu online")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
[ morse: Removed unused reset flags from config structure ]
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit a1cb657)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
The MPAMSM_EL1 register determines the MPAM configuration for an SMCU. Add
the register definition.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 29fa1be)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
When KVM enables or disables MPAM traps to EL2 it clears all other bits in
MPAM2_EL2.  Notably, it clears the partition ids (PARTIDs) and performance
monitoring groups (PMGs). Avoid changing these bits in anticipation of
adding support for MPAM in the kernel. Otherwise, on a VHE system with the
host running at EL2 where MPAM2_EL2 and MPAM1_EL1 access the same register,
any attempt to use MPAM to monitor or partition resources for kernel space
would be foiled by running a KVM guest. Additionally, MPAM2_EL2.EnMPAMSM is
always set to 0 which causes MPAMSM_EL1 to always trap. Keep EnMPAMSM set
to 1 when not in a guest so that the kernel can use MPAMSM_EL1.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit eda1cd1)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
The MPAMSM_EL1 register controls the MPAM labeling for an SMCU, Streaming
Mode Compute Unit. As there is no MPAM support in KVM, make sure MPAMSM_EL1
accesses trigger an UNDEF.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 2e7c684)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
MPAM allows traffic in the SoC to be labeled by the OS, these labels are
used to apply policy in caches and bandwidth regulators, and to monitor
traffic in the SoC. The label is made up of a PARTID and PMG value. The x86
equivalent calls these CLOSID and RMID, but they don't map precisely.

MPAM has two CPU system registers that is used to hold the PARTID and PMG
values that traffic generated at each exception level will use. These can
be set per-task by the resctrl file system. (resctrl is the defacto
interface for controlling this stuff).

Add a helper to switch this.

struct task_struct's separate CLOSID and RMID fields are insufficient to
implement resctrl using MPAM, as resctrl can change the PARTID (CLOSID) and
PMG (sort of like the RMID) separately. On x86, the rmid is an independent
number, so a race that writes a mismatched closid and rmid into hardware is
benign. On arm64, the pmg bits extend the partid.
(i.e. partid-5 has a pmg-0 that is not the same as partid-6's pmg-0).  In
this case, mismatching the values will 'dirty' a pmg value that resctrl
believes is clean, and is not tracking with its 'limbo' code.

To avoid this, the partid and pmg are always read and written as a
pair. This requires a new u64 field. In struct task_struct there are two
u32, rmid and closid for the x86 case, but as we can't use them here do
something else. Add this new field, mpam_partid_pmg, to struct thread_info
to avoid adding more architecture specific code to struct task_struct.
Always use READ_ONCE()/WRITE_ONCE() when accessing this field.

Resctrl allows a per-cpu 'default' value to be set, this overrides the
values when scheduling a task in the default control-group, which has
PARTID 0. The way 'code data prioritisation' gets emulated means the
register value for the default group needs to be a variable.

The current system register value is kept in a per-cpu variable to avoid
writing to the system register if the value isn't going to change.  Writes
to this register may reset the hardware state for regulating bandwidth.

Finally, there is no reason to context switch these registers unless there
is a driver changing the values in struct task_struct. Hide the whole thing
behind a static key. This also allows the driver to disable MPAM in
response to errors reported by hardware. Move the existing static key to
belong to the arch code, as in the future the MPAM driver may become a
loadable module.

All this should depend on whether there is an MPAM driver, hide it behind
CONFIG_ARM64_MPAM.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
CC: Amit Singh Tomar <amitsinght@marvell.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Co-developed-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 8e06d04)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Now that the MPAM system registers are expected to have values that change,
reprogram them based on the previous value when a CPU is brought online.

Previously MPAM's 'default PARTID' of 0 was always used for MPAM in
kernel-space as this is the PARTID that hardware guarantees to
reset. Because there are a limited number of PARTID, this value is exposed
to user-space, meaning resctrl changes to the resctrl default group would
also affect kernel threads.  Instead, use the task's PARTID value for
kernel work on behalf of user-space too. The default of 0 is kept for both
user-space and kernel-space when MPAM is not enabled.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Co-developed-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 87b78a5)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
In anticipation of MPAM being useful remove the CONFIG_EXPERT restriction.

This was done to prevent the driver being enabled before the user-space
interface was wired up.

Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: James Morse <james.morse@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
[ morse: Added second paragraph ]
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit c544f00)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Requesters need to populate the MPAM fields for any traffic they send on
the interconnect. For the CPUs these values are taken from the
corresponding MPAMy_ELx register. Each requester may have a limit on the
largest PARTID or PMG value that can be used. The MPAM driver has to
determine the system-wide minimum supported PARTID and PMG values.

To do this, the driver needs to be told what each requestor's limit is.

CPUs are special, but this infrastructure is also needed for the SMMU and
GIC ITS. Call the helper to tell the MPAM driver what the CPUs can do.

The return value can be ignored by the arch code as it runs well before the
MPAM driver starts probing.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Co-developed-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
[ morse: requestor->requester as argued by ispell ]
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 831a7f1)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
The MPAM system registers will be lost if the CPU is reset during PSCI's
CPU_SUSPEND.

Add a PM notifier to restore them.

mpam_thread_switch(current) can't be used as this won't make any changes if
the in-memory copy says the register already has the correct value. In
reality the system register is UNKNOWN out of reset.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Co-developed-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 735dad9)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
The MPAMSM_EL1 sets the MPAM labels, PMG and PARTID, for loads and stores
generated by a shared SMCU. Disable the traps so the kernel can use it and
set it to the same configuration as the per-EL cpu MPAM configuration.

If an SMCU is not shared with other cpus then it is implementation
defined whether the configuration from MPAMSM_EL1 is used or that from
the appropriate MPAMy_ELx. As we set the same, PMG_D and PARTID_D,
configuration for MPAM0_EL1, MPAM1_EL1 and MPAMSM_EL1 the resulting
configuration is the same regardless.

The range of valid configurations for the PARTID and PMG in MPAMSM_EL1 is
not currently specified in Arm Architectural Reference Manual but the
architect has confirmed that it is intended to be the same as that for the
cpu configuration in the MPAMy_ELx registers.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 37fe0f9)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…lues

Care must be taken when modifying the PARTID and PMG of a task in any
per-task structure as writing these values may race with the task being
scheduled in, and reading the modified values.

Add helpers to set the task properties, and the CPU default value.  These
use WRITE_ONCE() that pairs with the READ_ONCE() in mpam_get_regval() to
avoid causing torn values.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Co-developed-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 2cf9ca3)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
resctrl has its own data structures to describe its resources. We can't use
these directly as we play tricks with the 'MBA' resource, picking the MPAM
controls or monitors that best apply. We may export the same component as
both L3 and MBA.

Add mpam_resctrl_res[] as the array of class->resctrl mappings we are
exporting, and add the cpuhp hooks that allocated and free the resctrl
domain structures. Only the mpam control feature are considered here and
monitor support will be added later.

While we're here, plumb in a few other obvious things.

CONFIG_ARM_CPU_RESCTRL is used to allow this code to be built even though
it can't yet be linked against resctrl.

Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Tested-by: Jesse Chick <jessechick@os.amperecomputing.com>
Reviewed-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Co-developed-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 09e61da)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
James Morse and others added 22 commits May 22, 2026 21:30
…ormats

Resctrl specifies the schema format for MB and SMBA in rdt_resources_all[].
Intel platforms take a percentage for MB, AMD platforms take an absolute
value which isn't MB/s. Currently these are both treated as a 'range'.
Adding support for additional types of control shows that user-space
needs to be told what the control formats are. Today users of resctrl
must already know if their platform is Intel or AMD to know how the
MB resource will behave.
The MPAM support exposes new control types that take a 'percentage'.
The Intel MB resource is also configured by a percentage, so should be
able to expose this to user-space.
Remove the static configuration for schema_fmt in rdt_resources_all[]
and specify it with the other control properties in
__get_mem_config_intel() or __get_mem_config_amd().

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 3323499 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `arch/x86/kernel/cpu/resctrl/core.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…entage

MPAMs bandwidth controls are both exposed to resctrl as if they take a
percentage. Update the schema format so that user-space can be told this
is a perentage, and files that describe this control format are exposed.
(e.g. min_percent)
Existing variation in this area is covered by requiring user-space to
know if it is running on an Intel or AMD platform. Exposing the schema
format directly will avoid modifying user-space to know it is running
on an MPAM or RISCV platform.
MPAM can also expose bitmap controls for memory bandwidth, which may
become important for use-cases in the future. These are currently converted
to a percentage to fit the existing definition of the MB resource.

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 2baa164 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `drivers/resctrl/mpam_resctrl.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Resctrl previously had a 'range' schema format that took some kind of
number. This has since been split into percentage, MB/s and an AMD
platform specific scheme.
As range is no longer used, remove it.
The last user is mba_sc which should be described as taking MB/s.

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 6c8f021 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…d bitmap controls

MPAM has cache capacity controls that effectively take a percentage.
Resctrl supports percentages, but the collection of files that are
exposed to describe this control belong to the MB resource.
To find the minimum granularity of the percentage cache capacity controls,
user-space is expected to rad the banwdidth_gran file, and know this has
nothing to do with bandwidth.
The only problem here is the name of the file. Add duplicates of these
properties with percentage and bitmap in the name. These will be exposed
based on the schema format.
The existing files must remain tied to the specific resources so that
they remain visible to user-space. Using the same helpers ensures the
values will always be the same regardless of the file used.
These files are not exposed until the new RFTYPE schema flags are
set on a resource 'fflags'.

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit a38c116 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `fs/resctrl/internal.h`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…ed on schema format

MPAM has cache capacity controls that effectively take a percentage.
Resctrl supports percentages, but the collection of files that are
exposed to describe this control belong to the MB resource. New files
have been added that are selected based on the schema format.
Apply the flags to enable these files based on the schema format.
Add a new fflags_from_schema() that is used for controls.

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit db00568 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `fs/resctrl/rdtgroup.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
If more schemas are added to resctrl, user-space needs to know how to
configure them. To allow user-space to configure schema it doesn't know
about, it would be helpful to tell user-space the format, e.g. percentage.
Add a file under info that describes the schema format.
Percentages and 'mbps' are implicitly decimal, bitmaps are expected to be
in hex.

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit f0ae691 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `fs/resctrl/rdtgroup.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
MPAM can have both cache portion and cache capacity controls on any cache
that supports MPAM. Cache portion bitmaps can be exposed via resctrl if
they are implemented on L2 or L3.
The cache capacity controls can not be used to isolate portions, which is
in implicit in the L2 or L3 bitmap provided by user-space. These controls
need to be configured with something more like a percentage.
Add the resource enum entries for these two resources. No additional
resctrl code is needed because the architecture code will specify this
resource takes a 'percentage', re-using the support previously used only
for the MB resource.

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 2e9f961 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `include/linux/resctrl.h`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…/from cmax

MPAM's maximum cache-capacity controls take a fixed point fraction format.
Instead of dumping this on user-space, convert it to a percentage.
User-space using resctrl already knows how to handle percentages.

Signed-off-by: James Morse <james.morse@arm.com>
(cherry picked from commit 10caa12 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `drivers/resctrl/mpam_resctrl.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…g errors

No need to destory MSC instance for the user/admin programming errors
sicne it's not causing any functional issues.

Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
(cherry picked from commit 7d348a2 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
In a NUMA system, each node may include CPUs, memory, MPAM MSC
instances, or any combination thereof. Some high-end servers may
have NUMA nodes that include MPAM MSC but no CPUs. In such cases,
associate all possible CPUs for those MSCs.

Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
(cherry picked from commit 95f0fd8 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
The current MPAM driver only considers the first component associated
with an online/offline CPU during domain creation and teardown. This
is insufficient, as CPU-initiated traffic may traverse multiple MSCs
before reaching the target, and each MSC must be programmed consistently
for proper resource partitioning.

Update the MPAM driver to include all components associated with a
given CPU during domain setup/teardown to expose expected schemata
to userspace for effective resource control.

Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
(forward ported from commit ac1e5be https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Leaves drivers/resctrl/mpam_internal.h untouched; mpam_resctrl_offline_cpu()
    is already void in the baseline used here.
  - Tightens callers (mpam_resctrl_pick_mba, mpam_resctrl_pick_counters) around
    traffic_matches_l3() together with topology_matches_l3() and
    cpumask_equal(&class->affinity, cpu_possible_mask) and does not add a
    traffic_matches_l3() function body here, which is already defined in
    upstream.
  - Omits any edit to exposed_alloc_capable or exposed_mon_capable; those
    symbols are already absent from the baseline in favor of
    resctrl_arch_alloc_capable() / resctrl_arch_mon_capable().
  - Adds for_each_mpam_resctrl_control() only; does not add MPAM_MAX_EVENT or a
    new for_each_mpam_resctrl_mon() / mpam_resctrl_counters[] sizing hunk
    because that monitor macro and array shape are already in the baseline.
  - Omits INIT_LIST_HEAD_RCU() on res->resctrl_res.ctrl_domains and
    mon_domains, omits moving mpam_resctrl_domain_insert() after
    resctrl_online_*(), and omits adding static void
    mpam_resctrl_online_domain_hdr(); that list setup and insert ordering are
    already in the baseline.
  - Does not replay a void→int conversion for mpam_resctrl_monitor_init() or a
    mpam_pmg_max + 1 num_rmid path; the baseline already has int-returning
    mpam_resctrl_monitor_init() and resctrl_arch_system_num_rmid_idx() for
    num_rmid, so only surrounding line context shifts in this file.
  - Adds for_each_mpam_resctrl_control(), mpam_resctrl_mon_from_res() /
    mpam_resctrl_res_from_mon(), mpam_resctrl_monitor_sync_abmc_vals(struct
    rdt_resource *r), extends mpam_resctrl_alloc_domain() /
    mpam_resctrl_get_domain_from_cpu() / mpam_resctrl_get_mon_domain_from_cpu()
    with struct mpam_component *comp, hardens topology_matches_l3() with
    matched_once, switches resctrl_arch_mbm_cntr_assign_enabled() to use
    mon->assigned_counters, and extends mpam_resctrl_pick_domain_id() so
    memory level > 3 uses component IDs like cache-backed classes]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…lt config

Reset an RIS by building a default mpam_config and applying it via
mpam_reprogram_ris_partid(), like any other config.

- mpam_init_reset_cfg(): set features and default values only for
  controls supported by the RIS (cpor_part, mbw_part, mbw_max,
  mbw_prop, cmax_cmax, cmax_cmin). Use full masks for CPBM/MBW_PBM
  and MPAMCFG_* defaults for MBW_MAX, CMAX, CMIN.
- mpam_reprogram_ris_partid(): apply cfg for all supported controls
  (no separate reset path).

Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
(forward ported from commit e0b6de0 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - reset_cpbm and reset_mbw_pbm are not used. no need to define them;
  - Resolve minor conflicts in `drivers/resctrl/mpam_devices.c`;
  - Since mpam_init_reset_cfg() has been removed from upstream,
    reset_cfg is init in mpam_reprogram_ris_partid(&reset_cfg);
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
There is no struct arm_smmu_domain context for domains configured
with identity mappings. Use the device to obtain the necessary
information to program PARTID and PMGID.

Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
(cherry picked from commit 23bcbda https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Add RDT_RESOURCE_MB_HLIM and RESCTRL_SCHEMA_MB_HLIM for per-domain
MBW maximum hard-limit control on ARM MPAM. Document the schema in
kernel-doc. Extend resctrl_get_default_ctrl() for RESCTRL_SCHEMA_MB_HLIM
(default 0).

(cherry picked from commit 9fc8c60 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…etup

Add mb_hlim parsing and validation (0/1), wire RESCTRL_SCHEMA_MB_HLIM
into schemata and control-group setup, align MB_HLIM with MBA for
exclusive mode and pseudo-locking, and default new groups to hardlim off.

(cherry picked from commit 6911e81 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…lim_rw

Read mbw_max_lim from MPAMF_MBW_IDR.MAX_LIM when MBW_MAX is present,
derive mpam_feat_mbw_max_hardlim_rw when both soft and hard limiting
are supported, and merge mbw_max_lim and the feature across MSCs.
Add mpam_props_sync_mbw_max_hardlim_rw() and propagate merged state in
__props_mismatch().

(cherry picked from commit ced4d46 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Add mbw_max_hardlim to mpam_config. When reprogramming MBW_MAX, OR in
HARDLIM (MPAMCFG_MBW_MAX bit 31) when either MBW_MAX or HARDLIM_RW
features are active. Merge HARDLIM in mpam_update_config().

(forward ported from commit 114894b https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `drivers/resctrl/mpam_devices.c`;
  - Resolve minor conflicts in `drivers/resctrl/mpam_internal.h`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
When mpam_feat_mbw_max_hardlim_rw is present, share the MBA MPAM class
with RDT_RESOURCE_MB_HLIM. Wire resctrl_arch_get_config and
resctrl_arch_update_one for MB_HLIM, and tear down MBA and MB_HLIM
controls together on class removal.

Handle RDT_RESOURCE_MB_HLIM in fflags_from_resource() so creating
info/MB_HLIM at resctrl mount does not hit the unhandled-rid WARN.

(forward ported from commit 04e2ea3 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `drivers/resctrl/mpam_resctrl.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Add mb_max_lim and arch_has_mb_max_lim to struct resctrl_membw with
kernel-doc: MPAM MAX_LIM encoding (MPAMF_MBW_IDR), invalid elsewhere
unless arch sets arch_has_mb_max_lim.

(cherry picked from commit 7939f1e https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
When mpam_feat_mbw_max is present, set membw.mb_max_lim from
cprops->mbw_max_lim and membw.arch_has_mb_max_lim so generic resctrl can
expose max_lim.

(forward ported from commit 05b9bc1 https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `drivers/resctrl/mpam_resctrl.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
… init

Add rdt_mb_max_lim_show() and the max_lim entry in res_common_files[].
Add mb_max_lim_init() to call resctrl_file_fflags_init("max_lim", ...)
when arch_has_mb_max_lim, and invoke it from resctrl_init() after
io_alloc_init().

(forward ported from commit be13cad https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
[fenghuay:
  - Resolve minor conflicts in `fs/resctrl/rdtgroup.c`;
]
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…IM for MPAM MBA

Document the MBA max_lim sysfs file, MB_HLIM schemata (0/1 per domain),
and how they relate to MPAM MBW_MAX, HARDLIM, and MPAMF_MBW_IDR.MAX_LIM.
Add schema_format for mb_hlim under the MB allocation info directory.

max_lim is exposed as a single decimal integer (MPAMF_MBW_IDR.MAX_LIM
[1:0], 0–3), matching rdt_mb_max_lim_show(). MB_HLIM appears when the
probe treats HARDLIM as read/write, which this series ties to max_lim
reading zero (see mpam_props_sync_mbw_max_hardlim_rw()).

(cherry picked from commit 93e1b6a https://github.com/NVIDIA/NV-Kernels 24.04_linux-nvidia-6.17-next)
Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
@fyu1 fyu1 force-pushed the 26.04_linux-nvidia-bos.glue.others.cpu_less.hardlimit branch from cdbc0b6 to 053ad57 Compare May 22, 2026 21:49
@fyu1
Copy link
Copy Markdown
Collaborator Author

fyu1 commented May 22, 2026

For the bot checks failures, are they real errors? e.g.
E: Commit messages differ: upstream 'NVIDIA: SAUCE: arm_mpam: resctrl: Add resctrl_arch_rmid_read() and resctrl_arch_reset_rmid()' != pick 'NVIDIA: VR: SAUCE: arm_mpam: resctrl: Add resctrl_arch_rmid_read() and resctrl_arch_reset_rmid()'
ERROR: failed to verify commit fc05830
Why has this failure?

Add local bytes counter in mpam_resctrl_counters[] to fix missing
mbm_local_bytes monitoring on Grace.

Add mon->assigned_counters check to enable mbm_L3_assignments config
file on Grace.

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
@fyu1 fyu1 force-pushed the 26.04_linux-nvidia-bos.glue.others.cpu_less.hardlimit branch from 053ad57 to 528acc7 Compare May 23, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.