diff --git a/virtio-core/src/spec/transport_pci.rs b/virtio-core/src/spec/transport_pci.rs index cadfaad2de..e90b9ebb72 100644 --- a/virtio-core/src/spec/transport_pci.rs +++ b/virtio-core/src/spec/transport_pci.rs @@ -69,7 +69,7 @@ pub enum CfgType { const_assert_eq!(core::mem::size_of::(), 1); #[derive(Debug)] -#[repr(C)] +#[repr(C, packed)] pub struct CommonCfg { // About the whole device. /// The driver uses this to select which feature bits device_feature shows.