hypervisor: trim qualified paths

Import the modules used in the crate instead of spelling the full paths
at every use site, and drop the now-unnecessary crate-level
generated msr_index.rs was trimmed separately.

Signed-off-by: Henry Hrvoje Tonkovac <htonkovac@gmail.com>
Assisted-by: Claude:Opus-4.8
This commit is contained in:
Henry Hrvoje Tonkovac
2026-06-22 11:20:58 +02:00
committed by Sebastien Boeuf
parent bb81c6650b
commit 01de980615
11 changed files with 105 additions and 88 deletions

View File

@@ -10,6 +10,12 @@
//
//
#[cfg(feature = "tdx")]
use std::io;
use std::result;
#[cfg(feature = "sev_snp")]
use igvm::snp_defs::SevVmsa;
use thiserror::Error;
#[cfg(not(target_arch = "riscv64"))]
use {anyhow::anyhow, vm_memory::GuestAddress};
@@ -287,7 +293,7 @@ pub enum HypervisorCpuError {
///
#[cfg(feature = "tdx")]
#[error("Failed to initialize TDX")]
InitializeTdx(#[source] std::io::Error),
InitializeTdx(#[source] io::Error),
///
/// Unknown TDX VM call
///
@@ -573,7 +579,7 @@ pub trait Vcpu: Send + Sync {
///
/// Triggers the running of the current virtual CPU returning an exit reason.
///
fn run(&mut self) -> std::result::Result<VmExit, HypervisorCpuError>;
fn run(&mut self) -> result::Result<VmExit, HypervisorCpuError>;
#[cfg(target_arch = "x86_64")]
///
/// Translate guest virtual address to guest physical address
@@ -657,7 +663,7 @@ pub trait Vcpu: Send + Sync {
unimplemented!()
}
#[cfg(feature = "sev_snp")]
fn setup_sev_snp_regs(&self, _vmsa: igvm::snp_defs::SevVmsa) -> Result<()> {
fn setup_sev_snp_regs(&self, _vmsa: SevVmsa) -> Result<()> {
unimplemented!()
}