Struct InvlpgbFlushBuilder
pub struct InvlpgbFlushBuilder<'a, S = Size4KiB>where
S: NotGiantPageSize,{
invlpgb: &'a Invlpgb,
page_range: Option<PageRange<S>>,
pcid: Option<Pcid>,
asid: Option<u16>,
include_global: bool,
final_translation_only: bool,
include_nested_translations: bool,
}Expand description
A builder struct to construct the parameters for the invlpgb instruction.
Fields§
§invlpgb: &'a Invlpgb§page_range: Option<PageRange<S>>§pcid: Option<Pcid>§asid: Option<u16>§include_global: bool§final_translation_only: bool§include_nested_translations: boolImplementations§
§impl<'a, S> InvlpgbFlushBuilder<'a, S>where
S: NotGiantPageSize,
impl<'a, S> InvlpgbFlushBuilder<'a, S>where
S: NotGiantPageSize,
pub fn pages<T>(self, page_range: PageRange<T>) -> InvlpgbFlushBuilder<'a, T>where
T: NotGiantPageSize,
pub fn pages<T>(self, page_range: PageRange<T>) -> InvlpgbFlushBuilder<'a, T>where
T: NotGiantPageSize,
Flush a range of pages.
If the range doesn’t fit within invlpgb_count_max, invlpgb is
executed multiple times.
pub unsafe fn pcid(&mut self, pcid: Pcid) -> &mut InvlpgbFlushBuilder<'a, S>
pub unsafe fn pcid(&mut self, pcid: Pcid) -> &mut InvlpgbFlushBuilder<'a, S>
Only flush TLB entries with the given PCID.
§Safety
The caller has to ensure that PCID is enabled in CR4 when the flush is executed.
pub unsafe fn asid(
&mut self,
asid: u16,
) -> Result<&mut InvlpgbFlushBuilder<'a, S>, AsidOutOfRangeError>
pub unsafe fn asid( &mut self, asid: u16, ) -> Result<&mut InvlpgbFlushBuilder<'a, S>, AsidOutOfRangeError>
Only flush TLB entries with the given ASID.
§Safety
The caller has to ensure that SVM is enabled in EFER when the flush is executed.
pub fn include_global(&mut self) -> &mut InvlpgbFlushBuilder<'a, S>
pub fn include_global(&mut self) -> &mut InvlpgbFlushBuilder<'a, S>
Also flush global pages.
pub fn final_translation_only(&mut self) -> &mut InvlpgbFlushBuilder<'a, S>
pub fn final_translation_only(&mut self) -> &mut InvlpgbFlushBuilder<'a, S>
Only flush the final translation and not the cached upper level TLB entries.
pub fn include_nested_translations(self) -> InvlpgbFlushBuilder<'a, S>
pub fn include_nested_translations(self) -> InvlpgbFlushBuilder<'a, S>
Also flush nestred translations that could be used for guest translation.
pub fn flush(&self)
pub fn flush(&self)
Execute the flush.
Trait Implementations§
§impl<'a, S> Clone for InvlpgbFlushBuilder<'a, S>where
S: Clone + NotGiantPageSize,
impl<'a, S> Clone for InvlpgbFlushBuilder<'a, S>where
S: Clone + NotGiantPageSize,
§fn clone(&self) -> InvlpgbFlushBuilder<'a, S>
fn clone(&self) -> InvlpgbFlushBuilder<'a, S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, S> Freeze for InvlpgbFlushBuilder<'a, S>
impl<'a, S> RefUnwindSafe for InvlpgbFlushBuilder<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for InvlpgbFlushBuilder<'a, S>where
S: Send,
impl<'a, S> Sync for InvlpgbFlushBuilder<'a, S>where
S: Sync,
impl<'a, S> Unpin for InvlpgbFlushBuilder<'a, S>where
S: Unpin,
impl<'a, S> UnsafeUnpin for InvlpgbFlushBuilder<'a, S>
impl<'a, S> UnwindSafe for InvlpgbFlushBuilder<'a, S>where
S: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more