Should I disable the hardware IOMMU when booting with iommu=soft?

11,569

Here i find a clearer but simple explanation: https://wiki.gentoo.org/wiki/IOMMU_SWIOTLB As told in the article: SWIOTLB bypasses the IOMMU and allows for a much more configurable memory management interface. Without going into the deep complexity of how this works, page tables are cached in the Lookaside Buffer reducing the need to constantly access physical RAM to map memory. This technology is also referred to as a bounce buffer as the physical address of the memory map is held in this virtual space of and IO is bounced between the physical IO and the Physical memory by this virtual lookaside buffer.

This allows the memory mapping to be carried out quickly and have a physical memory space available for use much faster than if it had to be created physically in RAM and presented to the system as usable.

I hope this would be useful

Share:
11,569

Related videos on Youtube

Prototype700
Author by

Prototype700

Still trying to fix Ubuntu Bug #1 (Liberation)...

Updated on September 18, 2022

Comments

  • Prototype700
    Prototype700 almost 2 years

    My system will refuse to boot when I have enabled the hardware IOMMU and a disc is inserted in the CD drive. The kernel will just loop error messages starting with AMD-Vi: Event logged [IO_PAGE_FAULT device=...]

    The only solution, it seems, is to not use the optical drive at all or boot with the kernel parameter iommu=soft.

    Unfortunately, I have not been able to find out, what this parameter exactly does. There is a documentation on kernel.org, which includes all IOMMU options, but it doesn't really explain the changes in functionality: https://www.kernel.org/doc/Documentation/x86/x86_64/boot-options.txt

    The way I understand it, iommu=soft bypasses the hardware IOMMU or disables it and uses a software implementation. Is that correct? Should I disable the hardware IOMMU in the BIOS or keep it enabled? Are there any other options in this case, possibly?

    • Admin
      Admin over 7 years
      iommu=soft : Use software bounce buffering (SWIOTLB) (default for Intel machines). This can be used to prevent the usage of an available hardware IOMMU.Source
    • Admin
      Admin over 7 years
      Hi Wiffzack, I read this in the linked documentation, but I still do not fully understand it. Is this mode fully implemented on the software-side? Is the hardware IOMMU bypassed completely by it or does it still fulfil some purpose in its functionality? Should I disable or enable it in BIOS while using this mode? I wasn't able to find answers to these (in my opinion rather essential) questions, yet.
    • Admin
      Admin over 7 years
      (Warning Low information content!)SWIOTLB or iommu=soft seems to be fully software-implemented(except some Problems with Nvidia). SWIOTLB is wasteful in CPU operations and memory, but is the only way some adapters can access all memory on systems without an IOMMU. It should not be necessary to disable anything in the bios i suppose. [Source ](pdfs.semanticscholar.org/60f1/…)