pub struct DmaMapper {
domain: Option<Arc<Domain>>,
}Expand description
Physical <-> device address translator bound to one PCI function.
Fields§
§domain: Option<Arc<Domain>>Implementations§
Source§impl DmaMapper
impl DmaMapper
Sourcepub fn for_sbdf(sbdf: Sbdf) -> Self
pub fn for_sbdf(sbdf: Sbdf) -> Self
Build a translator for sbdf; creates a domain only when IOMMU
translation is active.
Sourcepub fn translate(&self, phys: u64, len: usize, prot: DmaProt) -> u64
pub fn translate(&self, phys: u64, len: usize, prot: DmaProt) -> u64
Map [phys, phys + len) and return the device address.
Sourcepub fn release(&self, address: u64, len: usize)
pub fn release(&self, address: u64, len: usize)
Release a mapping previously returned by DmaMapper::translate.
Sourcepub fn is_translating(&self) -> bool
pub fn is_translating(&self) -> bool
True when translation is active.
Auto Trait Implementations§
impl !RefUnwindSafe for DmaMapper
impl !UnwindSafe for DmaMapper
impl Forget for DmaMapper
impl Freeze for DmaMapper
impl Move for DmaMapper
impl Send for DmaMapper
impl Sync for DmaMapper
impl Unpin for DmaMapper
impl UnsafeUnpin for DmaMapper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more