diff --git a/hypervisor/src/cpu.rs b/hypervisor/src/cpu.rs index 649794d0b..a451770d1 100644 --- a/hypervisor/src/cpu.rs +++ b/hypervisor/src/cpu.rs @@ -16,8 +16,6 @@ use crate::aarch64::{RegList, Register, StandardRegisters}; use crate::arch::x86::{SpecialRegisters, StandardRegisters}; #[cfg(feature = "tdx")] use crate::kvm::{TdxExitDetails, TdxExitStatus}; -#[cfg(all(feature = "mshv", target_arch = "x86_64"))] -use crate::x86_64::SuspendRegisters; #[cfg(target_arch = "x86_64")] use crate::x86_64::Xsave; #[cfg(target_arch = "x86_64")] @@ -47,11 +45,6 @@ pub enum HypervisorCpuError { #[error("Failed to get standard registers: {0}")] GetStandardRegs(#[source] anyhow::Error), /// - /// Getting suspend registers error - /// - #[error("Failed to get suspend registers: {0}")] - GetSuspendRegs(#[source] anyhow::Error), - /// /// Setting special register error /// #[error("Failed to set special registers: {0}")] @@ -466,11 +459,6 @@ pub trait Vcpu: Send + Sync { /// #[cfg(feature = "tdx")] fn tdx_init(&self, hob_address: u64) -> Result<()>; - #[cfg(all(feature = "mshv", target_arch = "x86_64"))] - /// - /// Return suspend registers(explicit and intercept suspend registers) - /// - fn get_suspend_regs(&self) -> Result; #[cfg(feature = "kvm")] /// /// Set the "immediate_exit" state diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index ae602a450..28d01871a 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -700,15 +700,6 @@ impl cpu::Vcpu for MshvVcpu { } #[cfg(target_arch = "x86_64")] /// - /// X86 specific call that returns the vcpu's current "suspend registers". - /// - fn get_suspend_regs(&self) -> cpu::Result { - self.fd - .get_suspend_regs() - .map_err(|e| cpu::HypervisorCpuError::GetSuspendRegs(e.into())) - } - #[cfg(target_arch = "x86_64")] - /// /// Return the list of initial MSR entries for a VCPU /// fn boot_msr_entries(&self) -> MsrEntries {