@@ -23,14 +23,17 @@ use std::ffi::CStr;
2323use std:: fmt:: { self , Display } ;
2424use std:: io:: { Read , Seek } ;
2525
26- use vm_memory:: { Address , ByteValued , Bytes , GuestAddress , GuestMemory , GuestUsize } ;
26+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
27+ use vm_memory:: ByteValued ;
28+ use vm_memory:: { Address , Bytes , GuestAddress , GuestMemory , GuestUsize } ;
2729
2830#[ allow( dead_code) ]
2931#[ allow( non_camel_case_types) ]
3032#[ allow( non_snake_case) ]
3133#[ allow( non_upper_case_globals) ]
3234#[ allow( missing_docs) ]
3335#[ cfg_attr( feature = "cargo-clippy" , allow( clippy:: all) ) ]
36+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
3437pub mod bootparam;
3538
3639#[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
@@ -130,6 +133,7 @@ pub struct KernelLoaderResult {
130133 pub kernel_end : GuestUsize ,
131134 /// This field is only for bzImage following https://www.kernel.org/doc/Documentation/x86/boot.txt
132135 /// VMM should make use of it to fill zero page for bzImage direct boot.
136+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
133137 pub setup_header : Option < bootparam:: setup_header > ,
134138 /// This field optionally holds the address of a PVH entry point, indicating that
135139 /// the kernel supports the PVH boot protocol as described in:
@@ -151,6 +155,7 @@ pub trait KernelLoader {
151155 F : Read + Seek ;
152156}
153157
158+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
154159unsafe impl ByteValued for bootparam:: setup_header { }
155160
156161/// Writes the command line string to the given guest memory slice.
0 commit comments