Struct vhost_user_backend::bitmap::BitmapMmapRegion
source · pub struct BitmapMmapRegion { /* private fields */ }
Expand description
BitmapMmapRegion
implements a bitmap tha can be replaced at runtime.
The main use case is to support live migration on vhost-user backends
(see VHOST_USER_PROTOCOL_F_LOG_SHMFD
and VHOST_USER_SET_LOG_BASE
in the vhost-user protocol
specification). It uses a fixed memory page size of VHOST_LOG_PAGE
bytes (i.e., 4096
bytes),
so it converts addresses to page numbers before setting or clearing the bits.
To use this bitmap you need to define the memory as GuestMemoryMmap<BitmapMmapRegion>
.
Note:
This implementation uses std::sync::RwLock
, the priority policy of the lock is dependent on
the underlying operating system’s implementation and does not guarantee any particular policy,
in systems other than linux a thread trying to acquire the lock may starve.
Trait Implementations§
source§impl Bitmap for BitmapMmapRegion
impl Bitmap for BitmapMmapRegion
source§impl BitmapReplace for BitmapMmapRegion
impl BitmapReplace for BitmapMmapRegion
type InnerBitmap = AtomicBitmapMmap
source§fn replace(&self, bitmap: AtomicBitmapMmap)
fn replace(&self, bitmap: AtomicBitmapMmap)
Bitmap
source§impl Clone for BitmapMmapRegion
impl Clone for BitmapMmapRegion
source§fn clone(&self) -> BitmapMmapRegion
fn clone(&self) -> BitmapMmapRegion
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BitmapMmapRegion
impl Debug for BitmapMmapRegion
source§impl Default for BitmapMmapRegion
impl Default for BitmapMmapRegion
source§fn default() -> BitmapMmapRegion
fn default() -> BitmapMmapRegion
source§impl NewBitmap for BitmapMmapRegion
impl NewBitmap for BitmapMmapRegion
source§impl<'a> WithBitmapSlice<'a> for BitmapMmapRegion
impl<'a> WithBitmapSlice<'a> for BitmapMmapRegion
source§type S = BitmapMmapRegion
type S = BitmapMmapRegion
impl BitmapSlice for BitmapMmapRegion
Auto Trait Implementations§
impl Freeze for BitmapMmapRegion
impl RefUnwindSafe for BitmapMmapRegion
impl Send for BitmapMmapRegion
impl Sync for BitmapMmapRegion
impl Unpin for BitmapMmapRegion
impl UnwindSafe for BitmapMmapRegion
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)