vmm, arch: CpuId is x86_64 specific so import from the x86_64 module

It will be removed as a top-level export from the hypervisor crate.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-05-11 17:10:04 +01:00 committed by Sebastien Boeuf
parent 4ff0686d37
commit cd0df05808
4 changed files with 7 additions and 6 deletions

View File

@ -15,7 +15,8 @@ pub mod regs;
use crate::GuestMemoryMmap;
use crate::InitramfsConfig;
use crate::RegionType;
use hypervisor::{CpuId, CpuIdEntry, HypervisorError, CPUID_FLAG_VALID_INDEX};
use hypervisor::x86_64::{CpuId, CpuIdEntry, CPUID_FLAG_VALID_INDEX};
use hypervisor::HypervisorError;
use linux_loader::loader::bootparam::boot_params;
use linux_loader::loader::elf::start_info::{
hvm_memmap_table_entry, hvm_modlist_entry, hvm_start_info,

View File

@ -30,10 +30,10 @@ use devices::interrupt_controller::InterruptController;
use gdbstub_arch::x86::reg::{X86SegmentRegs, X86_64CoreRegs};
#[cfg(target_arch = "aarch64")]
use hypervisor::kvm::kvm_bindings;
#[cfg(target_arch = "x86_64")]
use hypervisor::x86_64::CpuId;
#[cfg(all(target_arch = "x86_64", feature = "gdb"))]
use hypervisor::x86_64::{SpecialRegisters, StandardRegisters};
#[cfg(target_arch = "x86_64")]
use hypervisor::CpuId;
use hypervisor::{CpuState, HypervisorCpuError, VmExit, VmOps};
#[cfg(feature = "tdx")]
use hypervisor::{TdxExitDetails, TdxExitStatus};

View File

@ -340,7 +340,7 @@ pub fn start_vmm_thread(
struct VmMigrationConfig {
vm_config: Arc<Mutex<VmConfig>>,
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
common_cpuid: hypervisor::CpuId,
common_cpuid: hypervisor::x86_64::CpuId,
memory_manager_data: MemoryManagerSnapshotData,
}
@ -1498,7 +1498,7 @@ impl Vmm {
fn vm_check_cpuid_compatibility(
&self,
src_vm_config: &Arc<Mutex<VmConfig>>,
src_vm_cpuid: &hypervisor::CpuId,
src_vm_cpuid: &hypervisor::x86_64::CpuId,
) -> result::Result<(), MigratableError> {
// We check the `CPUID` compatibility of between the source vm and destination, which is
// mostly about feature compatibility and "topology/sgx" leaves are not relevant.

View File

@ -2603,7 +2603,7 @@ pub struct VmSnapshot {
pub clock: Option<hypervisor::ClockData>,
pub state: Option<hypervisor::VmState>,
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
pub common_cpuid: hypervisor::CpuId,
pub common_cpuid: hypervisor::x86_64::CpuId,
}
pub const VM_SNAPSHOT_ID: &str = "vm";