mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: hypervisor: drop extern crate, use modern rust
This commit is part of a series of similar commits. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
e39174ac51
commit
b3f929432e
@@ -3,6 +3,8 @@
|
||||
// Copyright © 2025, Microsoft Corporation
|
||||
//
|
||||
|
||||
use anyhow::anyhow;
|
||||
|
||||
use crate::arch::aarch64::regs::{EsrEl2, ExceptionClass, IssDataAbort};
|
||||
use crate::arch::emulator::PlatformError;
|
||||
use crate::cpu::Vcpu;
|
||||
|
||||
@@ -9,8 +9,8 @@ use std::collections::HashMap;
|
||||
use std::num::NonZeroUsize;
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
#[cfg(feature = "sev_snp")]
|
||||
use arc_swap::ArcSwap;
|
||||
use anyhow::anyhow;
|
||||
use log::{debug, warn};
|
||||
use mshv_bindings::*;
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
use mshv_ioctls::InterruptRequest;
|
||||
@@ -19,6 +19,8 @@ use vfio_ioctls::VfioDeviceFd;
|
||||
use vm::DataMatch;
|
||||
#[cfg(feature = "sev_snp")]
|
||||
use vm_memory::bitmap::AtomicBitmap;
|
||||
#[cfg(feature = "sev_snp")]
|
||||
use {arc_swap::ArcSwap, log::info};
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
use crate::arch::aarch64::regs::{
|
||||
@@ -271,7 +273,6 @@ impl hypervisor::Hypervisor for MshvHypervisor {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # extern crate hypervisor;
|
||||
/// use hypervisor::mshv::MshvHypervisor;
|
||||
/// use hypervisor::mshv::MshvVm;
|
||||
/// use hypervisor::HypervisorVmConfig;
|
||||
@@ -1700,7 +1701,6 @@ impl MshvVm {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// extern crate hypervisor;
|
||||
/// use hypervisor::mshv::MshvHypervisor;
|
||||
/// use hypervisor::HypervisorVmConfig;
|
||||
/// use std::sync::Arc;
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
// Copyright © 2024, Microsoft Corporation
|
||||
//
|
||||
|
||||
use anyhow::anyhow;
|
||||
use iced_x86::Register;
|
||||
use log::debug;
|
||||
use mshv_bindings::*;
|
||||
|
||||
use crate::arch::emulator::{PlatformEmulator, PlatformError};
|
||||
|
||||
Reference in New Issue
Block a user