NodeOwner

Struct NodeOwner 

Source
pub struct NodeOwner<C: PageTableConfig> {
    pub meta_own: PageMetaOwner,
    pub meta_perm: PointsTo<MetaSlot, PageTablePageMeta<C>>,
    pub children_perm: PointsTo<C::E, CONST_NR_ENTRIES>,
    pub level: PagingLevel,
    pub path: TreePath<CONST_NR_ENTRIES>,
}

Fields§

§meta_own: PageMetaOwner§meta_perm: PointsTo<MetaSlot, PageTablePageMeta<C>>§children_perm: PointsTo<C::E, CONST_NR_ENTRIES>§level: PagingLevel§path: TreePath<CONST_NR_ENTRIES>

Implementations§

Source§

impl<'rcu, C: PageTableConfig> NodeOwner<C>

Source

pub open spec fn relate_guard_perm(self, guard_perm: GuardPerm<'rcu, C>) -> bool

{
    &&& guard_perm.is_init()
    &&& guard_perm.value().inner.inner@.ptr.addr() == self.meta_perm.addr()
    &&& guard_perm.value().inner.inner@.ptr.addr() == self.meta_perm.points_to.addr()
    &&& guard_perm.value().inner.inner@.wf(self)
    &&& self.meta_perm.is_init()
    &&& self.meta_perm.wf()

}
Source

pub open spec fn relate_region(self, regions: MetaRegionOwners) -> bool

{
    &&& !regions.slots.contains_key(frame_to_index(meta_to_frame(self.meta_perm.addr())))
    &&& regions
        .slot_owners[frame_to_index(meta_to_frame(self.meta_perm.addr()))]
        .path_if_in_pt == Some(self.path)

}

All nodes’ metadata is forgotten for the duration of their lifetime.

Trait Implementations§

Source§

impl<C: PageTableConfig> Inv for NodeOwner<C>

Source§

open spec fn inv(self) -> bool

{
    &&& self.meta_perm.points_to.is_init()
    &&& <PageTablePageMeta<C> as Repr<MetaSlot>>::wf(self.meta_perm.points_to.value())
    &&& self.meta_perm.addr() == self.meta_perm.points_to.addr()
    &&& self.meta_own.inv()
    &&& self.meta_perm.value().wf(self.meta_own)
    &&& self.meta_perm.is_init()
    &&& self.meta_perm.wf()
    &&& FRAME_METADATA_RANGE().start <= self.meta_perm.addr()
        < FRAME_METADATA_RANGE().end
    &&& self.meta_perm.addr() % META_SLOT_SIZE() == 0
    &&& meta_to_frame(self.meta_perm.addr())
        < VMALLOC_BASE_VADDR() - LINEAR_MAPPING_BASE_VADDR()
    &&& meta_to_frame(self.meta_perm.addr()) < MAX_PADDR()
    &&& meta_to_frame(self.meta_perm.addr()) == self.children_perm.addr()
    &&& self.meta_own.nr_children.id() == self.meta_perm.value().nr_children.id()
    &&& 0 <= self.meta_own.nr_children.value() <= NR_ENTRIES()
    &&& 1 <= self.level <= NR_LEVELS()
    &&& self.children_perm.is_init_all()
    &&& self.children_perm.addr() == paddr_to_vaddr(meta_to_frame(self.meta_perm.addr()))

}
Source§

impl<C: PageTableConfig> InvView for NodeOwner<C>

Source§

impl<C: PageTableConfig> View for NodeOwner<C>

Source§

open spec fn view(&self) -> <Self as View>::V

{
    NodeModel {
        meta: self.meta_perm.value(),
    }
}
Source§

type V = NodeModel<C>

Auto Trait Implementations§

§

impl<C> Freeze for NodeOwner<C>

§

impl<C> !RefUnwindSafe for NodeOwner<C>

§

impl<C> Send for NodeOwner<C>

§

impl<C> Sync for NodeOwner<C>

§

impl<C> Unpin for NodeOwner<C>
where C: Unpin, <C as PageTableConfig>::E: Unpin,

§

impl<C> UnwindSafe for NodeOwner<C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, VERUS_SPEC__A> FromSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: From<T>,

§

fn obeys_from_spec() -> bool

§

fn from_spec(v: T) -> VERUS_SPEC__A

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, VERUS_SPEC__A> IntoSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: Into<T>,

§

fn obeys_into_spec() -> bool

§

fn into_spec(self) -> T

§

impl<T, U> IntoSpecImpl<U> for T
where U: From<T>,

§

fn obeys_into_spec() -> bool

§

fn into_spec(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: TryFrom<T>,

§

fn obeys_try_from_spec() -> bool

§

fn try_from_spec( v: T, ) -> Result<VERUS_SPEC__A, <VERUS_SPEC__A as TryFrom<T>>::Error>

Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: TryInto<T>,

§

fn obeys_try_into_spec() -> bool

§

fn try_into_spec(self) -> Result<T, <VERUS_SPEC__A as TryInto<T>>::Error>

§

impl<T, U> TryIntoSpecImpl<U> for T
where U: TryFrom<T>,

§

fn obeys_try_into_spec() -> bool

§

fn try_into_spec(self) -> Result<U, <U as TryFrom<T>>::Error>