vmm: use C ABI-qualification for packed structures

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2025-01-09 02:33:14 +00:00
committed by Rob Bradford
parent abb88cf47f
commit 703e0cab04
2 changed files with 14 additions and 14 deletions

View File

@@ -205,7 +205,7 @@ pub type Result<T> = result::Result<T, Error>;
#[cfg(target_arch = "x86_64")]
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(AsBytes)]
struct LocalX2Apic {
pub r#type: u8,
@@ -217,7 +217,7 @@ struct LocalX2Apic {
}
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(Default, AsBytes)]
struct Ioapic {
pub r#type: u8,
@@ -230,7 +230,7 @@ struct Ioapic {
#[cfg(target_arch = "aarch64")]
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(AsBytes)]
struct GicC {
pub r#type: u8,
@@ -255,7 +255,7 @@ struct GicC {
#[cfg(target_arch = "aarch64")]
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(AsBytes)]
struct GicD {
pub r#type: u8,
@@ -270,7 +270,7 @@ struct GicD {
#[cfg(target_arch = "aarch64")]
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(AsBytes)]
struct GicR {
pub r#type: u8,
@@ -282,7 +282,7 @@ struct GicR {
#[cfg(target_arch = "aarch64")]
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(AsBytes)]
struct GicIts {
pub r#type: u8,
@@ -295,7 +295,7 @@ struct GicIts {
#[cfg(target_arch = "aarch64")]
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(AsBytes)]
struct ProcessorHierarchyNode {
pub r#type: u8,
@@ -308,7 +308,7 @@ struct ProcessorHierarchyNode {
}
#[allow(dead_code)]
#[repr(packed)]
#[repr(C, packed)]
#[derive(Default, AsBytes)]
struct InterruptSourceOverride {
pub r#type: u8,