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
sourceimpl 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
sourceimpl Clone for GuestMemoryManager
impl Clone for GuestMemoryManager
sourcefn clone(&self) -> GuestMemoryManager
fn clone(&self) -> GuestMemoryManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for GuestMemoryManager
impl Debug for GuestMemoryManager
sourceimpl Default for GuestMemoryManager
impl Default for GuestMemoryManager
sourceimpl 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.
Auto Trait Implementations
impl RefUnwindSafe for GuestMemoryManager
impl !Send for GuestMemoryManager
impl !Sync for GuestMemoryManager
impl Unpin for GuestMemoryManager
impl UnwindSafe for GuestMemoryManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more