Skip to main content

DeferredPageTableFrames

Struct DeferredPageTableFrames 

Source
pub struct DeferredPageTableFrames<A: FrameAllocator> { /* private fields */ }
Expand description

Intermediate page-table frames detached by one leaf removal.

The frames remain allocated until the stage-1 owner confirms that every CPU which could walk the old hierarchy has completed a TLB invalidation. Dropping this token without confirmation intentionally leaks the frames; reclaiming them early would turn a recoverable shootdown failure into a use-after-free in a remote hardware page-table walk.

Implementations§

Source§

impl<A: FrameAllocator> DeferredPageTableFrames<A>

Source

pub fn is_empty(&self) -> bool

Returns whether this removal detached no intermediate table frames.

Source

pub fn len(&self) -> usize

Returns the number of detached intermediate table frames.

Source

pub unsafe fn reclaim(self)

Reclaims the detached frames after all relevant CPUs confirm TLB invalidation.

§Safety

The caller must prove that no CPU can retain a translation or hardware page-walk reference through the detached page-table hierarchy.

Trait Implementations§

Source§

impl<A: FrameAllocator> Debug for DeferredPageTableFrames<A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A: FrameAllocator> Drop for DeferredPageTableFrames<A>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

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.

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.

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
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.