pub struct KvmMemoryRegion {
pub slot: u32,
pub flags: u32,
pub guest_phys_addr: u64,
pub memory_size: u64,
pub userspace_addr: u64,
}Expand description
A user memory region mapping guest physical to host virtual
Fields§
§slot: u32Slot index for this region
flags: u32Flags (e.g., read-only)
guest_phys_addr: u64Guest physical address
memory_size: u64Size in bytes
userspace_addr: u64Host virtual address (userspace pointer)
Implementations§
Source§impl KvmMemoryRegion
impl KvmMemoryRegion
Sourcepub const FLAG_READONLY: u32 = 1u32
pub const FLAG_READONLY: u32 = 1u32
Flag: memory region is read-only
Sourcepub const FLAG_LOG_DIRTY: u32 = 2u32
pub const FLAG_LOG_DIRTY: u32 = 2u32
Flag: memory region has dirty page logging
Sourcepub fn new(slot: u32, guest_phys: u64, size: u64, host_addr: u64) -> Self
pub fn new(slot: u32, guest_phys: u64, size: u64, host_addr: u64) -> Self
Create a new memory region
Sourcepub fn new_readonly(
slot: u32,
guest_phys: u64,
size: u64,
host_addr: u64,
) -> Self
pub fn new_readonly( slot: u32, guest_phys: u64, size: u64, host_addr: u64, ) -> Self
Create a read-only memory region
Trait Implementations§
Source§impl Clone for KvmMemoryRegion
impl Clone for KvmMemoryRegion
Source§fn clone(&self) -> KvmMemoryRegion
fn clone(&self) -> KvmMemoryRegion
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KvmMemoryRegion
impl Debug for KvmMemoryRegion
impl Copy for KvmMemoryRegion
Auto Trait Implementations§
impl Freeze for KvmMemoryRegion
impl RefUnwindSafe for KvmMemoryRegion
impl Send for KvmMemoryRegion
impl Sync for KvmMemoryRegion
impl Unpin for KvmMemoryRegion
impl UnwindSafe for KvmMemoryRegion
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)