Skip to main content

GuestModeHooks

Trait GuestModeHooks 

Source
pub trait GuestModeHooks {
    // Required methods
    fn pre_guest_run(
        &self,
        state: &mut VcpuArchState,
        guard: &DisabledLocalIrqGuard,
    );
    fn post_guest_run(
        &self,
        state: &mut VcpuArchState,
        guard: &DisabledLocalIrqGuard,
    );
    fn has_kernel_event(&self) -> bool;
}
Expand description

Hooks called around each guest-entry attempt.

The pre-run and post-run hooks execute with local IRQs disabled and must not block.

Required Methods§

Source

fn pre_guest_run( &self, state: &mut VcpuArchState, guard: &DisabledLocalIrqGuard, )

Prepares guest state and execution requests before they are loaded.

Source

fn post_guest_run( &self, state: &mut VcpuArchState, guard: &DisabledLocalIrqGuard, )

Processes guest state after the host state has been restored.

Source

fn has_kernel_event(&self) -> bool

Checks for a kernel event after an internally handled exit, with local IRQs enabled.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§