Skip to main content

VmiVmControl

Trait VmiVmControl 

Source
pub trait VmiVmControl: VmiDriver {
    // Required methods
    fn pause(&self) -> Result<(), VmiError>;
    fn resume(&self) -> Result<(), VmiError>;
    fn allocate_gfn(&self) -> Result<Gfn, VmiError>;
    fn allocate_gfn_at(&self, gfn: Gfn) -> Result<(), VmiError>;
    fn free_gfn(&self, gfn: Gfn) -> Result<(), VmiError>;
    fn inject_interrupt(
        &self,
        vcpu: VcpuId,
        interrupt: <Self::Architecture as Architecture>::Interrupt,
    ) -> Result<(), VmiError>;
    fn reset_state(&self) -> Result<(), VmiError>;
}
Expand description

Capability to control VM lifecycle and GFN allocation.

Required Methods§

Source

fn pause(&self) -> Result<(), VmiError>

Pauses the virtual machine.

Source

fn resume(&self) -> Result<(), VmiError>

Resumes the virtual machine.

Source

fn allocate_gfn(&self) -> Result<Gfn, VmiError>

Allocates a GFN.

Source

fn allocate_gfn_at(&self, gfn: Gfn) -> Result<(), VmiError>

Allocates a GFN at a specific location.

Source

fn free_gfn(&self, gfn: Gfn) -> Result<(), VmiError>

Frees a previously allocated GFN.

Source

fn inject_interrupt( &self, vcpu: VcpuId, interrupt: <Self::Architecture as Architecture>::Interrupt, ) -> Result<(), VmiError>

Injects an interrupt into a specific virtual CPU.

Source

fn reset_state(&self) -> Result<(), VmiError>

Resets the state of the VMI system.

Implementors§