pub struct UnixUdmabufDriver {
driver_fd: File,
}
Expand description
A convenience wrapper for the Linux kernel’s udmabuf driver.
udmabuf is a kernel driver that turns memfd pages into dmabufs. It can be used for zero-copy buffer sharing between the guest and host when guest memory is backed by memfd pages.
Fields§
§driver_fd: File
Trait Implementations§
source§impl UdmabufDriverTrait for UnixUdmabufDriver
impl UdmabufDriverTrait for UnixUdmabufDriver
source§fn new() -> UdmabufResult<UnixUdmabufDriver>
fn new() -> UdmabufResult<UnixUdmabufDriver>
Opens the udmabuf device on success.
source§fn 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
).Auto Trait Implementations§
impl RefUnwindSafe for UnixUdmabufDriver
impl Send for UnixUdmabufDriver
impl Sync for UnixUdmabufDriver
impl Unpin for UnixUdmabufDriver
impl UnwindSafe for UnixUdmabufDriver
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