pub struct AddressSpaceLayout {
pub phys_end: u64,
pub mem_start: u64,
pub mem_end: u64,
pub usable_end: u64,
}
Expand description
Address space layout configuration.
The layout configuration must guarantee that mem_start
<= mem_end
<= phys_end
.
Non-memory region should be arranged into the range [mem_end, phys_end).
Fields§
§phys_end: u64
end of guest physical address
mem_start: u64
start of guest memory address
mem_end: u64
end of guest memory address
usable_end: u64
end of usable memory address
Implementations§
Source§impl AddressSpaceLayout
impl AddressSpaceLayout
Sourcepub fn new(phys_end: u64, mem_start: u64, mem_end: u64) -> Self
pub fn new(phys_end: u64, mem_start: u64, mem_end: u64) -> Self
Create a new instance of AddressSpaceLayout
.
Sourcepub fn is_region_valid(&self, region: &AddressSpaceRegion) -> bool
pub fn is_region_valid(&self, region: &AddressSpaceRegion) -> bool
Check whether an region is valid with the constraints of the layout.
Trait Implementations§
Source§impl Clone for AddressSpaceLayout
impl Clone for AddressSpaceLayout
Source§fn clone(&self) -> AddressSpaceLayout
fn clone(&self) -> AddressSpaceLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AddressSpaceLayout
impl Debug for AddressSpaceLayout
Source§impl PartialEq for AddressSpaceLayout
impl PartialEq for AddressSpaceLayout
impl Eq for AddressSpaceLayout
impl StructuralPartialEq for AddressSpaceLayout
Auto Trait Implementations§
impl Freeze for AddressSpaceLayout
impl RefUnwindSafe for AddressSpaceLayout
impl Send for AddressSpaceLayout
impl Sync for AddressSpaceLayout
impl Unpin for AddressSpaceLayout
impl UnwindSafe for AddressSpaceLayout
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