Skip to content

Conversation

@minwooim
Copy link
Collaborator

No description provided.

We can manage iommu hardware through either (1) vfio or (2) iommufd
which has been newly added to kernel recently.  libvfn has provided
enabling iommufd in the compile time, but sometimes application might
want to use vfio type rather than iommufd if app wants to map PCI BAR
area to iommu mapping table which can't be done with iommufd.

To provide flexibility to applications, choose iommu backends in the
runtime if iommufd is built properly on the system where iommufd kernel
header file is available.  The default backend will be iommufd if
available, but user can override it with VFN_IOMMU_FORCE_VFIO
environment varaible for vfio mode.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
To figure out which backend iommu context is binded to the given device
from application side.  The previous commit has started supporting
choosing iommu context type in the runtime so that application might
want to figure out which type of context is binded.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
@minwooim minwooim requested a review from birkelund October 13, 2025 12:34
@minwooim minwooim merged commit f2076fd into SamsungDS:main Nov 6, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant