arm64: MPAM2_EL2 and MPAMHCR_EL2 are left UNKNOWN under arm64.nompam
From: Fuad Tabba
Date: Tue Aug 25 2026 - 15:20:11 EST
Hi Xi, James, Catalin, Will,
I'm going through the features that can be disabled on the host
command line, checking that EL2 either traps them or leaves its own
controls in a defined state. That quick and easy GMID_EL1 fix came out
of the same pass [1] :)
Since 10f885d63a0e ("arm64: Add override for MPAM"), arm64.nompam
skips the MPAM2_EL2 and MPAMHCR_EL2 writes in finalise_el2_state, so
on an MPAM PE with EL3 implemented the trap controls in both keep
their reset values, which are architecturally UNKNOWN.
I was wondering whether that was deliberate. AFAICT, restoring the
writes would trap to EL3 wherever MPAM3_EL3.TRAPLOWER is still set, so
it may not be safe on the machines the override was added for. I have
a patch restoring them, but I learned my lesson.
Cheers,
/fuad
[1] https://lore.kernel.org/all/20260825164219.3347229-1-fuad.tabba@xxxxxxxxx/