Skip to main content

Crate intel_vtd

Crate intel_vtd 

Source
Expand description

Intel VT-d (Virtualization Technology for Directed I/O) IOMMU emulator.

Provides emulated DMA address translation (IOVA → GPA via root/context tables and second-level page table walking) and interrupt remapping for emulated PCI devices.

Unlike the AMD IOMMU (which is a PCI device), VT-d is a pure MMIO platform device discovered via the ACPI DMAR table. It has no PCI config space.

Legacy and scalable second-stage translation support 39/48-bit addresses, 4KB/2MB/1GB pages, and pass-through. ECAP advertises SMTS, SSTS, SMPWCS, SSADS and RPS together. Scalable requests use the context’s implied RID_PASID; explicitly PASID-tagged requests, first-stage/nested translation, ATS, PRI, and supervisor requests are not supported.

Tracking is optional per PASID entry: SSADE-enabled second-stage walks atomically set accessed flags and, for accepted writes, the leaf dirty flag before the DMA operation, even if that operation subsequently fails (§§3.7.2, 9.8). Updates require PWSNP=1; a required non-snooping update faults with reason 0x7c, and a failed atomic update faults with 0x7d (§7.1.3). Legacy translation and pass-through never update A/D flags.

Walks are uncached, so cleared A/D flags can be set again immediately. This is an implementation property, not a portable software guarantee: software must use the invalidation protocol in §6.5.3.3. The state lock drains walks and DMA operations against invalidation, not guest page-table writes. Unsynchronized clearing does not provide a race-free dirty snapshot. There is no migration bitmap API. Interrupt remapping supports MSI and IOAPIC routes; queued invalidation uses 128/256-bit descriptors in legacy mode and 256-bit descriptors in scalable mode.

Modules§

spec
Intel VT-d specification-derived types.

Structs§

IntelVtdConfig
Configuration for constructing an IntelVtdDevice.
IntelVtdDevice
Intel VT-d IOMMU emulator device.
VtdSharedState
Shared VT-d IOMMU state accessible by per-device wrappers.
VtdSignalMsi
MSI remapping wrapper for Intel VT-d interrupt remapping.
VtdTranslator
Per-device IOVA→GPA translator for Intel VT-d.

Enums§

SecondStageAdError
Failure to atomically mark a second-stage paging entry (§7.1.3, SSS.5/6).
VtdFault
VT-d translation or interrupt remapping fault.

Constants§

MMIO_REGION_SIZE
MMIO region size (4KB).