pub struct KVmStore {
pub regions: MetaRegionOwners,
pub kernel_pt: PageTableOwner<KernelPtConfig>,
pub kvirt_areas: Map<KVirtId, Range<Vaddr>>,
}Expand description
One-step-soundness store for the kernel virtual area API. Holds the
shared regions, the single global kernel page table kernel_pt,
and the set of allocated kernel virtual areas (each a Range<Vaddr>
handle — see the module docs).
The kernel analog of super::VmStore; see the module documentation
for how it differs (one global PT vs. a map of user VmSpaces).
Fields§
§regions: MetaRegionOwners§kernel_pt: PageTableOwner<KernelPtConfig>§kvirt_areas: Map<KVirtId, Range<Vaddr>>Implementations§
Source§impl KVmStore
impl KVmStore
Sourcepub open spec fn inv(self) -> bool
pub open spec fn inv(self) -> bool
{
&&& self.regions.inv()
&&& self.kernel_pt.inv()
&&& self.kernel_pt.metaregion_sound(self.regions)
&&& forall |id: KVirtId| {
#[trigger] self.kvirt_areas.dom().contains(id)
==> {
let r = self.kvirt_areas[id];
&&& KERNEL_BASE_VADDR <= r.start
&&& r.end <= FRAME_METADATA_BASE_VADDR
&&& r.start % PAGE_SIZE == 0
&&& r.end % PAGE_SIZE == 0
&&& r.start <= r.end
}
}
}The store’s top-level invariant.
Mirrors the page-table-soundness portion of
super::VmStore::structural_inv (the kernel PT relates to the
region map via PageTableOwner::metaregion_sound) and adds the
per-area range well-formedness that [KVirtArea::inv] enforces at
the handle level (within the kernel VMALLOC bounds, page-aligned,
ordered).
Auto Trait Implementations§
impl Freeze for KVmStore
impl !RefUnwindSafe for KVmStore
impl Send for KVmStore
impl Sync for KVmStore
impl Unpin for KVmStore
impl UnsafeUnpin for KVmStore
impl UnwindSafe for KVmStore
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