Arm64 Kernel architecture update Matteo Carlini Director, Software Technology Management Arm – Open Source Software A-profile Architecture new feature names! https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools/feature-names-for-a-profile A-profile features: arm64 kernel support table https://developer.arm.com/tools-and-software/open-source-software/linux-kernel/architecture-and-kvm-enablement A-class architecture kernel enablement – Mar 20

TTS2UXN A64ISA AA32HPD PAUTH CNTS PMU S2FW FHM TTPBHA C B Trace LSE LSE IESB LSMAOC Debug SHA PMU RDMA CompNum JSconv S-EL2 SM SM TTCNP

TTST VMID16 HPD v8.3 DIT SHA UAO v8.1 v8.2 RAS v8.4 IDST RCPC CCIDX

DotProd ATS1E1 LOR VHE DFE CondM

TTRe NV RCPC RAS LP16 m PAN TTHM MPAM AMU TTL NV Debug LVA TLBI

VPIPT LPA DCPOP EVT DoPD GTG ECV MTPMU ETS SVE2 SPE SpecRest

MPAM CTSS PMU PredInv

PAuth2/ Future FGT FPAC architectures v8.0 RNG BT v8.5 v8.6 F64MM DGH DCCVADP MemTag Enablement complete TME EOPD CSEH F32MM TWED Enablement ongoing Enablement TBD SB CMODX I8MM BF16 FRINT CondM AMU N/A – no Kernel impact A-class architecture kernel enablement – Today

TTS2UXN A64ISA AA32HPD PAUTH PMU FHM TTPBHA CNTSC S2FWB S-EL2 LSE LSE IESB LSMAOC TTST SHA PMU RDMA CompNum JSconv RAS SM SM TTCNP

VMID16 HPD v8.3 DFE DIT SHA UAO

TTRem v8.4 v8.1 v8.2 IDST RCPC CCIDX

DotProd ATS1E1 LOR VHE Trace CondM NV Debug RCPC RAS LP16 PAN TTHM MPAM AMU Debug LVA NV TLBI TTL VPIPT LPA DCPOP GTG SPE SpecRest ECV MTPMU ETS SVE2 PMU PredInv

MPAM CTSS RNG MemTag

PAuth2/ Future FGT FPAC architectures v8.0 DCCVADP EVT v8.5 v8.6 F64MM TWED EOPD CSEH Enablement complete TME SB CMODX F32MM DGH Enablement ongoing Enablement TBD FRINT DoPD I8MM BF16 CondM BT AMU N/A – no Kernel impact A-class architecture kernel enablement – Tomorrow

TTS2UXN A64ISA AA32HPD PAUTH PMU FHM TTPBHA CNTSC S2FWB S-EL2 LSE LSE IESB LSMAOC TTST SHA PMU RDMA CompNum JSconv RAS SM SM TTCNP

VMID16 HPD v8.3 DFE DIT SHA UAO

TTRem v8.4 v8.1 v8.2 IDST RCPC CCIDX

DotProd ATS1E1 LOR VHE Trace CondM NV Debug RCPC RAS LP16 PAN TTHM MPAM AMU Debug LVA NV TLBI TTL VPIPT LPA DCPOP GTG SPE SpecRest ECV MTPMU ETS SVE2 PMU PredInv

MPAM CTSS v8.7 2020 RNG MemTag Arch PAuth2/ Future FGT BRBE TME extensions FPAC architectures v8.0 DCCVADP EVT v8.5 v8.6 F64MM TWED EOPD CSEH Enablement complete CSRE SB CMODX F32MM DGH Enablement ongoing LVC20-214-Arm- Enablement TBD FRINT DoPD I8MM BF16 CondM BT AMU Architecture-2020- N/A – no Kernel impact extensions Kernel releases since March 2020

❑ Kernel v5.6 o Armv8.5-E0PD (Preventing EL0 access to halves of address maps) o Armv8.5-RNG: HWCAP exposure & use arch entropy for KASLR seed o HWCAP : Armv8.6-BF16, Armv8.6-I8MM, Armv8.6-DGH ❑ Kernel v5.7 o Armv8.3-Pauth: In-kernel support for function return address protection o Armv8.4 AMU: Activity Monitors extensions o Armv8.5 PMU 64-bit counters o Armv8.5-RNG: use at boot to seed KASLR when ARCH_RANDOM is enabled o asm annotations preps for Armv8.5-BTI o KVM: GICv4.1 support & 32-bit host removal o Memory hot-remove support for arm64 Kernel releases since March 2020 – Cont.

