diff --git a/protos/src/plugin.rs b/protos/src/plugin.rs index ce491e751a..b68d83fecd 100644 --- a/protos/src/plugin.rs +++ b/protos/src/plugin.rs @@ -5,6 +5,7 @@ pub use crate::generated::plugin::*; /// Converts protobuf representation of CpuId data into KVM format. +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn cpuid_proto_to_kvm(entry: &CpuidEntry) -> kvm_sys::kvm_cpuid_entry2 { // Safe: C structures are expected to be zero-initialized. let mut e: kvm_sys::kvm_cpuid_entry2 = unsafe { std::mem::zeroed() }; @@ -22,6 +23,7 @@ pub fn cpuid_proto_to_kvm(entry: &CpuidEntry) -> kvm_sys::kvm_cpuid_entry2 { } /// Converts KVM representation of CpuId data into protobuf format. +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn cpuid_kvm_to_proto(entry: &kvm_sys::kvm_cpuid_entry2) -> CpuidEntry { let mut e = CpuidEntry::new(); e.function = entry.function;