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§
Sourcefn allocate_gfn(&self) -> Result<Gfn, VmiError>
fn allocate_gfn(&self) -> Result<Gfn, VmiError>
Allocates a GFN.
Sourcefn allocate_gfn_at(&self, gfn: Gfn) -> Result<(), VmiError>
fn allocate_gfn_at(&self, gfn: Gfn) -> Result<(), VmiError>
Allocates a GFN at a specific location.
Sourcefn inject_interrupt(
&self,
vcpu: VcpuId,
interrupt: <Self::Architecture as Architecture>::Interrupt,
) -> Result<(), VmiError>
fn inject_interrupt( &self, vcpu: VcpuId, interrupt: <Self::Architecture as Architecture>::Interrupt, ) -> Result<(), VmiError>
Injects an interrupt into a specific virtual CPU.
Sourcefn reset_state(&self) -> Result<(), VmiError>
fn reset_state(&self) -> Result<(), VmiError>
Resets the state of the VMI system.