Expand description
s9vm : kernel bridge between a vCPU and the pure emulation layer.
crate::s9vm::emulate is written against two abstractions:
PhysMemory (physical memory access) and GuestContext (general
registers, instruction pointer, CR3, paging state). This module supplies
the kernel implementations : the higher-half direct map for physical
memory, the vCPUโs entry frame and control block for the guest context :
and exposes Machine, the per-world object that the exit loops call.
Keeping the bridge separate from the model means the model stays pure and
host-testable, while the kernel-specific and unsafe parts stay in one
small, auditable file.
Re-exportsยง
use super::apic::LocalApic;๐use super::cpuid::CpuidPolicy;๐use super::emulate;๐use super::emulate::isa_gsi;๐use super::emulate::pulse_device_line;๐use super::emulate::Devices;๐use super::emulate::EmuError;๐use super::emulate::GuestContext;๐use super::emulate::MemoryView;๐use super::emulate::PhysMemory;๐use super::exit::ExitClass;๐use super::pit;๐use super::vcpu::ExitInfo;๐use super::backend::VcpuOps;๐
Structsยง
- Hhdm
Memory - Physical memory access through the higher-half direct map.
- Machine
- Device model, CPU description and emulation state of one world.
- Vcpu
Guest ๐ - Guest context backed by a vCPU.
Constantsยง
- CPUID_
INSTRUCTION_ ๐LEN - Length in bytes of the
CPUIDinstruction (0F A2).
Functionsยง
- host_
unix_ ๐time - Host wall-clock time, when the host RTC driver can provide it.