From patchwork Thu Aug 4 14:15:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 73275 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1419214qga; Thu, 4 Aug 2016 07:17:22 -0700 (PDT) X-Received: by 10.237.35.76 with SMTP id i12mr6501804qtc.41.1470320242645; Thu, 04 Aug 2016 07:17:22 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v38si8367076qtv.38.2016.08.04.07.17.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 04 Aug 2016 07:17:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVJSc-0004Lz-9q for patch@linaro.org; Thu, 04 Aug 2016 10:17:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVJQa-0003XX-As for qemu-devel@nongnu.org; Thu, 04 Aug 2016 10:15:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVJQU-0000Si-Os for qemu-devel@nongnu.org; Thu, 04 Aug 2016 10:15:15 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:33433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVJQU-0000SU-GA for qemu-devel@nongnu.org; Thu, 04 Aug 2016 10:15:10 -0400 Received: by mail-lf0-x233.google.com with SMTP id b199so183353719lfe.0 for ; Thu, 04 Aug 2016 07:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0huG+74B1pw/3QlqfcIoVNkebo1OtlNJKSblavs4fpA=; b=SRxbZpinUv4QIMIakLlQV5EZzmBX3MlvQCmXFx8NRewr/XWrPEL/TnwGkmtqg+RJbt qxbyeSrStbDROArRsPFWNy9JUU+4+IMN9RahFJ+I2KMnIDlSjAmP3dR82TSz8sNPL89d H28n2K2fHBvfqlmhqCikI7j6YLC9X7fVVmwys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0huG+74B1pw/3QlqfcIoVNkebo1OtlNJKSblavs4fpA=; b=WDAh67CGrotjDEpkTp1fm6NzoLcYT21jtNPfZRD+S3QllnDTk8D6zalWFkV7HwqARh S2kwdWV2FlNkiKFSK8rf9xtECusz0vAZ1yQ+DU/+YlmOW0Y0w1797Z93ji55e7D4IcJl NW1fRckEh+6bNngcxCb3KX7ltU0im6GlZkSIxg+/P0QyhGmb1xtIUNtT83PathMAFSbA N2vjLp2u/UCgN3ZJPLb7dVvKcbGASsRxUyBRTOv58g4FtacSjsOJgj29mC4bC2D4VOR7 F4Gs4DFyHOmO4xgp1HT3mEoJturgy3TpOk9IpsTbnDLujigckkbRjrfT7quMZ/J1T7K6 +7Rg== X-Gm-Message-State: AEkoouvRWCVgUcEKQKXS+JtlzL2bqgUlqe0tIxqizX7F/9ttKqJwPrHLZYrPMw5iDGbOZDMv X-Received: by 10.46.32.5 with SMTP id g5mr20365240ljg.53.1470320109406; Thu, 04 Aug 2016 07:15:09 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id r76sm2407266lfi.35.2016.08.04.07.15.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Aug 2016 07:15:08 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Thu, 4 Aug 2016 17:15:01 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::233 Subject: [Qemu-devel] [PULL 1/5] linux-user: Use correct alignment for long long on i386 guests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell For i386, the ABI specifies that 'long long' (8 byte values) need only be 4 aligned, but we were requiring them to be 8-aligned. This meant we were laying out the target_epoll_event structure wrongly. Add a suitable ifdef to abitypes.h to specify the i386-specific alignment requirement. Reported-by: Icenowy Zheng Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- include/exec/user/abitypes.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.1.4 diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h index a09d6c6..ba18860 100644 --- a/include/exec/user/abitypes.h +++ b/include/exec/user/abitypes.h @@ -15,6 +15,10 @@ #define ABI_LLONG_ALIGNMENT 2 #endif +#if defined(TARGET_I386) && !defined(TARGET_X86_64) +#define ABI_LLONG_ALIGNMENT 4 +#endif + #ifndef ABI_SHORT_ALIGNMENT #define ABI_SHORT_ALIGNMENT 2 #endif