Expand description
AxVCpu - Virtual CPU abstraction for ArceOS hypervisors.
This crate provides a unified, architecture-independent interface for managing virtual CPUs
in hypervisor environments. It delegates architecture-specific operations to implementations
of the AxArchVCpu
trait while providing common functionality like state management,
CPU binding, and execution control.
§Features
- Architecture-agnostic virtual CPU management
- State machine for VCpu lifecycle (Created → Free → Ready → Running)
- Per-CPU virtualization state management
- Hardware abstraction layer for hypervisor operations
- Support for interrupt injection and register manipulation
Structs§
- AxPer
Cpu - Host per-CPU states to run the guest.
- AxVCpu
- Architecture-independent virtual CPU implementation.
- AxVCpu
Inner Mut - Mutable runtime state of a virtual CPU.
Enums§
- AxVCpu
Exit Reason - Reasons for VM-Exits returned by AxArchVCpu::run.
- VCpu
State - Represents the current execution state of a virtual CPU.
Traits§
- AxArch
PerCpu - Trait representing the per-CPU architecture-specific virtualization state in a virtual machine.
- AxArchV
Cpu - Architecture-specific virtual CPU trait definition.
- AxVCpu
Hal - Hardware abstraction layer interfaces for VCpu operations.
Functions§
- clear_
current_ ⚠vcpu - Clear the current vcpu on the current physical CPU.
- get_
current_ vcpu - Get the current VCpu on the current physical CPU.
- get_
current_ vcpu_ mut - Get a mutable reference to the current VCpu on the current physical CPU.
- set_
current_ ⚠vcpu - Set the current VCpu on the current physical CPU.