diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index 91cf40119..34f204ee8 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -38,9 +38,7 @@ use std::fs::File; use std::os::unix::io::AsRawFd; #[cfg(target_arch = "x86_64")] -use crate::arch::x86::{ - CpuIdEntry, FpuState, LapicState, MsrEntry, SpecialRegisters, StandardRegisters, -}; +use crate::arch::x86::{CpuIdEntry, FpuState, MsrEntry}; const DIRTY_BITMAP_CLEAR_DIRTY: u64 = 0x4; const DIRTY_BITMAP_SET_DIRTY: u64 = 0x8; @@ -314,7 +312,7 @@ impl cpu::Vcpu for MshvVcpu { /// /// Returns the vCPU general purpose registers. /// - fn get_regs(&self) -> cpu::Result { + fn get_regs(&self) -> cpu::Result { Ok(self .fd .get_regs() @@ -325,7 +323,7 @@ impl cpu::Vcpu for MshvVcpu { /// /// Sets the vCPU general purpose registers. /// - fn set_regs(&self, regs: &StandardRegisters) -> cpu::Result<()> { + fn set_regs(&self, regs: &crate::arch::x86::StandardRegisters) -> cpu::Result<()> { let regs = (*regs).into(); self.fd .set_regs(®s) @@ -335,7 +333,7 @@ impl cpu::Vcpu for MshvVcpu { /// /// Returns the vCPU special registers. /// - fn get_sregs(&self) -> cpu::Result { + fn get_sregs(&self) -> cpu::Result { Ok(self .fd .get_sregs() @@ -346,7 +344,7 @@ impl cpu::Vcpu for MshvVcpu { /// /// Sets the vCPU special registers. /// - fn set_sregs(&self, sregs: &SpecialRegisters) -> cpu::Result<()> { + fn set_sregs(&self, sregs: &crate::arch::x86::SpecialRegisters) -> cpu::Result<()> { let sregs = (*sregs).into(); self.fd .set_sregs(&sregs) @@ -603,7 +601,7 @@ impl cpu::Vcpu for MshvVcpu { /// /// Returns the state of the LAPIC (Local Advanced Programmable Interrupt Controller). /// - fn get_lapic(&self) -> cpu::Result { + fn get_lapic(&self) -> cpu::Result { Ok(self .fd .get_lapic() @@ -614,7 +612,7 @@ impl cpu::Vcpu for MshvVcpu { /// /// Sets the state of the LAPIC (Local Advanced Programmable Interrupt Controller). /// - fn set_lapic(&self, lapic: &LapicState) -> cpu::Result<()> { + fn set_lapic(&self, lapic: &crate::arch::x86::LapicState) -> cpu::Result<()> { let lapic: mshv_bindings::LapicState = (*lapic).clone().into(); self.fd .set_lapic(&lapic)