pub struct PageTableOwner<C: PageTableConfig>(pub OwnerSubtree<C>);Tuple Fields§
§0: OwnerSubtree<C>Implementations§
Source§impl<C: PageTableConfig> PageTableOwner<C>
impl<C: PageTableConfig> PageTableOwner<C>
Sourcepub uninterp fn new_cursor_owner_spec<'rcu>(self) -> (Self, CursorOwner<'rcu, C>)
pub uninterp fn new_cursor_owner_spec<'rcu>(self) -> (Self, CursorOwner<'rcu, C>)
Source§impl<C: PageTableConfig> PageTableOwner<C>
impl<C: PageTableConfig> PageTableOwner<C>
Sourcepub open spec fn view_rec(self, path: TreePath<CONST_NR_ENTRIES>) -> Set<Mapping>
pub open spec fn view_rec(self, path: TreePath<CONST_NR_ENTRIES>) -> Set<Mapping>
{
if self.0.value.is_frame() {
let vaddr = vaddr(path);
let pt_level = INC_LEVELS() - path.len();
let page_size = page_size(pt_level as PagingLevel);
set![
Mapping { va_range : Range { start : vaddr, end : (vaddr + page_size) as
Vaddr }, pa_range : Range { start : self.0.value.frame.unwrap().mapped_pa,
end : (self.0.value.frame.unwrap().mapped_pa + page_size) as Paddr, },
page_size : page_size, property : self.0.value.frame.unwrap().prop, }
]
} else if self.0.value.is_node() && path.len() < INC_LEVELS() - 1 {
Set::new(|m: Mapping| {
exists |i: int| {
0 <= i < self.0.children.len() && self.0.children[i] is Some
&& PageTableOwner(self.0.children[i].unwrap())
.view_rec(path.push_tail(i as usize))
.contains(m)
}
})
} else {
set![]
}
}Sourcepub proof fn view_rec_contains(self, path: TreePath<CONST_NR_ENTRIES>, m: Mapping)
pub proof fn view_rec_contains(self, path: TreePath<CONST_NR_ENTRIES>, m: Mapping)
requires
self.0.inv(),path.len() < INC_LEVELS() - 1,path.len() == self.0.level,self.view_rec(path).contains(m),self.0.value.is_node(),ensuresexists |i: int| {
0 <= i < self.0.children.len() && self.0.children[i] is Some
&& PageTableOwner(self.0.children[i].unwrap())
.view_rec(path.push_tail(i as usize))
.contains(m)
},Sourcepub proof fn view_rec_contains_choose(
self,
path: TreePath<CONST_NR_ENTRIES>,
m: Mapping,
) -> i : int
pub proof fn view_rec_contains_choose( self, path: TreePath<CONST_NR_ENTRIES>, m: Mapping, ) -> i : int
requires
self.0.inv(),path.len() < INC_LEVELS() - 1,path.len() == self.0.level,self.view_rec(path).contains(m),self.0.value.is_node(),ensures0 <= i < self.0.children.len() && self.0.children[i] is Some
&& PageTableOwner(self.0.children[i].unwrap())
.view_rec(path.push_tail(i as usize))
.contains(m),Sourcepub proof fn view_rec_vaddr_range(self, path: TreePath<CONST_NR_ENTRIES>, m: Mapping)
pub proof fn view_rec_vaddr_range(self, path: TreePath<CONST_NR_ENTRIES>, m: Mapping)
requires
self.0.inv(),path.len() <= INC_LEVELS() - 1,path.len() == self.0.level,self.view_rec(path).contains(m),ensuresvaddr(path) <= m.va_range.start < m.va_range.end
<= vaddr(path) + page_size(path.len() as PagingLevel),Sourcepub proof fn view_rec_disjoint_vaddrs(
self,
path: TreePath<CONST_NR_ENTRIES>,
m1: Mapping,
m2: Mapping,
)
pub proof fn view_rec_disjoint_vaddrs( self, path: TreePath<CONST_NR_ENTRIES>, m1: Mapping, m2: Mapping, )
requires
self.0.inv(),path.len() <= INC_LEVELS() - 1,path.len() == self.0.level,self.view_rec(path).contains(m1),self.view_rec(path).contains(m2),m1 != m2,ensuresm1.va_range.end <= m2.va_range.start || m2.va_range.end <= m1.va_range.start,Sourcepub open spec fn relate_region_rec(
self,
path: TreePath<CONST_NR_ENTRIES>,
regions: MetaRegionOwners,
) -> bool
pub open spec fn relate_region_rec( self, path: TreePath<CONST_NR_ENTRIES>, regions: MetaRegionOwners, ) -> bool
{
if self.0.value.is_node() {
&&& self.0.value.node.unwrap().path == path
&&& self.0.value.node.unwrap().relate_region(regions)
&&& forall |i: int| {
0 <= i < self.0.children.len() && self.0.children[i] is Some
==> PageTableOwner(self.0.children[i].unwrap())
.relate_region_rec(path.push_tail(i as usize), regions)
}
} else {
true
}
}Sourcepub open spec fn relate_region(self, regions: MetaRegionOwners) -> bool
pub open spec fn relate_region(self, regions: MetaRegionOwners) -> bool
{ self.relate_region_rec(TreePath::new(Seq::empty()), regions) }Trait Implementations§
Source§impl<C: PageTableConfig> Inv for PageTableOwner<C>
impl<C: PageTableConfig> Inv for PageTableOwner<C>
Source§impl<C: PageTableConfig> View for PageTableOwner<C>
impl<C: PageTableConfig> View for PageTableOwner<C>
Auto Trait Implementations§
impl<C> Freeze for PageTableOwner<C>
impl<C> !RefUnwindSafe for PageTableOwner<C>
impl<C> Send for PageTableOwner<C>
impl<C> Sync for PageTableOwner<C>
impl<C> Unpin for PageTableOwner<C>
impl<C> UnwindSafe for PageTableOwner<C>
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