Skip to main content

DmaTargetIommu

Trait DmaTargetIommu 

Source
pub trait DmaTargetIommu:
    Send
    + Sync
    + 'static {
    // Required method
    fn guest_memory_for_rid_offset(&self, rid_offset: u16) -> GuestMemory;
}
Expand description

A trait for IOMMU backends that produce per-device guest memory.

Implemented by SMMU (and future VT-d, AMD-Vi, etc.). The factory is shared across all devices behind the same IOMMU instance.

Required Methods§

Source

fn guest_memory_for_rid_offset(&self, rid_offset: u16) -> GuestMemory

Create a [GuestMemory] for a requester-ID offset relative to the device’s secondary bus.

The RID is resolved as (secondary << 8) + rid_offset on each access, so it tracks the live bus assignment. A plain devfn is just an offset in 0..=0xff; SR-IOV VFs use larger offsets that carry into the bus byte.

Implementors§