From patchwork Fri Jul 22 02:30:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9242977 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A881A60757 for ; Fri, 22 Jul 2016 04:54:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 968EB27C2C for ; Fri, 22 Jul 2016 04:54:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89B0027F89; Fri, 22 Jul 2016 04:54:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AB60027C2C for ; Fri, 22 Jul 2016 04:54:17 +0000 (UTC) Received: from localhost ([::1]:45019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQSTY-0006fF-Tj for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 Jul 2016 00:54:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQQFX-0005lg-W1 for qemu-devel@nongnu.org; Thu, 21 Jul 2016 22:31:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQQFP-0002xB-EF for qemu-devel@nongnu.org; Thu, 21 Jul 2016 22:31:34 -0400 Received: from forward15j.cmail.yandex.net ([5.255.227.179]:55175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQQFO-0002v6-Bz for qemu-devel@nongnu.org; Thu, 21 Jul 2016 22:31:31 -0400 Received: from smtp4m.mail.yandex.net (smtp4m.mail.yandex.net [77.88.61.131]) by forward15j.cmail.yandex.net (Yandex) with ESMTP id E5BEC217F1; Fri, 22 Jul 2016 05:31:18 +0300 (MSK) Received: from smtp4m.mail.yandex.net (localhost [127.0.0.1]) by smtp4m.mail.yandex.net (Yandex) with ESMTP id E347ABE0011; Fri, 22 Jul 2016 05:31:18 +0300 (MSK) Received: by smtp4m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4ittpESOiB-VGqqVe02; Fri, 22 Jul 2016 05:31:18 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1469154678; bh=y8oE7vDlCiTSYUGAfBAKnDBqc4XGnHBFtmNH+mcIz78=; h=From:To:Cc:Subject:Date:Message-Id; b=TPEllIHaxlRZfOZfS13sg9B3EDYd7EzSK+ncQRCu6J2EDJFLXBITVkjJ1E5SyYHt7 P0tx85kYAW0VJYUYxDs1smJb43EOQl8a5l5AqiootROdSKCgo8yuq7VsQiREeHlFuz 35Cdpq8c7PGEg2dKLCnRm02aKYgLl+fBTajLJdiE= Authentication-Results: smtp4m.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: FI X-Yandex-Suid-Status: 1 0,1 0,1 0,1 1130000036118848 From: Icenowy Zheng To: Riku Voipio Date: Fri, 22 Jul 2016 10:30:50 +0800 Message-Id: <20160722023050.3998-1-icenowy@aosc.xyz> X-Mailer: git-send-email 2.9.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.255.227.179 X-Mailman-Approved-At: Fri, 22 Jul 2016 00:51:51 -0400 Subject: [Qemu-devel] [PATCH] linux-user: correctly pack target_epoll_event for i386 target 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: Jactry Zeng , qemu-devel@nongnu.org, Icenowy Zheng Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP According to comments in /usr/include/linux/eventpoll.h, x86_64 have the same memory layout of struct target_epoll_event as i386. So on a aligned host, if x86_64 should be packed, i386 will also need. This has been tested with a i386 guest on an arm host: without the patch, wineserver crashes (core). Signed-off-by: Icenowy Zheng --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index b43966e..7380bf5 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2547,7 +2547,7 @@ struct target_mq_attr { #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME) #ifdef CONFIG_EPOLL -#if defined(TARGET_X86_64) +#if defined(TARGET_X86_64) || defined(TARGET_I386) #define TARGET_EPOLL_PACKED QEMU_PACKED #else #define TARGET_EPOLL_PACKED