Trait vm_memory::udmabuf::UdmabufDriverTrait
source · pub trait UdmabufDriverTrait {
// Required methods
fn new() -> UdmabufResult<Self>
where Self: Sized;
fn create_udmabuf(
&self,
mem: &GuestMemory,
iovecs: &[(GuestAddress, usize)]
) -> UdmabufResult<SafeDescriptor>;
}
Expand description
Trait that the platform-specific type UdmabufDriver
needs to implement.
Required Methods§
sourcefn new() -> UdmabufResult<Self>where
Self: Sized,
fn new() -> UdmabufResult<Self>where
Self: Sized,
Opens the udmabuf device on success.
sourcefn create_udmabuf(
&self,
mem: &GuestMemory,
iovecs: &[(GuestAddress, usize)]
) -> UdmabufResult<SafeDescriptor>
fn create_udmabuf( &self, mem: &GuestMemory, iovecs: &[(GuestAddress, usize)] ) -> UdmabufResult<SafeDescriptor>
Creates a dma-buf fd for the given scatter-gather list of guest memory pages (iovecs
).