@@ -7,7 +7,7 @@ use std::mem::size_of;
77
88use vm_memory:: { Address , Bytes , GuestAddress , GuestMemory } ;
99use zerocopy:: little_endian:: U32 ;
10- use zerocopy:: AsBytes ;
10+ use zerocopy:: { Immutable , IntoBytes } ;
1111
1212use crate :: { checksum, AcpiError , Result , Sdt , SdtHeader } ;
1313
@@ -18,7 +18,7 @@ const MADT_CPU_ENABLE_FLAG: u32 = 0;
1818// everything with an underscore prefix
1919#[ allow( dead_code) ]
2020#[ repr( packed) ]
21- #[ derive( Copy , Clone , Debug , Default , AsBytes ) ]
21+ #[ derive( Copy , Clone , Debug , Default , IntoBytes , Immutable ) ]
2222pub struct LocalAPIC {
2323 r#type : u8 ,
2424 length : u8 ,
@@ -44,7 +44,7 @@ impl LocalAPIC {
4444// everything with an underscore prefix
4545#[ allow( dead_code) ]
4646#[ repr( packed) ]
47- #[ derive( Copy , Clone , Debug , Default , AsBytes ) ]
47+ #[ derive( Copy , Clone , Debug , Default , IntoBytes , Immutable ) ]
4848pub struct IoAPIC {
4949 r#type : u8 ,
5050 length : u8 ,
@@ -72,7 +72,7 @@ impl IoAPIC {
7272// everything with an underscore prefix
7373#[ allow( dead_code) ]
7474#[ repr( packed) ]
75- #[ derive( Debug , AsBytes ) ]
75+ #[ derive( Debug , IntoBytes , Immutable ) ]
7676struct MadtHeader {
7777 sdt : SdtHeader ,
7878 base_address : U32 ,
0 commit comments