❑ Kernel v5.8 o Armv8.5-BTI: user-space and in-kernel support o KVM: Non-invasive pre-Nested preparatory patches ❑ Kernel v5.9 o Armv8.4-TLBI: arm64 support for TLBI range operations o Armv8.4-TTL: arm64 support for translation table level hints o SCMI Notifications support o KVM: Pointer Authentication available for guests on non-VHE hosts o KVM: Further pre-NV preparatory patches ❑ Kernel v5.10 predictions (queued in –next) o Armv8.3-PAuth2 & Armv8.3-FPAC: Pointer Authentication enhancements introduced in the Armv8.6 Arm architecture specification o First chunk of resctrl clean-up patches (prep for MPAM) Ongoing developments: Armv8.4 MPAM

❑ Working on enabling multi-arch support to the resctrl interface ▪ https://www.kernel.org/doc/Documentation/x86/intel_rdt_ui.txt ❑ Last snapshot of Arm patches available here: ▪ https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/log/?h=mpam/snapshot/feb ▪ First chunk of resctrl clean-up patches queued on –next (on top of 5.9) https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/cache ❑ System characteristics to allow use of the resctrl interface: ▪ Cache Portion bitmaps on L2 or L3, with up to 32 portions ▪ Memory-bandwidth portion bitmaps on L3 with up to 32 portions Arm MPAM controls Resctrl interface Cache portion bitmaps (L2 & L3 cache) Available Cache capacity Not Available Memory bandwidth portion bitmap Available Memory bandwidth min/max/stride Not available Raw priority Not available Ongoing developments: Armv8.4 MPAM

❑ System Description (DT/ACPI bindings) is ongoing ▪ ACPI for MPAM spec (DEN0065) – Beta now, will be finalised in October

▪ Patches will be rebased against the updated spec (and DT will be derived accordingly)

❑ Enablement plans: ▪ Resctrl rework expected to continue throughout rest of 2020 ▪ arm64 architectural specific enablement (backend) starting in 2021 ▪ Sysregs & cpu feature enablement likely posted during v5.10 iteration cycle ▪ Currently investigating mobile-driven enablement use-cases in Android/GKI ▪ Also investigating possibility for in-kernel user, as an alternative path for upstreaming arch/arm64 code (in parallel with resctrl) Ongoing developments (2) ❑ Armv8.2 SPE in KVM Guests ▪ Arm Kernel team working on the enablement → to be posted soon on-list ❑ Armv8.5 Memory Tagging: ▪ User-space heap tagging enablement ongoing (likely queued for v5.11) ▪ In-Kernel heap-tagging: now co-developed with Google on-list ▪ KVM Guest enablement (heap tagging) on-list ▪ Stack-tagging: ❑ Fine-grained stack-tagging (colouring each function) breaks single-image ❑ Considerations for future debug feature (pending compiler support) ❑ Debug - Coresight ▪ Coresight ETMv4.4 currently on-list / Armv8.4 Self-hosted trace also on-list ▪ Coresight built as a module on-list ▪ Working to enable ETE/TRBE → to be posted soon on-list Ongoing developments (3) ❑ FF-A kernel driver: ▪ Public REL spec DEN0077 / Initial patch on-list ▪ Plan to support both Normal (e.g.: ) and Secure (e.g.: Trusted OS) use ❑ True Random Number Generator (TRNG) interface ▪ EAC Spec publicly available: DEN0098 ▪ Support for new SMC and entropy source coming soon ❑ SCMI ❑ System Power protocol support queued in –next (likely v5.10) ❑ System Power Control driver on-list ❑ Arm CMN-600 PMU driver: ❑ v2 patch on-list ❑ Morello ❑ Prototyping a capability-based ABI together with toolchain teams ❑ See https://linuxplumbersconf.org/event/7/contributions/654/ Thank you

Accelerating deployment in the Arm Ecosystem