Is it possible for a Linux user-space application to use its own memory for DMA without being blocked by the IOMMU and without using VFIO?
Our application works fine when the iommu is disabled (intel_iommu=off) or in passthrough mode (intel_iommu=passthrough). However, it does not work when the IOMMU is enabled (intel_iommu=on) because the memory that we allocate in userspace is not allowed for DMA.
The official solution would be to use the Linux VFIO interface to manage the IOMMU, however we feel that the VFIO feature is not very mature and would prefer to find a simpler solution.
Can we somehow instruct the IOMMU to allow DMA for the physical memory that we have allocated? That would be wonderful because then we would not have to instruct our users to change their kernel boot parameters.
If there is a simple and reliable solution based on VFIO then that would also be interesting.
See related previous question for details of how we allocate memory: mremap(2) with HugeTLB to change virtual address?