One of our regular reader asks:

How do I turn on IOMMU (Linux kernel Calgary patch) DMA support under Linux?

Most modern Linux has support for IOMMU. An IOMMU is a device that will support mapping memory addresses. There is currently high-end branded server hardware that support this, but no desktop machines support IOMMU, AFAIK. An example IOMMU is the AGP and PCI Express graphics cards.

More about IOMMU

According to wikipedia:

The IOMMU or input/output memory management unit is a computer memory management unit (MMU) that connects a DMA-capable I/O bus to the primary storage memory. Like the CPU memory management unit, an IOMMU takes care of mapping virtual addresses (also called device addresses or I/O addresses) to physical addresses and some units guarantee memory protection from misbehaving devices.

[ Image: Comparison of the I/O memory management unit (IOMMU) to the memory management unit (MMU) ]

The advantages of having an IOMMU, compared to direct physical addressing of the memory, include:

  1. Large regions of memory can be allocated without the need to be contiguous in physical memory – the IOMMU will take care of mapping contiguous virtual addresses to fragmented physical addresses. Thus, the use of vectored I/O (scatter-gather lists) can sometimes be avoided.
  2. Memory protection from malicious or misbehaving devices \u2013 a device cannot read or write to memory that hasn’t been explicitly allocated (mapped) for it.
  3. Virtualized guest operating systems can safely be granted direct access to hardware.
  4. In general, the IOMMU provides isolation (memory protection) and address translatio

Turn on IOMMU

In order to turn on IOMMU, you need to pass following parameter to boot kernel (assuming that support is compiled into running kernel – most modern Linux kernel / distro has support, for e.g. Fedora / CentOS / RHEL / Suse etc):
Open /etc/grub.conf or /boot/grub/menu.lst file
vi grub.conf
Append above string to kernel line:
kernel /boot/vmlinuz-2.6.17-10-generic root=UUID=317464f6-8be2-4f54-88e3-694dcc8cd3c4 ro quiet splash iommu=calgary
Save and close the file. Reboot the server.

A note about IOMMU support

Please note that you need hardware and software to support IOMMU. Above instructions will just turn on Linux kernel software support. Since current hardware support is limited to high-end expensive server most Linux distro does not enable calgary DMA address mapping with memory protection by default.

See also:

=> AMD I/O Virtualization Technology (IOMMU) Specification

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 5 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
5 comments… add one
  • Ajeet Sep 30, 2008 @ 11:03

    I was in verse of installing RHEL 4 Update 3 on my HP Proliant server of 8 GB RAM and 143 GB Hard disk.When I booted with the first CD and it asked me about the installation and pressed “Enter”.

    It got stucked during the display :

    running install…
    running /sbin/loader
    Kernel Panic – not syncing: pCI-DMA :high address but no IOMMU errorWhats this error All about?

  • king Nov 21, 2010 @ 21:18

    please answer for this, can some one help out ?Comparison between Windows Server 2008, a variant of UNIX operating system and a variant of Enterprise level Linux Operating System in terms of
    o Processor Management
    o Memory Management
    o File System Management
    o I/O Management
    o Applications support

  • GJ Jun 2, 2011 @ 19:21

    I was looking into the manual of a Sapphire Pure White Fusion E350 mini-itx motherboard when I came across IOMMU, and Google sent me right to this page 😉 So yeah, not only high-end branded server hardware supports this feature.

  • wowo Oct 21, 2014 @ 8:29

    I have a device controller with MMU function, so if I can use IOMMU framework for this controller?

  • Kontrollfreak Aug 13, 2015 @ 21:52

    All current AMD processors support IOMMU (aka AMD-Vi).

    Intel (VT-d) make you pay a premium for it.

    Many consumer-grade Boards support IOMMU. Search the manual for a corresponding BIOS option. For example: IOMMU, VT-d, AMD-Vi

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum