Struct Invlpgb
pub struct Invlpgb {
invlpgb_count_max: u16,
tlb_flush_nested: bool,
nasid: u32,
}Expand description
Used to broadcast flushes to all logical processors.
use x86_64::VirtAddr;
use x86_64::structures::paging::Page;
use x86_64::instructions::tlb::Invlpgb;
// Check that `invlpgb` and `tlbsync` are supported.
let invlpgb = Invlpgb::new().unwrap();
// Broadcast flushing some pages to all logical processors.
let start: Page = Page::from_start_address(VirtAddr::new(0xf000_0000)).unwrap();
let pages = Page::range(start, start + 3);
invlpgb.build().pages(pages).include_global().flush();
// Wait for all logical processors to respond.
invlpgb.tlbsync();Fields§
§invlpgb_count_max: u16§tlb_flush_nested: bool§nasid: u32Implementations§
§impl Invlpgb
impl Invlpgb
pub fn invlpgb_count_max(&self) -> u16
pub fn invlpgb_count_max(&self) -> u16
Returns the maximum count of pages to be flushed supported by the processor.
pub fn tlb_flush_nested(&self) -> bool
pub fn tlb_flush_nested(&self) -> bool
Returns whether the processor supports flushing translations used for guest translation.
pub fn build(&self) -> InvlpgbFlushBuilder<'_>
pub fn build(&self) -> InvlpgbFlushBuilder<'_>
Create a InvlpgbFlushBuilder.
pub fn tlbsync(&self)
pub fn tlbsync(&self)
Wait for all previous invlpgb instruction executed on the current
logical processor to be acknowledged by all other logical processors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Invlpgb
impl RefUnwindSafe for Invlpgb
impl Send for Invlpgb
impl Sync for Invlpgb
impl Unpin for Invlpgb
impl UnsafeUnpin for Invlpgb
impl UnwindSafe for Invlpgb
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