From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH v2] pc: e820 qemu_cfg tables need to be packed Date: Thu, 14 Oct 2010 22:08:17 -0600 Message-ID: <20101015040706.3828.71113.stgit@s20.home> References: <20101014183249.23510.29196.stgit@s20.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, jes.sorensen@redhat.com, anthony@codemonkey.ws, alex.williamson@redhat.com, arnd@arndb.de To: qemu-devel@nongnu.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14986 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780Ab0JOEIY (ORCPT ); Fri, 15 Oct 2010 00:08:24 -0400 In-Reply-To: <20101014183249.23510.29196.stgit@s20.home> Sender: kvm-owner@vger.kernel.org List-ID: We can't let the compiler define the alignment for qemu_cfg data. Signed-off-by: Alex Williamson --- v2: Adjust alignment to help non-x86 hosts per Arnd's suggestion 0.13-stable candidate hw/pc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 69b13bf..0264e3d 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;