hypervisor: Implement hypervisor agnostic Register interface

This will help in fixing the build issue for MSHV on ARM64.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
Jinank Jain
2025-01-15 09:49:49 +00:00
committed by Bo Chen
parent c43ae1dc9d
commit 061482340e
5 changed files with 33 additions and 11 deletions

View File

@@ -196,6 +196,11 @@ pub enum IrqRoutingEntry {
Mshv(mshv_bindings::mshv_user_irq_entry),
}
pub enum Register {
#[cfg(feature = "kvm")]
Kvm(kvm_bindings::kvm_one_reg),
}
#[derive(Debug, Clone, Copy, PartialEq, serde::Serialize, serde::Deserialize)]
pub enum StandardRegisters {
#[cfg(all(feature = "kvm", not(target_arch = "riscv64")))]