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§
Sourcefn pre_guest_run(
&self,
state: &mut VcpuArchState,
guard: &DisabledLocalIrqGuard,
)
fn pre_guest_run( &self, state: &mut VcpuArchState, guard: &DisabledLocalIrqGuard, )
Prepares guest state and execution requests before they are loaded.
Sourcefn post_guest_run(
&self,
state: &mut VcpuArchState,
guard: &DisabledLocalIrqGuard,
)
fn post_guest_run( &self, state: &mut VcpuArchState, guard: &DisabledLocalIrqGuard, )
Processes guest state after the host state has been restored.
Sourcefn has_kernel_event(&self) -> bool
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".