pub struct Invlpgb { /* private fields */ }
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();
Implementations§
Source§impl Invlpgb
impl Invlpgb
Sourcepub 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.
Sourcepub fn tlb_flush_nested(&self) -> bool
pub fn tlb_flush_nested(&self) -> bool
Returns whether the processor supports flushing translations used for guest translation.
Sourcepub fn build(&self) -> InvlpgbFlushBuilder<'_>
pub fn build(&self) -> InvlpgbFlushBuilder<'_>
Create a InvlpgbFlushBuilder
.
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 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