mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: Implement common traits for CpuVendor
Serialized CPU profiles will contain information about the CPU vendor. While there are other ways to encode this, such as going via CPUID, we find simply serializing the pre-existing enum the simplest. We also implement some other common traits such as `Debug` and `Eq` which make it more convenient to work with this type. Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de> On-behalf-of: SAP oliver.anderson@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
c80aaa1b58
commit
5cb619ff7c
@@ -27,7 +27,7 @@ use crate::kvm::{TdxExitDetails, TdxExitStatus};
|
||||
use crate::{CpuState, MpState, StandardRegisters};
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[derive(Copy, Clone, Default)]
|
||||
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
|
||||
pub enum CpuVendor {
|
||||
#[default]
|
||||
Unknown,
|
||||
|
||||
Reference in New Issue
Block a user