File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -185,9 +185,11 @@ impl Kvm {
185
185
// Safe because we verify the value of ret and we are the owners of the fd.
186
186
let vm_file = unsafe { File :: from_raw_fd ( ret) } ;
187
187
let run_mmap_size = self . get_vcpu_mmap_size ( ) ?;
188
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
188
189
let kvm_cpuid: CpuId = self . get_supported_cpuid ( MAX_KVM_CPUID_ENTRIES ) ?;
189
190
Ok ( VmFd {
190
191
vm : vm_file,
192
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
191
193
supported_cpuid : kvm_cpuid,
192
194
run_size : run_mmap_size,
193
195
} )
@@ -222,11 +224,13 @@ impl Into<u64> for NoDatamatch {
222
224
/// A wrapper around creating and using a VM.
223
225
pub struct VmFd {
224
226
vm : File ,
227
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
225
228
supported_cpuid : CpuId ,
226
229
run_size : usize ,
227
230
}
228
231
229
232
impl VmFd {
233
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
230
234
/// Returns a clone of the system supported CPUID values associated with this VmFd
231
235
///
232
236
pub fn get_supported_cpuid ( & self ) -> CpuId {
You can’t perform that action at this time.
0 commit comments