Expand description
Guest execution and physical memory management.
OSTD provides safe interfaces for running virtual machines. A kernel supplies guest memory and CPU state, handles VM exits, and implements device emulation and scheduling policy.
§Guest memory
A GuestPhysMemSpace maps guest physical addresses (Gpaddrs)
to host memory backed by untyped frames (UFrames).
A kernel can load guest code and data into these frames.
It can query the guest memory mappings through gpm_space::Cursor
and modify them through gpm_space::CursorMut.
§Guest execution
A GuestContext holds a virtual CPU’s (vCPU’s) register state.
GuestMode::execute starts or resumes guest execution in a GuestPhysMemSpace
from the register state in the supplied context.
On success, execution returns a GuestReturnReason:
GuestReturnReason::VmExitcarries exit information for the kernel to handle, such as an I/O access or a guest memory fault.GuestReturnReason::KernelEventindicates a pending kernel event reported byGuestModeHooks::has_kernel_event.
The kernel handles the return reason, updates the guest context as needed,
and calls GuestMode::execute again to resume the guest.
Re-exports§
pub use self::gpm_space::GuestPhysMemSpace;
Modules§
- gpm_
space - Guest physical memory space.
Structs§
- Dummy
Guest Hooks - A set of no-op guest mode hooks.
- Guest
Mode - An execution mode for isolated guests.
Enums§
- Guest
Return Reason - The reason guest execution returned to the kernel client.
Traits§
- Guest
Mode Hooks - Hooks called around each guest-entry attempt.
Type Aliases§
- Gpaddr
- A guest physical address.