Expand description
Bindings for the Linux iommufd subsystem (/dev/iommu).
Provides safe wrappers around iommufd ioctls for:
- IOAS allocation and DMA mapping (
IOMMU_IOAS_ALLOC,IOMMU_IOAS_MAP,IOMMU_IOAS_MAP_FILE,IOMMU_IOAS_UNMAP) - Hardware page table management (
IOMMU_HWPT_ALLOC,IOMMU_HWPT_INVALIDATE) - Hardware info query (
IOMMU_GET_HW_INFO) - Virtual IOMMU objects (
IOMMU_VIOMMU_ALLOC,IOMMU_VDEVICE_ALLOC,IOMMU_VEVENTQ_ALLOC)
The IOAS path supports identity DMA mapping (Phase 4). The HWPT/vIOMMU path supports nested stage 1 translation for VFIO passthrough (Phase 5).
Structs§
- Hwpt
Invalidate Error - Error from
IommufdCtx::hwpt_invalidate, pairing the underlying ioctl errno with the kernel’s reported handled-entry count. - Iommu
HwInfo ArmSmmuv3 - ARM SMMUv3 hardware information returned by
IOMMU_GET_HW_INFO. - Iommu
Hwpt ArmSmmuv3 - ARM SMMUv3 nested HWPT data: the first two double words of the STE.
- Iommu
Vevent ArmSmmuv3 - ARM SMMUv3 virtual event record (256-bit, little-endian).
- Iommufd
Ctx - An open iommufd file descriptor (
/dev/iommu). - Iommufd
Vevent Header - Header for each event in a vEVENTQ fd read.
Enums§
- Viommu
Alloc - Outcome of
IommufdCtx::viommu_alloc.
Constants§
- IOMMU_
HWPT_ ALLOC_ NEST_ PARENT - Flags for
IOMMU_HWPT_ALLOC. - IOMMU_
HWPT_ DATA_ ARM_ SMMU V3 - HWPT data type: ARM SMMUv3 (nested STE DW0-1).
- IOMMU_
HWPT_ DATA_ NONE - HWPT data type: no type-specific data.
- IOMMU_
HW_ INFO_ TYPE_ ARM_ SMMU V3 - HW info type: ARM SMMUv3.
- IOMMU_
IOAS_ MAP_ FIXED_ IOVA - Flags for
IOMMU_IOAS_MAP. - IOMMU_
IOAS_ MAP_ READABLE - IOMMU_
IOAS_ MAP_ WRITEABLE - IOMMU_
VEVENTQ_ FLAG_ LOST_ EVENTS IommufdVeventHeader::flags: the queue lost one or more events before this one. No event data follows a header carrying this flag.- IOMMU_
VEVENTQ_ TYPE_ ARM_ SMMU V3 - vEVENTQ type: ARM SMMUv3.
- IOMMU_
VIOMMU_ INVALIDATE_ DATA_ ARM_ SMMU V3 - Invalidation data type for ARM SMMUv3 (via vIOMMU).
- IOMMU_
VIOMMU_ TYPE_ ARM_ SMMU V3 - vIOMMU type: ARM SMMUv3.