Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
09263f4
Revert "NVIDIA: SAUCE: arm_mpam: Apply T241-MPAM-6 to 63-bit counters"
ltrager Aug 7, 2026
b7c92ce
Revert "NVIDIA: SAUCE: Fix mbm_L3_assign and mon_local_bytes"
ltrager Aug 7, 2026
ce37081
Revert "NVIDIA: VR: SAUCE: resctrl: add MBA max_lim sysfs and visibil…
ltrager Aug 7, 2026
0525852
Revert "NVIDIA: VR: SAUCE: resctrl/mpam: probe MPAMF_MBW_IDR MAX_LIM …
ltrager Aug 7, 2026
eae554a
Revert "NVIDIA: SAUCE: resctrl/mpam: reset RIS by applying explicit d…
ltrager Aug 7, 2026
f9e6a10
Revert "NVIDIA: SAUCE: arm_mpam: Include all associated MSC component…
ltrager Aug 7, 2026
095e99b
Revert "NVIDIA: VR: SAUCE: arm_mpam: Avoid MSC teardown for the SW pr…
ltrager Aug 7, 2026
2affafd
Revert "NVIDIA: SAUCE: arm_mpam: resctrl: Determine if any exposed co…
ltrager Aug 7, 2026
34a5067
Revert "NVIDIA: VR: SAUCE: fs/resctrl: Add support for assigning iomm…
ltrager Aug 7, 2026
c46332d
Revert "NVIDIA: VR: SAUCE: iommu: Add helpers to get and set the QoS …
ltrager Aug 7, 2026
8fceac6
Revert "NVIDIA: VR: SAUCE: iommu/arm-smmu-v3: Add mpam helpers to que…
ltrager Aug 7, 2026
64fa409
Revert "NVIDIA: VR: SAUCE: iommu/arm-smmu-v3: Register SMMU capabilit…
ltrager Aug 7, 2026
6d100b5
Revert "NVIDIA: VR: SAUCE: fs/resctrl: Add this_is_not_abi mount option"
ltrager Aug 7, 2026
ab1751f
Revert "NVIDIA: VR: SAUCE: arm_mpam: Allow MSC to be forced to have a…
ltrager Aug 7, 2026
7ee46e4
Revert "NVIDIA: VR: SAUCE: arm_mpam: Allow the maximum partid to be o…
ltrager Aug 7, 2026
b920998
Revert "NVIDIA: VR: SAUCE: arm_mpam: Split the locking around the mon…
ltrager Aug 7, 2026
51c6838
Revert "NVIDIA: VR: SAUCE: arm_mpam: Expose the number of NRDY retrie…
ltrager Aug 7, 2026
6779cce
Revert "NVIDIA: VR: SAUCE: arm_mpam: Add debugfs entries to show the …
ltrager Aug 7, 2026
74f3c29
Revert "NVIDIA: VR: SAUCE: fs/resctrl: Avoid a race with dom_data_exi…
ltrager Aug 7, 2026
35f4231
Revert "NVIDIA: SAUCE: arm_mpam: resctrl: Add resctrl_arch_cntr_read(…
ltrager Aug 7, 2026
14f92c3
Revert "NVIDIA: SAUCE: arm_mpam: resctrl: Add resctrl_arch_rmid_read(…
ltrager Aug 7, 2026
e37378a
Revert "NVIDIA: SAUCE: arm_mpam: resctrl: Add resctrl_arch_config_cnt…
ltrager Aug 7, 2026
76ae65b
Revert "NVIDIA: VR: SAUCE: arm_mpam: resctrl: Add kunit test for ABMC…
ltrager Aug 7, 2026
dd82919
Revert "NVIDIA: SAUCE: arm_mpam: resctrl: Pre-allocate assignable mon…
ltrager Aug 7, 2026
bc73fff
Revert "NVIDIA: SAUCE: arm_mpam: resctrl: Pre-allocate free running m…
ltrager Aug 7, 2026
577c602
Revert "NVIDIA: SAUCE: untested: arm_mpam: resctrl: pick classes for …
ltrager Aug 7, 2026
16f3fd4
KVM: arm64: Force guest EL1 to use user-space's partid configuration
Mar 13, 2026
d39607f
arm_mpam: Update architecture version check for MPAM MSC
henryZe May 8, 2026
67708c5
NVIDIA: SAUCE: arm_mpam: let low level MSC accessors return an error
Andre-ARM Aug 7, 2026
7e1ef6b
NVIDIA: SAUCE: resctrl/mpam: probe MPAMF_MBW_IDR MAX_LIM and hardlim_rw
fyu1 Apr 6, 2026
9e0fd0a
NVIDIA: SAUCE: arm_mpam: propagate MSC access errors for hw_probe fun…
Andre-ARM Aug 7, 2026
7443bf8
NVIDIA: SAUCE: arm_mpam: propagate MSC access errors for MBWU counters
Andre-ARM Aug 7, 2026
e5b9448
NVIDIA: SAUCE: arm_mpam: propagate MSC access errors for msmon helpers
Andre-ARM Aug 7, 2026
09786fe
NVIDIA: SAUCE: arm_mpam: propagate MSC access errors for __ris_msmon_…
Andre-ARM Aug 7, 2026
495047d
NVIDIA: SAUCE: arm_mpam: propagate MSC access errors for state saving…
Andre-ARM Aug 7, 2026
6a927ec
NVIDIA: SAUCE: resctrl/mpam: reset RIS by applying explicit default c…
shankerd04 Mar 4, 2026
0e441ef
arm_mpam: Fix MPAMCFG_MBW_PBM register setting
fyu1 Jun 7, 2026
fce72db
NVIDIA: SAUCE: arm_mpam: propagate MSC access errors for mpam_reprogr…
Andre-ARM Aug 7, 2026
0931e0d
NVIDIA: SAUCE: arm_mpam: propagate MSC access errors for interrupt co…
Andre-ARM Aug 7, 2026
922cf3f
NVIDIA: SAUCE: arm_mpam: prepare mon_sel locking for MPAM-Fb
Andre-ARM Aug 7, 2026
78cd82f
NVIDIA: SAUCE: arm_mpam: add MPAM-Fb MSC firmware access support
Andre-ARM Aug 7, 2026
c55d66e
NVIDIA: SAUCE: arm_mpam: Avoid MSC teardown for the SW programming er…
shankerd04 Nov 24, 2025
cfdd5b7
NVIDIA: SAUCE: arm_mpam: change MPAM-Fb error IRQ to use a threaded I…
Andre-ARM Aug 7, 2026
66e8041
NVIDIA: SAUCE: arm_mpam: detect and enable MPAM-Fb PCC support
Andre-ARM Aug 7, 2026
dcc333a
fs/resctrl: Tidy up the error path in resctrl_mkdir_event_configs()
benhor01 May 6, 2026
f5472a0
x86,fs/resctrl: Create 'event_filter' files read only if they're not …
benhor01 May 6, 2026
558c84e
fs/resctrl: Disallow the software controller when MBM counters are as…
benhor01 May 6, 2026
24a628f
fs/resctrl: Add monitor property 'mbm_cntr_assign_fixed'
benhor01 May 6, 2026
e75f35a
fs/resctrl: Continue counter allocation after failure
benhor01 May 6, 2026
55a8f06
fs/resctrl: Document that automatic counter assignment is best effort
benhor01 May 6, 2026
8ef04b9
fs/resctrl: Document tasks file behaviour for task id 0 and idle tasks
benhor01 May 6, 2026
7a7587d
NVIDIA: SAUCE: arm_mpam: resctrl: Pick classes for use as MBM counters
Jul 7, 2026
28c18a8
NVIDIA: SAUCE: arm_mpam: resctrl: Pre-allocate assignable monitors
benhor01 Jul 7, 2026
d6fe836
NVIDIA: SAUCE: arm_mpam: resctrl: Add resctrl_arch_config_cntr() for …
Jul 7, 2026
de7e9c8
NVIDIA: SAUCE: arm_mpam: resctrl: Add resctrl_arch_cntr_read() & resc…
Jul 7, 2026
c53d226
NVIDIA: SAUCE: arm64: mpam: Add memory bandwidth usage (MBWU) documen…
benhor01 Jul 7, 2026
a143e2d
NVIDIA: SAUCE: arm_mpam: resctrl: Add kunit test for ABMC/CDP interac…
Oct 16, 2025
56ba388
NVIDIA: SAUCE: fs/resctrl: Avoid a race with dom_data_exit() and rmid…
Jun 10, 2024
3148381
NVIDIA: SAUCE: arm_mpam: Allow the maximum partid to be overridden fr…
Oct 29, 2021
3199f1b
NVIDIA: SAUCE: fs/resctrl: Add this_is_not_abi mount option
Sep 15, 2022
e1f9ee5
NVIDIA: SAUCE: arm_mpam: Allow MSC to be forced to have an unknown lo…
Jul 1, 2025
940fb21
NVIDIA: SAUCE: iommu/arm-smmu-v3: Register SMMU capabilities with MPAM
Sep 17, 2021
a3fb2f1
NVIDIA: SAUCE: iommu/arm-smmu-v3: Add mpam helpers to query and set s…
Sep 14, 2021
8c136a4
NVIDIA: SAUCE: iommu: Add helpers to get and set the QoS state
Jul 31, 2023
97c1bf3
NVIDIA: SAUCE: fs/resctrl: Add support for assigning iommu_groups to …
Sep 16, 2021
a6f922c
NVIDIA: SAUCE: arm_mpam: Add debugfs entries to show the MSC/RIS the …
Sep 1, 2021
ad925b6
NVIDIA: SAUCE: arm_mpam: Expose the number of NRDY retries in debugfs
Jul 18, 2025
ff3f342
NVIDIA: SAUCE: arm_mpam: resctrl: Determine if any exposed counter ca…
Mar 15, 2024
d26b8f6
NVIDIA: SAUCE: resctrl: add MBA max_lim sysfs and visibility from init
fyu1 Apr 6, 2026
1e4bb0b
NVIDIA: SAUCE: arm_mpam: Include all MSC components during domain setup
fyu1 Jun 2, 2026
96a12bd
NVIDIA: SAUCE: Fix mbm_L3_assign and mon_local_bytes
fyu1 May 13, 2026
219aef7
NVIDIA: SAUCE: arm_mpam: Fix monitor capability and MBM assign for MB…
fyu1 Jun 21, 2026
f7fb8b9
NVIDIA: SAUCE: fs/resctrl: Fix incorrect PID parsing after IOMMU grou…
henryZe Apr 14, 2026
805f2bb
NVIDIA: SAUCE: fs/resctrl: Remove unused 'of' parameter from rdtgroup…
henryZe Apr 14, 2026
e8f43c4
NVIDIA: SAUCE: fs/resctrl: Migrate IOMMU groups when removing resourc…
henryZe Apr 14, 2026
a1100cb
NVIDIA: SAUCE: fs/resctrl: Fix redefinition of iommu helpers with CON…
ltrager Jul 13, 2026
b6544b7
NVIDIA: SAUCE: arm_mpam: Initialize mbwu_state values to 0
ltrager Jul 15, 2026
7f09299
NVIDIA: SAUCE: fs/resctrl: Fix iommu_group reference leaks when itera…
ltrager Jul 15, 2026
13ddf9f
NVIDIA: SAUCE: arm_mpam: Skip NRDY values when saving MBWU state
ltrager Jul 30, 2026
1e863fe
NVIDIA: SAUCE: arm_mpam: Apply T241-MPAM-6 to 63-bit counters
shankerd04 Jul 27, 2026
4ca08ed
NVIDIA: SAUCE: arm_mpam: Scale saved MBWU state for T241-MPAM-6
ltrager Aug 3, 2026
01cb4e9
NVIDIA: SAUCE: arm_mpam: Fix PCC channel lifetime during MSC removal
ltrager Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Documentation/arch/arm64/mpam.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ The supported features are:
there is at least one CSU monitor on each MSC that makes up the L3 group.
Exposing CSU counters from other caches or devices is not supported.

* Memory Bandwidth Usage (MBWU) on or after the L3 cache. resctrl uses the
L3 cache-id to identify where the memory bandwidth is measured. For this
reason the platform must have an L3 cache with cache-id's supplied by
firmware. (The platform doesn't need to support MPAM.)

Memory bandwidth monitoring makes use of MBWU monitors in each MSC that
makes up the L3 group. If the memory bandwidth monitoring is on the memory
rather than the L3 then there must be a single global L3 as otherwise it
is unknown which L3 the traffic came from.

To expose 'mbm_total_bytes', the topology of the group of MSC chosen must
match the topology of the L3 cache so that the cache-id's can be
repainted. For example: Platforms with Memory bandwidth monitors on
CPU-less NUMA nodes cannot expose 'mbm_total_bytes' as these nodes do not
have a corresponding L3 cache. 'mbm_local_bytes' is not exposed as MPAM
cannot distinguish local traffic from global traffic.

All these restrictions based on L3 cache are due to resctrl, currently, only
supporting monitoring at the L3 scope. It is expected that going forward more
MBWU monitors can be exposed to the user after support for more monitoring
scopes is added to resctrl.

Reporting Bugs
==============
If you are not seeing the counters or controls you expect please share the
Expand Down
22 changes: 16 additions & 6 deletions Documentation/filesystems/resctrl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@ with the following files:

Two MBM events are supported by default: mbm_local_bytes and mbm_total_bytes.
Each MBM event's sub-directory contains a file named "event_filter" that is
used to view and modify which memory transactions the MBM event is configured
with. The file is accessible only when "mbm_event" counter assignment mode is
enabled.
used to view and (if writable) modify which memory transactions the MBM event
is configured with. The file is accessible only when "mbm_event" counter
assignment mode is enabled.

List of memory transaction types supported:

Expand All @@ -466,9 +466,8 @@ with the following files:
# cat /sys/fs/resctrl/info/L3_MON/event_configs/mbm_local_bytes/event_filter
local_reads,local_non_temporal_writes,local_reads_slow_memory

Modify the event configuration by writing to the "event_filter" file within
the "event_configs" directory. The read/write "event_filter" file contains the
configuration of the event that reflects which memory transactions are counted by it.
The memory transactions the MBM event is configured with can be changed
if "event_filter" is writable.

For example::

Expand All @@ -492,6 +491,12 @@ with the following files:
"1":
Auto assignment is enabled.

Automatic counter assignment is done with best effort. If auto
assignment is enabled but there are not enough available counters then
monitor group creation could succeed while one or more events belonging
to the group may not have a counter assigned in all domains. Consult
mbm_L3_assignments for counter assignment states of the new groups.

Example::

# echo 0 > /sys/fs/resctrl/info/L3_MON/mbm_assign_on_mkdir
Expand Down Expand Up @@ -582,6 +587,11 @@ All groups contain the following files:
then the task must already belong to the CTRL_MON parent of this
group. The task is removed from any previous MON group.

When writing to this file, a task id of 0 is interpreted as the
task id of the currently running task. On reading the file, a task
id of 0 will never be shown and there is no representation of the
idle tasks. Instead, a CPU's idle task is always considered as a
member of the group owning the CPU.

"cpus":
Reading this file shows a bitmask of the logical CPUs owned by
Expand Down
16 changes: 16 additions & 0 deletions arch/arm64/kvm/hyp/vhe/sysreg-sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,21 @@ void sysreg_restore_guest_state_vhe(struct kvm_cpu_context *ctxt)
}
NOKPROBE_SYMBOL(sysreg_restore_guest_state_vhe);

