vmi_utils::ptm

Struct PageTableMonitor

Source
pub struct PageTableMonitor<Driver, Tag = &'static str>
where Driver: VmiDriver, Driver::Architecture: ArchAdapter<Driver, Tag>, Tag: TagType,
{ /* private fields */ }
Expand description

Page Table Monitor.

Implementations§

Source§

impl<Driver, Tag> PageTableMonitor<Driver, Tag>
where Driver: VmiDriver, Driver::Architecture: ArchAdapter<Driver, Tag>, Tag: TagType,

Source

pub fn new() -> Self

Creates a new page table monitor.

Source

pub fn monitored_tables(&self) -> usize

Returns the number of monitored tables.

Source

pub fn monitored_entries(&self) -> usize

Returns the number of monitored entries.

Source

pub fn paged_in_entries(&self) -> usize

Returns the number of paged-in entries.

Source

pub fn dump(&self)

Dumps the monitor state.

Source

pub fn monitor( &mut self, vmi: &VmiCore<Driver>, ctx: impl Into<AddressContext>, view: View, tag: Tag, ) -> Result<(), VmiError>

Monitors a virtual address.

Source

pub fn unmonitor( &mut self, vmi: &VmiCore<Driver>, ctx: impl Into<AddressContext>, view: View, ) -> Result<(), VmiError>

Unmonitors a virtual address.

Source

pub fn unmonitor_all(&mut self, vmi: &VmiCore<Driver>)

Unmonitors all virtual addresses.

Source

pub fn unmonitor_view(&mut self, vmi: &VmiCore<Driver>, view: View)

Unmonitors all virtual addresses associated with a view.

Source

pub fn mark_dirty_entry( &mut self, entry_pa: Pa, view: View, vcpu_id: VcpuId, ) -> bool

Marks a page table entry as dirty.

Source

pub fn process_dirty_entries( &mut self, vmi: &VmiCore<Driver>, vcpu_id: VcpuId, ) -> Result<Vec<PageTableMonitorEvent>, VmiError>

Processes dirty entries.

Auto Trait Implementations§

§

impl<Driver, Tag> Freeze for PageTableMonitor<Driver, Tag>
where <<Driver as VmiDriver>::Architecture as ArchAdapter<Driver, Tag>>::Impl: Freeze,

§

impl<Driver, Tag> RefUnwindSafe for PageTableMonitor<Driver, Tag>
where <<Driver as VmiDriver>::Architecture as ArchAdapter<Driver, Tag>>::Impl: RefUnwindSafe,

§

impl<Driver, Tag> Send for PageTableMonitor<Driver, Tag>
where <<Driver as VmiDriver>::Architecture as ArchAdapter<Driver, Tag>>::Impl: Send,

§

impl<Driver, Tag> Sync for PageTableMonitor<Driver, Tag>
where <<Driver as VmiDriver>::Architecture as ArchAdapter<Driver, Tag>>::Impl: Sync,

§

impl<Driver, Tag> Unpin for PageTableMonitor<Driver, Tag>
where <<Driver as VmiDriver>::Architecture as ArchAdapter<Driver, Tag>>::Impl: Unpin,

§

impl<Driver, Tag> UnwindSafe for PageTableMonitor<Driver, Tag>
where <<Driver as VmiDriver>::Architecture as ArchAdapter<Driver, Tag>>::Impl: UnwindSafe,

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T