@@ -23,14 +23,17 @@ use std::ffi::CStr;
23
23
use std:: fmt:: { self , Display } ;
24
24
use std:: io:: { Read , Seek } ;
25
25
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 } ;
27
29
28
30
#[ allow( dead_code) ]
29
31
#[ allow( non_camel_case_types) ]
30
32
#[ allow( non_snake_case) ]
31
33
#[ allow( non_upper_case_globals) ]
32
34
#[ allow( missing_docs) ]
33
35
#[ cfg_attr( feature = "cargo-clippy" , allow( clippy:: all) ) ]
36
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
34
37
pub mod bootparam;
35
38
36
39
#[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
@@ -130,6 +133,7 @@ pub struct KernelLoaderResult {
130
133
pub kernel_end : GuestUsize ,
131
134
/// This field is only for bzImage following https://www.kernel.org/doc/Documentation/x86/boot.txt
132
135
/// VMM should make use of it to fill zero page for bzImage direct boot.
136
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
133
137
pub setup_header : Option < bootparam:: setup_header > ,
134
138
/// This field optionally holds the address of a PVH entry point, indicating that
135
139
/// the kernel supports the PVH boot protocol as described in:
@@ -151,6 +155,7 @@ pub trait KernelLoader {
151
155
F : Read + Seek ;
152
156
}
153
157
158
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
154
159
unsafe impl ByteValued for bootparam:: setup_header { }
155
160
156
161
/// Writes the command line string to the given guest memory slice.
0 commit comments