/*
* The _EL0 value was written by the host's context switch and belongs to the
* VMM. Copy this into the guest's _EL1 register.
*/
static inline void __mpam_guest_load(void)
{
u64 mask = MPAM0_EL1_PARTID_D | MPAM0_EL1_PARTID_I | MPAM0_EL1_PMG_D | MPAM0_EL1_PMG_I;

if (system_supports_mpam()) {
u64 val = (read_sysreg_s(SYS_MPAM0_EL1) & mask) | MPAM1_EL1_MPAMEN;

write_sysreg_el1(val, SYS_MPAM1);
}
}

/**
* __vcpu_load_switch_sysregs - Load guest system registers to the physical CPU
*
Expand Down Expand Up @@ -222,6 +237,7 @@ void __vcpu_load_switch_sysregs(struct kvm_vcpu *vcpu)
*/
__sysreg32_restore_state(vcpu);
__sysreg_restore_user_state(guest_ctxt);
__mpam_guest_load();

if (unlikely(is_hyp_ctxt(vcpu))) {
__sysreg_restore_vel2_state(vcpu);
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/cpu/resctrl/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ int __init rdt_get_l3_mon_config(struct rdt_resource *r)
(rdt_cpu_has(X86_FEATURE_CQM_MBM_TOTAL) ||
rdt_cpu_has(X86_FEATURE_CQM_MBM_LOCAL))) {
r->mon.mbm_cntr_assignable = true;
r->mon.mbm_cntr_configurable = true;
cpuid_count(0x80000020, 5, &eax, &ebx, &ecx, &edx);
r->mon.num_mbm_cntrs = (ebx & GENMASK(15, 0)) + 1;
hw_res->mbm_cntr_assign_enabled = true;
Expand Down
91 changes: 3 additions & 88 deletions drivers/acpi/arm64/mpam.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,51 +95,17 @@ static void acpi_mpam_parse_irqs(struct platform_device *pdev,
res[(*res_idx)++] = DEFINE_RES_IRQ_NAMED(irq, "error");
}

#define UUID_MPAM_INTERCONNECT_TABLE "fe2bd645-033b-49e6-9479-2e0b8b21d1cd"

struct acpi_mpam_interconnect_descriptor_table {
u8 type_uuid[16];
u32 num_descriptors;
};

struct acpi_mpam_interconnect_descriptor {
u32 source_id;
u32 destination_id;
u8 link_type;
u8 reserved[3];
};

static int acpi_mpam_parse_resource(struct acpi_mpam_msc_node *tbl_msc,
struct mpam_msc *msc,
static int acpi_mpam_parse_resource(struct mpam_msc *msc,
struct acpi_mpam_resource_node *res)
{
struct acpi_mpam_interconnect_descriptor_table *tbl_int_tbl;
struct acpi_mpam_interconnect_descriptor *tbl_int;
guid_t int_tbl_uuid, spec_uuid;
int level, nid;
u32 cache_id;
off_t offset;

/*
* Class IDs are somewhat arbitrary, but need to be co-ordinated.
* 0-N are caches,
* 64, 65: Interconnect, but ideally these would appear between the
* classes the controls are adjacent to.
* 128: SMMU,
* 192-192+level: Memory Side Caches, nothing checks that N is a
* small number.
* 255: Memory Controllers
*
* ACPI devices would need a class id allocated based on the _HID.
*
* Classes that the mpam driver can't currently plumb into resctrl
* are registered as UNKNOWN.
*/
switch (res->locator_type) {
case ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE:
cache_id = res->locator.cache_locator.cache_reference;
level = find_acpi_cache_level_from_id(cache_id);
if (level <= 0 || level >= 64) {
if (level <= 0) {
pr_err_once("Bad level (%d) for cache with id %u\n", level, cache_id);
return -EINVAL;
}
Expand All @@ -154,57 +120,6 @@ static int acpi_mpam_parse_resource(struct acpi_mpam_msc_node *tbl_msc,
}
return mpam_ris_create(msc, res->ris_index, MPAM_CLASS_MEMORY,
MPAM_CLASS_ID_DEFAULT, nid);
case ACPI_MPAM_LOCATION_TYPE_SMMU:
return mpam_ris_create(msc, res->ris_index, MPAM_CLASS_UNKNOWN,
128, res->locator.smmu_locator.smmu_interface);
case ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE:
cache_id = res->locator.mem_cache_locator.reference;
level = res->locator.mem_cache_locator.level;
if (192 + level >= 255) {
pr_err_once("Bad level (%u) for memory side cache with reference %u\n",
level, cache_id);
return -EINVAL;
}

return mpam_ris_create(msc, res->ris_index, MPAM_CLASS_CACHE,
192 + level, cache_id);

case ACPI_MPAM_LOCATION_TYPE_INTERCONNECT:
/* Find the descriptor table, and check it lands in the parent msc */
offset = res->locator.interconnect_ifc_locator.inter_connect_desc_tbl_off;
if (offset >= tbl_msc->length) {
pr_err_once("Bad offset (%lu) for interconnect descriptor on msc %u\n",
offset, tbl_msc->identifier);
return -EINVAL;
}
tbl_int_tbl = ACPI_ADD_PTR(struct acpi_mpam_interconnect_descriptor_table,
tbl_msc, offset);
guid_parse(UUID_MPAM_INTERCONNECT_TABLE, &spec_uuid);
import_guid(&int_tbl_uuid, tbl_int_tbl->type_uuid);
if (!guid_equal(&spec_uuid, &int_tbl_uuid)) {
pr_err_once("Bad UUID for interconnect descriptor on msc %u\n",
tbl_msc->identifier);
return -EINVAL;
}

offset += sizeof(*tbl_int_tbl);
offset += tbl_int_tbl->num_descriptors * sizeof(*tbl_int);
if (offset >= tbl_msc->length) {
pr_err_once("Bad num_descriptors (%u) for interconnect descriptor on msc %u\n",
tbl_int_tbl->num_descriptors, tbl_msc->identifier);
return -EINVAL;
}

tbl_int = ACPI_ADD_PTR(struct acpi_mpam_interconnect_descriptor,
tbl_int_tbl, sizeof(*tbl_int_tbl));
cache_id = tbl_int->source_id;

/* Unknown link type? */
if (tbl_int->link_type != 0 && tbl_int->link_type == 1)
return 0;

return mpam_ris_create(msc, res->ris_index, MPAM_CLASS_UNKNOWN,
64 + tbl_int->link_type, cache_id);
default:
/* These get discovered later and are treated as unknown */
return 0;
Expand Down Expand Up @@ -235,7 +150,7 @@ int acpi_mpam_parse_resources(struct mpam_msc *msc,
return -EINVAL;
}

err = acpi_mpam_parse_resource(tbl_msc, msc, resource);
err = acpi_mpam_parse_resource(msc, resource);
if (err)
return err;

Expand Down
12 changes: 6 additions & 6 deletions drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2184,12 +2184,6 @@ void iommu_domain_free(struct iommu_domain *domain)
}
EXPORT_SYMBOL_GPL(iommu_domain_free);

struct iommu_domain *iommu_get_domain_for_group(struct iommu_group *group)
{
return group->domain;
}
EXPORT_SYMBOL_GPL(iommu_get_domain_for_group);

/*
* Put the group's domain back to the appropriate core-owned domain - either the
* standard kernel-mode DMA configuration or an all-DMA-blocked domain.
Expand Down Expand Up @@ -2365,6 +2359,12 @@ struct iommu_domain *iommu_driver_get_domain_for_dev(struct device *dev)
}
EXPORT_SYMBOL_GPL(iommu_driver_get_domain_for_dev);

struct iommu_domain *iommu_get_domain_for_group(struct iommu_group *group)
{
return group->domain;
}
EXPORT_SYMBOL_GPL(iommu_get_domain_for_group);

/*
* For IOMMU_DOMAIN_DMA implementations which already provide their own
* guarantees that the group and its default domain are valid and correct.
Expand Down
2 changes: 1 addition & 1 deletion drivers/resctrl/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-$(CONFIG_ARM64_MPAM_DRIVER) += mpam.o
mpam-y += mpam_devices.o
mpam-y += mpam_devices.o mpam_fb.o
mpam-$(CONFIG_ARM64_MPAM_RESCTRL_FS) += mpam_resctrl.o

ccflags-$(CONFIG_ARM64_MPAM_DRIVER_DEBUG) += -DDEBUG
Loading
Loading