hypervisor: Add an API to create default StandardRegisters

This will be used to create StandardRegisters for a given vcpu in
future.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
Jinank Jain
2024-08-02 09:45:57 +05:30
committed by Bo Chen
parent a229afbc24
commit 3645654c39
3 changed files with 20 additions and 0 deletions

View File

@@ -321,6 +321,12 @@ pub type Result<T> = anyhow::Result<T, HypervisorCpuError>;
/// Trait to represent a generic Vcpu
///
pub trait Vcpu: Send + Sync {
///
/// Returns StandardRegisters with default value set
///
fn create_standard_regs(&self) -> StandardRegisters {
unimplemented!();
}
///
/// Returns the vCPU general purpose registers.
///