pub struct MemControllerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl MemControllerSynchronousProxy
impl MemControllerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<MemControllerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<MemControllerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_mem_size(
&self,
___deadline: MonotonicInstant,
) -> Result<(u64, u64, u64, u64, u64), Error>
pub fn get_mem_size( &self, ___deadline: MonotonicInstant, ) -> Result<(u64, u64, u64, u64, u64), Error>
Get the configured region size, usable region size, plugged size and requestd size
block_size is the size and the alignment in bytes of a memory block. Cannot change. region_size is the size of device-managed memory region in bytes. Cannot change. usable_region_size is the size of the usable device-managed memory region. Can grow up to the region_size. Can only shrink due to VIRTIO_MEM_REQ_UNPLUG_ALL requests. plugged_size is the amount of plugged memory in bytes within the usable device-managed memory region. requested_size is the requested amount of plugged memory within the usable device-managed memory region.
Sourcepub fn request_size(&self, requested_size: u64) -> Result<(), Error>
pub fn request_size(&self, requested_size: u64) -> Result<(), Error>
Update the requested size to plug or unplug memory
The driver SHOULD react to resize requests from the device (requested_size in the device configuration changed) by (un)plugging memory blocks.
Trait Implementations§
Source§impl SynchronousProxy for MemControllerSynchronousProxy
impl SynchronousProxy for MemControllerSynchronousProxy
Source§type Proxy = MemControllerProxy
type Proxy = MemControllerProxy
Source§type Protocol = MemControllerMarker
type Protocol = MemControllerMarker
Proxy
controls.