pc: e820 qemu_cfg tables need to be packed
authorAlex Williamson <alex.williamson@redhat.com>
Fri, 5 Nov 2010 21:40:38 +0000 (15:40 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 16 Nov 2010 20:35:00 +0000 (14:35 -0600)
We can't let the compiler define the alignment for qemu_cfg data.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pc.c

diff --git a/hw/pc.c b/hw/pc.c
index 0e44df8..e7f7ac6 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -75,12 +75,12 @@ struct e820_entry {
     uint64_t address;
     uint64_t length;
     uint32_t type;
-};
+} __attribute((__packed__, __aligned__(4)));
 
 struct e820_table {
     uint32_t count;
     struct e820_entry entry[E820_NR_ENTRIES];
-};
+} __attribute((__packed__, __aligned__(4)));
 
 static struct e820_table e820_table;