@@ -7,7 +7,7 @@ use std::mem::size_of;
7
7
8
8
use vm_memory:: { Address , Bytes , GuestAddress , GuestMemory } ;
9
9
use zerocopy:: little_endian:: U32 ;
10
- use zerocopy:: AsBytes ;
10
+ use zerocopy:: { Immutable , IntoBytes } ;
11
11
12
12
use crate :: { checksum, AcpiError , Result , Sdt , SdtHeader } ;
13
13
@@ -18,7 +18,7 @@ const MADT_CPU_ENABLE_FLAG: u32 = 0;
18
18
// everything with an underscore prefix
19
19
#[ allow( dead_code) ]
20
20
#[ repr( packed) ]
21
- #[ derive( Copy , Clone , Debug , Default , AsBytes ) ]
21
+ #[ derive( Copy , Clone , Debug , Default , IntoBytes , Immutable ) ]
22
22
pub struct LocalAPIC {
23
23
r#type : u8 ,
24
24
length : u8 ,
@@ -44,7 +44,7 @@ impl LocalAPIC {
44
44
// everything with an underscore prefix
45
45
#[ allow( dead_code) ]
46
46
#[ repr( packed) ]
47
- #[ derive( Copy , Clone , Debug , Default , AsBytes ) ]
47
+ #[ derive( Copy , Clone , Debug , Default , IntoBytes , Immutable ) ]
48
48
pub struct IoAPIC {
49
49
r#type : u8 ,
50
50
length : u8 ,
@@ -72,7 +72,7 @@ impl IoAPIC {
72
72
// everything with an underscore prefix
73
73
#[ allow( dead_code) ]
74
74
#[ repr( packed) ]
75
- #[ derive( Debug , AsBytes ) ]
75
+ #[ derive( Debug , IntoBytes , Immutable ) ]
76
76
struct MadtHeader {
77
77
sdt : SdtHeader ,
78
78
base_address : U32 ,
0 commit comments