mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: use C ABI-qualification for packed structures
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
+6
-6
@@ -44,7 +44,7 @@ pub const ACPI_APIC_GENERIC_REDISTRIBUTOR: u8 = 14;
|
||||
pub const ACPI_APIC_GENERIC_TRANSLATOR: u8 = 15;
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
#[derive(Default, AsBytes)]
|
||||
struct PciRangeEntry {
|
||||
pub base_address: u64,
|
||||
@@ -55,7 +55,7 @@ struct PciRangeEntry {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
#[derive(Default, AsBytes)]
|
||||
struct MemoryAffinity {
|
||||
pub type_: u8,
|
||||
@@ -72,7 +72,7 @@ struct MemoryAffinity {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
#[derive(Default, AsBytes)]
|
||||
struct ProcessorLocalX2ApicAffinity {
|
||||
pub type_: u8,
|
||||
@@ -86,7 +86,7 @@ struct ProcessorLocalX2ApicAffinity {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
#[derive(Default, AsBytes)]
|
||||
struct ProcessorGiccAffinity {
|
||||
pub type_: u8,
|
||||
@@ -146,7 +146,7 @@ impl MemoryAffinity {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
#[derive(Default, AsBytes)]
|
||||
struct ViotVirtioPciNode {
|
||||
pub type_: u8,
|
||||
@@ -158,7 +158,7 @@ struct ViotVirtioPciNode {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(packed)]
|
||||
#[repr(C, packed)]
|
||||
#[derive(Default, AsBytes)]
|
||||
struct ViotPciRangeNode {
|
||||
pub type_: u8,
|
||||
|
||||
Reference in New Issue
Block a user