From 67d4b0c1907455f42ad8cea445ff10b81b49eebc Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Fri, 5 Nov 2010 15:40:38 -0600 Subject: [PATCH] pc: e820 qemu_cfg tables need to be packed We can't let the compiler define the alignment for qemu_cfg data. Signed-off-by: Alex Williamson Signed-off-by: Anthony Liguori --- hw/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 0e44df8103..e7f7ac6b0e 100644 --- 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;