Skip to main content

Module iommu

Module iommu 

Source
Expand description

Architecture-neutral IOMMU backend interface (discovery + activation). Architecture-neutral IOMMU backend interface.

The hardware-specific programming (root/context tables, invalidation, fault registers) lives behind Backend. The generic layer only decides which backend is authoritative and whether it may be activated.

P0 ships the discovery skeleton: the x86_64 backend reports what the DMAR describes but keeps Backend::is_ready false until the actual table programming has been validated. Consequently hardware::iommu::activate() still returns false and no device is ever silently placed behind an untested translation unit.

Re-exportsยง

use crate::hardware::iommu::DmaProt; ๐Ÿ”’
use crate::hardware::iommu::DomainId; ๐Ÿ”’
use crate::hardware::iommu::MappingKind; ๐Ÿ”’
use crate::hardware::iommu::Sbdf; ๐Ÿ”’

Structsยง

Discovery
Summary produced by firmware discovery.
MsiAllocation
One MSI message allocated through interrupt remapping.
NoIommu
Backend used when no IOMMU exists (or none is usable).

Enumsยง

IommuError
Errors returned by an IOMMU backend.

Staticsยง

NO_IOMMU ๐Ÿ”’

Traitsยง

Backend
A hardware translation backend.

Functionsยง

activate
Try to activate translation through the authoritative backend.
allocate_msi
Allocate an MSI message through interrupt remapping.
backend
Return the authoritative backend.
discovery
Return the discovery summary recorded by init.
free_msi
Release an IRTE cookie.
init
Discover the platform IOMMU and cache the result.
interrupt_remapping_active
True when MSI interrupt remapping is active (not merely advertised).
is_available
True when a backend is present and validated for activation.
map_domain
Install one mapping in the authoritative backend.
unmap_domain
Remove one mapping from the authoritative backend.