Papers
Topics
Authors
Recent
2000 character limit reached

System Memory Management Unit (SMMU)

Updated 1 December 2025
  • SMMU is a hardware component that translates device-virtual addresses to physical addresses while enforcing memory protection in SoCs.
  • It enables secure I/O virtualization and efficient scatter/gather DMA, supporting live migration and transparent device sharing.
  • Recent advancements, including NeuMMU-style enhancements, have reduced runtime overhead and energy consumption in accelerator environments.

A System Memory Management Unit (SMMU) is a hardware component used in system-on-chip (SoC) architectures to provide address translation and memory protection for non-CPU bus masters, such as DMA controllers, PCIe endpoints, and programmable accelerators. Sitting between I/O masters and system memory, the SMMU intercepts bus transactions, translating device-virtual addresses (IOVAs or IVAs) to physical addresses (PAs), and enforces access permissions and memory attributes. This mechanism is foundational in ARMv8-based architectures and is essential for secure I/O virtualization, efficient scatter/gather DMA, transparent device sharing, and enabling live migration scenarios. Recent research has focused on SMMU support for heterogeneous architectures, page-fault-tolerant RDMA, and architectural innovations for accelerator-friendly virtual memory translation (Psistakis, 24 Nov 2025, Psistakis, 26 Nov 2025, Hyun et al., 2019).

1. SMMU Architecture and Key Abstractions

The SMMU in ARMv8 environments is positioned on the upstream AXI bus, interposing all memory transactions issued by DMA-capable I/O masters before they reach DRAM. It provides isolation between devices and operating system processes, enabling contexts to be split across multiple hardware masters.

Key abstractions:

  • StreamID: Each incoming AXI transaction is tagged with a Stream Identifier, which is derived from a combination of AXI ID bits, port numbers, security state, and read/write flags. In specific platforms such as Xilinx Zynq UltraScale+, a 15-bit StreamID is composed as ⟨TBU[14:10], MasterID[9:6], AXI_ID[5:0]⟩ (Psistakis, 26 Nov 2025).
  • Stream→Context Mapping: Up to 128 Stream Match Registers (SMRn) paired with Stream-to-Context Registers (S2CRn) determine which context bank (CBNDX) is selected for a transaction. The Type field in S2CRn dictates whether translation is bypassed, results in a fault, uses stage-1 only, or uses two-stage translation.
  • Context Bank: Each selected context bank maintains per-stream translation state and I/O TLBs. Platforms such as Xilinx Zynq UltraScale+ implement up to 16 context banks.
  • Translation Stages: Stage 1 translation maps IVAs to an intermediate PA (IPA), typically via the OS page tables. Stage 2, generally used under virtualization, maps IPA to system physical addresses. In non-virtualized settings, typically only stage 1 is active (Psistakis, 24 Nov 2025).

2. Page Table Management and Virtual Address Translation

The SMMU implements ARM’s AArch64 Long Physical Address Extension (LPAE) page table format with a 4 KB granule. A 48-bit virtual address is split into four 9-bit indices and a 12-bit offset: VA[47:0]={VPN[3]4739,VPN[2]3830,VPN[1]2921,VPN[0]2012,offset110}VA[47:0] = \{VPN[3]_{47-39}, VPN[2]_{38-30}, VPN[1]_{29-21}, VPN[0]_{20-12}, offset_{11-0}\}.

Page walk process:

  • Each page table level contains 512 entries of 64 bits each.
  • Level-3 (PGD) is anchored by TTBR0, followed by Level-2 (PUD), Level-1 (PMD), and Level-0 (PTE), whose entry holds PA[47:12]PA_{[47:12]} and attributes.
  • Descriptor low bits classify entry types: b00 (invalid), b01 (block/section), b11 (table pointer).
  • On an IOTLB miss, the SMMU walks these levels using TTBR and TCR values from the context bank. The SMMU_CBn_TTBR0 register sets the level-3 table base; SMMU_CBn_TCR controls input address size, granule, and memory attributes (IRGN0, ORGN0, SH0), while S2CRn.Type selects the translation mode (Psistakis, 24 Nov 2025).

Dynamic Mapping: By assigning the user process’s page table pointer to the SMMU context via domain→ttbr, devices attached by StreamID can transparently access the VA→PA mappings of the CPU MMU for that domain, eliminating the need for explicit per-page iommu_map() calls (Psistakis, 24 Nov 2025).

3. Address Translation and Fault Handling in SMMU

Faults can arise when a device-virtual address is not mapped in the SMMU’s context bank. The SMMU provides hardware support for fault reporting and recovery:

  • Fault Status: Registers such as CBn_FSR (Fault Status Register), CBn_FAR/FAR_HIGH (faulting IOVA), and CBn_FSYNR (syndrome) signal translation or permission errors.
  • Context Fault Modes: With SCTLR.CFIE=1, SMMU aborts the transaction and triggers an interrupt; with SCTLR.STALL=1, it can stall additional streams pending resolution (Psistakis, 26 Nov 2025).
  • Linux Driver Integration: Modified handlers (e.g., arm_smmu_context_fault()) capture fault details and relay a structured descriptor to user or kernel recovery code. Per-domain FIFO queues and Netlink sockets interface events with user-mode page-fault handlers.
  • Page-Fault-Resilient RDMA: Integration into the DMA engine and scheduler logic enables retransmission or recovery following a page fault. Recovery may involve waiting for a timeout or relying on explicit user-level retransmit requests over mapped mailbox devices (Psistakis, 26 Nov 2025).

