Struct vm_memory::guest_memory::MemoryRegionOptions
source · pub struct MemoryRegionOptions {
pub purpose: MemoryRegionPurpose,
pub align: u64,
}
Fields§
§purpose: MemoryRegionPurpose
Some hypervisors (presently: Gunyah) need explicit knowledge about which memory region is used for protected firwmare, static swiotlb, or general purpose guest memory.
align: u64
Alignment for the mapping of this region. This intends to be used for arm64 KVM support where a block alignment is required for transparent huge-pages support
Implementations§
source§impl MemoryRegionOptions
impl MemoryRegionOptions
pub fn new() -> MemoryRegionOptions
pub fn purpose(self, purpose: MemoryRegionPurpose) -> Self
pub fn align(self, alignment: u64) -> Self
Trait Implementations§
source§impl Clone for MemoryRegionOptions
impl Clone for MemoryRegionOptions
source§fn clone(&self) -> MemoryRegionOptions
fn clone(&self) -> MemoryRegionOptions
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 MemoryRegionOptions
impl Debug for MemoryRegionOptions
source§impl Default for MemoryRegionOptions
impl Default for MemoryRegionOptions
source§fn default() -> MemoryRegionOptions
fn default() -> MemoryRegionOptions
Returns the “default value” for a type. Read more
source§impl Ord for MemoryRegionOptions
impl Ord for MemoryRegionOptions
source§fn cmp(&self, other: &MemoryRegionOptions) -> Ordering
fn cmp(&self, other: &MemoryRegionOptions) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MemoryRegionOptions
impl PartialEq for MemoryRegionOptions
source§fn eq(&self, other: &MemoryRegionOptions) -> bool
fn eq(&self, other: &MemoryRegionOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MemoryRegionOptions
impl PartialOrd for MemoryRegionOptions
source§fn partial_cmp(&self, other: &MemoryRegionOptions) -> Option<Ordering>
fn partial_cmp(&self, other: &MemoryRegionOptions) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for MemoryRegionOptions
impl Eq for MemoryRegionOptions
impl StructuralPartialEq for MemoryRegionOptions
Auto Trait Implementations§
impl RefUnwindSafe for MemoryRegionOptions
impl Send for MemoryRegionOptions
impl Sync for MemoryRegionOptions
impl Unpin for MemoryRegionOptions
impl UnwindSafe for MemoryRegionOptions
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
Mutably borrows from an owned value. Read more