pub enum VirtioMemoryRangeAccess {
Input,
Output,
}Expand description
Describes the way a device may access a VirtioMemoryRange.
The virtio device may only access a range’s memory while the range belongs to a buffer that is submitted (owned by the device).
Variants§
Input
The device may read from the memory range while owning its buffer.
This access mode implies that the memory range stores input parameters for the task assigned to the device.
The driver is expected to initialize (write) all the range’s memory before submitting the buffer to the device.
The Rust memory model dictates that the driver may hold immutable
references to the buffer’s memory while the buffer is submitted.
However, for simplicity, we use the stronger constraint in [Output]
for all ranges owned by the device.
Output
The device may write to the memory range while owning its buffer.
This access mode implies that the memory range stores the output (also called “results” and “returned values”) of the task assigned to the device.
The driver is expected to read the output from the range after the device returns it. The Rust memory model dictates that the driver must not have any reference to the range’s memory while the range’s buffer is owned by the device.
Trait Implementations§
Source§impl Clone for VirtioMemoryRangeAccess
impl Clone for VirtioMemoryRangeAccess
impl Copy for VirtioMemoryRangeAccess
Source§impl Debug for VirtioMemoryRangeAccess
impl Debug for VirtioMemoryRangeAccess
impl Eq for VirtioMemoryRangeAccess
Source§impl PartialEq for VirtioMemoryRangeAccess
impl PartialEq for VirtioMemoryRangeAccess
impl StructuralPartialEq for VirtioMemoryRangeAccess
Auto Trait Implementations§
impl Freeze for VirtioMemoryRangeAccess
impl RefUnwindSafe for VirtioMemoryRangeAccess
impl Send for VirtioMemoryRangeAccess
impl Sync for VirtioMemoryRangeAccess
impl Unpin for VirtioMemoryRangeAccess
impl UnsafeUnpin for VirtioMemoryRangeAccess
impl UnwindSafe for VirtioMemoryRangeAccess
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]