pub struct PciIommu<'a> { /* private fields */ }
Expand description

Represents an IOMMU that controls DMA done by some PCI function, device, or group of devices.

You’ll probably need std::sync::atomic::fence or use types like AtomicU32 somewhere to synchronize accesses properly with the device.

Implementations

Both iova and process address must be aligned to this value.

This is always a power of 2, and never less than the system’s page size.

IOVA ranges given to PciIommu::map must be contained in one of the ranges that this method returns.

Add the given mapping to the IOMMU.

  • iova is the start address of the region in the device’s address space.
  • size is the length of the region.
  • address is a pointer (in the current process’ address space) to the start of the region to be mapped.

TODO: Alignment constraints?

Safety

Must make sense.

Remove the given mapping from the IOMMU.

TODO: Alignment constraints?

Must unmap exactly a full range that was previously mapped using PciIommu::map, or several full ranges as long as they are contiguous. Otherwise, this fails.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.