mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: provide a generic CpudIdEntry structure
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -36,14 +36,14 @@ use devices::interrupt_controller::InterruptController;
|
||||
use gdbstub_arch::x86::reg::{X86SegmentRegs, X86_64CoreRegs};
|
||||
#[cfg(feature = "guest_debug")]
|
||||
use hypervisor::arch::x86::msr_index;
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
use hypervisor::arch::x86::CpuIdEntry;
|
||||
#[cfg(all(target_arch = "x86_64", feature = "gdb"))]
|
||||
use hypervisor::arch::x86::{SpecialRegisters, StandardRegisters};
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
use hypervisor::kvm::kvm_bindings;
|
||||
#[cfg(feature = "tdx")]
|
||||
use hypervisor::kvm::{TdxExitDetails, TdxExitStatus};
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
use hypervisor::x86_64::CpuIdEntry;
|
||||
#[cfg(feature = "guest_debug")]
|
||||
use hypervisor::x86_64::{MsrEntries, MsrEntry};
|
||||
use hypervisor::{CpuState, HypervisorCpuError, VmExit, VmOps};
|
||||
|
||||
@@ -355,7 +355,7 @@ pub fn start_vmm_thread(
|
||||
struct VmMigrationConfig {
|
||||
vm_config: Arc<Mutex<VmConfig>>,
|
||||
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
|
||||
common_cpuid: Vec<hypervisor::x86_64::CpuIdEntry>,
|
||||
common_cpuid: Vec<hypervisor::arch::x86::CpuIdEntry>,
|
||||
memory_manager_data: MemoryManagerSnapshotData,
|
||||
}
|
||||
|
||||
@@ -1593,7 +1593,7 @@ impl Vmm {
|
||||
fn vm_check_cpuid_compatibility(
|
||||
&self,
|
||||
src_vm_config: &Arc<Mutex<VmConfig>>,
|
||||
src_vm_cpuid: &[hypervisor::x86_64::CpuIdEntry],
|
||||
src_vm_cpuid: &[hypervisor::arch::x86::CpuIdEntry],
|
||||
) -> 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.
|
||||
|
||||
@@ -2618,7 +2618,7 @@ pub struct VmSnapshot {
|
||||
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
|
||||
pub clock: Option<hypervisor::ClockData>,
|
||||
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
|
||||
pub common_cpuid: Vec<hypervisor::x86_64::CpuIdEntry>,
|
||||
pub common_cpuid: Vec<hypervisor::arch::x86::CpuIdEntry>,
|
||||
}
|
||||
|
||||
pub const VM_SNAPSHOT_ID: &str = "vm";
|
||||
|
||||
Reference in New Issue
Block a user