Empirical results show that, for 16 KB transfers, baseline (no page fault) latency is ≈50 µs; destination-side page faults resolved by demand-paging add ≈40–100 µs depending on policy. Memory pinned for zero-copy RDMA is reduced by up to 80% compared to traditional pinning-based approaches (Psistakis, 26 Nov 2025).

4. SMMU Support for Heterogeneous and High-throughput Accelerators

Work on architectural support for accelerators (e.g., NPUs) motivates fundamental changes in SMMU design (Hyun et al., 2019):

  • Issue with Conventional IOMMUs: High burstiness from DMA-driven page access in NPUs can saturate IOMMU TLBs and walkers, resulting in sustained stalls and up to 95% performance overhead versus an ideal MMU.
  • NeuMMU-style Enhancements: Deploys a large, shared IOTLB (e.g., 2 K entries), 128 parallel page-table walkers, Pending-Request Merging Buffers (PRMB), and lightweight Translation-Path Registers (TPreg) to eliminate redundant walks and reduce TLB miss penalty.
  • Efficiency Metrics: With PRMB(32)+TPreg+128 PTWs, NeuMMU achieves only 0.06% runtime overhead vs. an oracle MMU and uses ≈16.3× less energy than a baseline IOMMU in comparable workloads. Storage overhead is ≈0.10 mm² area and 13.65 mW leakage (32 nm) (Hyun et al., 2019).
  • SoC Generalization: Extending to a full SMMU block, different engines (CPU, GPU, NPU, DSP) can share multi-domain IOTLBs and PTWs, banked PRMB by ASID, and maintain cross-domain isolation and fairness. Page-table updates by CPUs can trigger IOTLB/PTW invalidation for coherence.

5. SMMU in Virtualization, Device Sharing, and System Coherency

The SMMU underlies several advanced virtualization and multi-node use cases:

  • Device and Process Isolation: Through per-stream context banks and translation controls, the SMMU prevents errant or malicious device accesses outside allowed IOVA windows.
  • Scatter/Gather and Buffer Management: Noncontiguous system buffers can appear contiguous to I/O devices, enabling seamless scatter/gather DMA.
  • Live Migration and Transparent Device Sharing: By remapping StreamID-context associations and/or updating translation state, device contexts can be migrated or shared without interrupting global address space views.
  • Multi-Node Coherence: Extensions such as Unimem map a virtualized global address space across multiple nodes, requiring SMMU support for peer-to-peer DMA and maintaining correctness across multiple nodes (Psistakis, 24 Nov 2025).

6. Limitations, Advanced Features, and Future Directions

Modern SMMUs, while comprehensive, have several unaddressed limitations and areas for further development:

  • Address Translation Services (ATS): Enable PCIe or PL devices to generate translation requests and reduce SMMU IOTLB miss rates (Psistakis, 24 Nov 2025).
  • Process-Address-Space ID (PASID): Allows associating multiple process contexts with a single StreamID to support per-process address spaces in I/O.
  • Interrupt/Fault Event Handling: SMMU fault interrupts permit on-demand injection of new mappings or recovery from demand-paged I/O.
  • Demand Paging and Oversubscription: NeuMMU-style walker logic enables SMMU to orchestrate page migration and oversubscription for accelerators (Hyun et al., 2019).
  • Scalability and Accelerator Support: Partitioning TLBs, time-sliced page-table walkers, and policy-driven PRMB banking ensure future SMMUs can accommodate emerging workload diversity and device heterogeneity.

A plausible implication is that as architectural support for virtual memory in accelerators matures, SMMUs will be pivotal in exposing a unified, secure, and high-throughput DMA-friendly virtual memory interface to all on-chip agents.

7. Experimental Methodology and Evaluation

Empirical validation of SMMU behavior and extensions has involved custom kernel modules, hardware/firmware augmentations, and synthetic microbenchmarks:

  • DMA Path Verification: Kernel modules were developed on Xilinx Zynq UltraScale+ MPSoC platforms to validate SMMU translations for PS (CPU) and PL (FPGA) DMA engines. Correctness was confirmed with and without SMMU intervention, and under dynamic process-page-table mapping (Psistakis, 24 Nov 2025).
  • Page Fault Handling: The SMMU, Linux driver, DMA hardware, firmware scheduler, and a custom userspace page-fault library were extended to coordinate resolution of page faults during RDMA. Benchmarks quantify both end-to-end latency and effectively demonstrate significant reductions in required pinned memory versus pinning-based approaches (Psistakis, 26 Nov 2025).
  • Performance Metrics: Variants of recovery policies (“Touch-A-Page” vs. “Touch-Ahead”) were compared, showing 1.7× speedup in fault resolution latency for the latter, and driver overhead limited to 9–15 µs per fault in representative scenarios.

These results situate modern SMMUs as enabling infrastructure for zero-copy, secure, migratable I/O, and fault-tolerant high-performance datacenter communication.

Slide Deck Streamline Icon: https://streamlinehq.com

Whiteboard

Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to System Memory Management Unit (SMMU).