pub enum MemControllerRequest {
GetMemSize {
responder: MemControllerGetMemSizeResponder,
},
RequestSize {
requested_size: u64,
control_handle: MemControllerControlHandle,
},
}
Expand description
A MemController
controls a guest’s virtio-mem
Variants§
GetMemSize
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.
Fields
responder: MemControllerGetMemSizeResponder
RequestSize
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.
Implementations§
Source§impl MemControllerRequest
impl MemControllerRequest
pub fn into_get_mem_size(self) -> Option<MemControllerGetMemSizeResponder>
pub fn into_request_size(self) -> Option<(u64, MemControllerControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL