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

pub trait Introspectable {
Show methods 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],
        _bytes_read: &mut u64
    ) -> 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

Return the concrete DriverType

Provided methods

Retrieve the number of VCPUs.

read the physical memory, starting from paddr, into buf

Arguments

  • ‘paddr’ - the physical address to read from
  • ‘buf’ - the data read from memory
  • ‘bytes_read’ - the number of bytes read

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

Get the maximum physical address

Returns maximum physical address in 64 bit unsigned integer format.

Read register values

Arguments

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

get page access

Arguments

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

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

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

Used to pause the VM

Used to resume the VM

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

Listen and return the next event, or None

Arguments

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

Send reply corresponding to the current event being popped

Arguments

  • ‘event’
  • ‘reply_type’

Implementors