From patchwork Fri Oct 15 04:08:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 67883 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F2BCDB70D1 for ; Fri, 15 Oct 2010 15:09:49 +1100 (EST) Received: from localhost ([127.0.0.1]:60929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6bbj-0007vY-CB for incoming@patchwork.ozlabs.org; Fri, 15 Oct 2010 00:09:27 -0400 Received: from [140.186.70.92] (port=39262 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6bap-0007qw-Fq for qemu-devel@nongnu.org; Fri, 15 Oct 2010 00:08:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6bai-0006kk-PR for qemu-devel@nongnu.org; Fri, 15 Oct 2010 00:08:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6bai-0006kZ-Ib for qemu-devel@nongnu.org; Fri, 15 Oct 2010 00:08:24 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9F48Ice006975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Oct 2010 00:08:19 -0400 Received: from s20.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9F48HV3029883; Fri, 15 Oct 2010 00:08:18 -0400 From: Alex Williamson To: qemu-devel@nongnu.org Date: Thu, 14 Oct 2010 22:08:17 -0600 Message-ID: <20101015040706.3828.71113.stgit@s20.home> In-Reply-To: <20101014183249.23510.29196.stgit@s20.home> References: <20101014183249.23510.29196.stgit@s20.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: jes.sorensen@redhat.com, alex.williamson@redhat.com, arnd@arndb.de, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH v2] pc: e820 qemu_cfg tables need to be packed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;