Struct dbs_address_space::GuestMemoryManager
source · pub struct GuestMemoryManager { /* private fields */ }
Expand description
The GuestMemoryManager
manages all guest memory for virtual machines.
The GuestMemoryManager
fulfills several different responsibilities.
- First, it manages different types of guest memory, such as normal guest memory, virtio-fs DAX window and virtio-pmem DAX window etc. Different clients may want to access different types of memory. So the manager maintains two GuestMemory objects, one contains all guest memory, the other contains only normal guest memory.
- Second, it coordinates memory/DAX window hotplug events, so clients may register hooks to receive hotplug notifications.
Implementations§
source§impl GuestMemoryManager
impl GuestMemoryManager
sourcepub fn get_normal_guest_memory(&self) -> &GuestMemoryAtomic<GuestMemoryMmap>
pub fn get_normal_guest_memory(&self) -> &GuestMemoryAtomic<GuestMemoryMmap>
Get a reference to the normal GuestMemory
object.
sourcepub fn to_manager<AS: GuestAddressSpace>(_m: &AS) -> Option<&Self>
pub fn to_manager<AS: GuestAddressSpace>(_m: &AS) -> Option<&Self>
Try to downcast the GuestAddressSpace
object to a GuestMemoryManager
object.
Trait Implementations§
source§impl Clone for GuestMemoryManager
impl Clone for GuestMemoryManager
source§fn clone(&self) -> GuestMemoryManager
fn clone(&self) -> GuestMemoryManager
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GuestMemoryManager
impl Debug for GuestMemoryManager
source§impl Default for GuestMemoryManager
impl Default for GuestMemoryManager
source§impl GuestAddressSpace for GuestMemoryManager
impl GuestAddressSpace for GuestMemoryManager
§type M = GuestMemoryHybrid<()>
type M = GuestMemoryHybrid<()>
The type that will be used to access guest memory.
§type T = GuestMemoryLoadGuard<GuestMemoryHybrid<()>>
type T = GuestMemoryLoadGuard<GuestMemoryHybrid<()>>
A type that provides access to the memory.