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:
Oliver Anderson
2026-03-20 11:17:46 +01:00
committed by Rob Bradford
parent c80aaa1b58
commit 5cb619ff7c

View File

@@ -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,