Trait microvmi::api::Introspectable[][src]

pub trait Introspectable {
    fn get_driver_type(&self) -> DriverType;

    fn get_vcpu_count(&self) -> Result<u16, Box<dyn Error>> { ... }
fn read_physical(
        &self,
        _paddr: u64,
        _buf: &mut [u8]
    ) -> Result<(), Box<dyn Error>> { ... }
fn write_physical(
        &self,
        _paddr: u64,
        _buf: &[u8]
    ) -> Result<(), Box<dyn Error>> { ... }
fn get_max_physical_addr(&self) -> Result<u64, Box<dyn Error>> { ... }
fn read_registers(&self, _vcpu: u16) -> Result<Registers, Box<dyn Error>> { ... }
fn get_page_access(&self, _paddr: u64) -> Result<Access, Box<dyn Error>> { ... }
fn set_page_access(
        &self,
        _paddr: u64,
        _access: Access
    ) -> Result<(), Box<dyn Error>> { ... }
fn write_registers(
        &self,
        _vcpu: u16,
        _reg: Registers
    ) -> Result<(), Box<dyn Error>> { ... }
fn pause(&mut self) -> Result<(), Box<dyn Error>> { ... }
fn resume(&mut self) -> Result<(), Box<dyn Error>> { ... }
fn toggle_intercept(
        &mut self,
        _vcpu: u16,
        _intercept_type: InterceptType,
        _enabled: bool
    ) -> Result<(), Box<dyn Error>> { ... }
fn listen(&mut self, _timeout: u32) -> Result<Option<Event>, Box<dyn Error>> { ... }
fn reply_event(
        &mut self,
        _event: Event,
        _reply_type: EventReplyType
    ) -> Result<(), Box<dyn Error>> { ... } }

Required methods

fn get_driver_type(&self) -> DriverType[src]

Return the concrete DriverType

Loading content...

Provided methods

fn get_vcpu_count(&self) -> Result<u16, Box<dyn Error>>[src]

Retrieve the number of VCPUs.

fn read_physical(
    &self,
    _paddr: u64,
    _buf: &mut [u8]
) -> Result<(), Box<dyn Error>>
[src]

read the physical memory, starting from paddr, into buf

Arguments

  • ‘paddr’ - the physical address to read from
  • ‘buf’ - the data read from memory

fn write_physical(&self, _paddr: u64, _buf: &[u8]) -> Result<(), Box<dyn Error>>[src]

Modify contents of physical memory, starting at paddr, from buf

Arguments

  • ‘paddr’ - the physical address to write into
  • ‘buf’ - the data to be written into memory

fn get_max_physical_addr(&self) -> Result<u64, Box<dyn Error>>[src]

Get the maximum physical address

Returns maximum physical address in 64 bit unsigned integer format.

fn read_registers(&self, _vcpu: u16) -> Result<Registers, Box<dyn Error>>[src]

Read register values

Arguments

  • ‘vcpu’ - vcpu id for which the value of registers are to be dumped as the argument

fn get_page_access(&self, _paddr: u64) -> Result<Access, Box<dyn Error>>[src]

get page access

Arguments

  • ‘paddr’ - physical address of the page whose access we want to know.

fn set_page_access(
    &self,
    _paddr: u64,
    _access: Access
) -> Result<(), Box<dyn Error>>
[src]

set page access

Arguments

  • ‘paddr’ - physical address of the page whose access we want to set
  • ‘access’ - access flags to be set on the given page

fn write_registers(
    &self,
    _vcpu: u16,
    _reg: Registers
) -> Result<(), Box<dyn Error>>
[src]

Write register values

Arguments

  • ‘vcpu’ - vcpu id for which the value of registers are to be set
  • ‘reg’ - Registers enum having values to be set

fn pause(&mut self) -> Result<(), Box<dyn Error>>[src]

Used to pause the VM

fn resume(&mut self) -> Result<(), Box<dyn Error>>[src]

Used to resume the VM

fn toggle_intercept(
    &mut self,
    _vcpu: u16,
    _intercept_type: InterceptType,
    _enabled: bool
) -> Result<(), Box<dyn Error>>
[src]

Used to enable/disable an event interception

Arguments

  • ‘vcpu’ - vcpu id for which we are to enable/disable intercept monitoring
  • ‘intercept_type’ - to specify event type for which to raise flag
  • ‘enabled’ - flag to specify whether to enable/disable event monitoring

fn listen(&mut self, _timeout: u32) -> Result<Option<Event>, Box<dyn Error>>[src]

Listen and return the next event, or None

Arguments

  • ‘timeout’ - Time for which it will wait for a new event

fn reply_event(
    &mut self,
    _event: Event,
    _reply_type: EventReplyType
) -> Result<(), Box<dyn Error>>
[src]

Send reply corresponding to the current event being popped

Arguments

  • ‘event’
  • ‘reply_type’
Loading content...

Implementors

Loading content...