From nobody Mon May 6 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513805653084708.8459863593994; Wed, 20 Dec 2017 13:34:13 -0800 (PST) Received: from localhost ([::1]:42429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRm07-0008Di-0q for importer@patchew.org; Wed, 20 Dec 2017 16:34:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlx2-0006Gz-J0 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:30:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRlx1-0006k2-KB for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:30:56 -0500 Received: from heinz.dinsnail.net ([2a01:238:43b4:3200:9392:5dcc:2f0e:a960]:49796) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRlx1-0006eJ-Cl for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:30:55 -0500 Received: from heinz.dinsnail.net ([IPv6:::1]) by heinz.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLUAO4029347; Wed, 20 Dec 2017 22:30:10 +0100 Received: from eldalonde.UUCP (uucp@localhost) by heinz.dinsnail.net (8.14.9/8.14.9/Submit) with bsmtp id vBKLUA5n029346; Wed, 20 Dec 2017 22:30:10 +0100 Received: from rivendell.weiser.dinsnail.net (rivendell.weiser.dinsnail.net [IPv6:fdbc:1bbf:5341::1:8]) by eldalonde.weiser.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLNFZC018653; Wed, 20 Dec 2017 22:23:15 +0100 Received: (from michael@localhost) by rivendell.weiser.dinsnail.net (8.14.9/8.14.3/Submit) id vBKLNFYi012713; Wed, 20 Dec 2017 22:23:15 +0100 From: Michael Weiser To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 22:23:02 +0100 Message-Id: <20171220212308.12614-2-michael.weiser@gmx.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220212308.12614-1-michael.weiser@gmx.de> References: <20171220212308.12614-1-michael.weiser@gmx.de> X-dinsnail-net-MailScanner-Information: Please contact the ISP for more information X-dinsnail-net-MailScanner-ID: vBKLUAO4029347 X-dinsnail-net-MailScanner: Found to be clean X-dinsnail-net-MailScanner-From: michael@rivendell.weiser.dinsnail.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:238:43b4:3200:9392:5dcc:2f0e:a960 Subject: [Qemu-devel] [PATCH v3 1/7] linux-user: Add support for big-endian aarch64 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: Riku Voipio , Michael Weiser , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Enable big-endian mode for data accesses on aarch64 for big-endian linux user mode. Activate it for all exception levels as documented by ARM: Set the SCTLR EE bit for ELs 1 through 3. Additionally set bit E0E in EL1 to enable it in EL0 as well. Signed-off-by: Michael Weiser Reviewed-by: Richard Henderson --- linux-user/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 71696ed33d..7a4dd0c9c3 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4622,6 +4622,12 @@ int main(int argc, char **argv, char **envp) } env->pc =3D regs->pc; env->xregs[31] =3D regs->sp; +#ifdef TARGET_WORDS_BIGENDIAN + env->cp15.sctlr_el[1] |=3D SCTLR_E0E; + for (i =3D 1; i < 4; ++i) { + env->cp15.sctlr_el[i] |=3D SCTLR_EE; + } +#endif } #elif defined(TARGET_ARM) { --=20 2.15.1 From nobody Mon May 6 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513805803586540.6115330317751; Wed, 20 Dec 2017 13:36:43 -0800 (PST) Received: from localhost ([::1]:42451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRm2W-0001y3-CT for importer@patchew.org; Wed, 20 Dec 2017 16:36:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlxS-0006ZH-Q4 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRlxS-0007Sv-1D for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:22 -0500 Received: from heinz.dinsnail.net ([2a01:238:43b4:3200:9392:5dcc:2f0e:a960]:49832) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRlxR-0007Qd-O1 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:21 -0500 Received: from heinz.dinsnail.net ([IPv6:::1]) by heinz.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLUAv1029349; Wed, 20 Dec 2017 22:30:10 +0100 Received: from eldalonde.UUCP (uucp@localhost) by heinz.dinsnail.net (8.14.9/8.14.9/Submit) with bsmtp id vBKLUAee029348; Wed, 20 Dec 2017 22:30:10 +0100 Received: from rivendell.weiser.dinsnail.net (rivendell.weiser.dinsnail.net [IPv6:fdbc:1bbf:5341::1:8]) by eldalonde.weiser.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLNG5q018657; Wed, 20 Dec 2017 22:23:16 +0100 Received: (from michael@localhost) by rivendell.weiser.dinsnail.net (8.14.9/8.14.3/Submit) id vBKLNGHo012714; Wed, 20 Dec 2017 22:23:16 +0100 From: Michael Weiser To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 22:23:03 +0100 Message-Id: <20171220212308.12614-3-michael.weiser@gmx.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220212308.12614-1-michael.weiser@gmx.de> References: <20171220212308.12614-1-michael.weiser@gmx.de> X-dinsnail-net-MailScanner-Information: Please contact the ISP for more information X-dinsnail-net-MailScanner-ID: vBKLUAv1029349 X-dinsnail-net-MailScanner: Found to be clean X-dinsnail-net-MailScanner-From: michael@rivendell.weiser.dinsnail.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:238:43b4:3200:9392:5dcc:2f0e:a960 Subject: [Qemu-devel] [PATCH v3 2/7] linux-user: Add separate aarch64_be uname 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: Riku Voipio , Michael Weiser , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Make big-endian aarch64 systems identify as aarch64_be as expected by big-endian userland and toolchains. Signed-off-by: Michael Weiser Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier --- linux-user/aarch64/target_syscall.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/aarch64/target_syscall.h b/linux-user/aarch64/targe= t_syscall.h index 1b62953eeb..604ab99b14 100644 --- a/linux-user/aarch64/target_syscall.h +++ b/linux-user/aarch64/target_syscall.h @@ -8,7 +8,11 @@ struct target_pt_regs { uint64_t pstate; }; =20 +#if defined(TARGET_WORDS_BIGENDIAN) +#define UNAME_MACHINE "aarch64_be" +#else #define UNAME_MACHINE "aarch64" +#endif #define UNAME_MINIMUM_RELEASE "3.8.0" #define TARGET_CLONE_BACKWARDS #define TARGET_MINSIGSTKSZ 2048 --=20 2.15.1 From nobody Mon May 6 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513805633143323.9088586389702; Wed, 20 Dec 2017 13:33:53 -0800 (PST) Received: from localhost ([::1]:42428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlzp-00080T-4k for importer@patchew.org; Wed, 20 Dec 2017 16:33:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlxW-0006bk-R9 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRlxV-0007bN-Ti for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:26 -0500 Received: from heinz.dinsnail.net ([2a01:238:43b4:3200:9392:5dcc:2f0e:a960]:49840) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRlxV-0007Y4-NF for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:25 -0500 Received: from heinz.dinsnail.net ([IPv6:::1]) by heinz.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLUBc1029352; Wed, 20 Dec 2017 22:30:11 +0100 Received: from eldalonde.UUCP (uucp@localhost) by heinz.dinsnail.net (8.14.9/8.14.9/Submit) with bsmtp id vBKLUBb8029350; Wed, 20 Dec 2017 22:30:11 +0100 Received: from rivendell.weiser.dinsnail.net (rivendell.weiser.dinsnail.net [IPv6:fdbc:1bbf:5341::1:8]) by eldalonde.weiser.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLNH2Y018661; Wed, 20 Dec 2017 22:23:17 +0100 Received: (from michael@localhost) by rivendell.weiser.dinsnail.net (8.14.9/8.14.3/Submit) id vBKLNHkD012715; Wed, 20 Dec 2017 22:23:17 +0100 From: Michael Weiser To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 22:23:04 +0100 Message-Id: <20171220212308.12614-4-michael.weiser@gmx.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220212308.12614-1-michael.weiser@gmx.de> References: <20171220212308.12614-1-michael.weiser@gmx.de> X-dinsnail-net-MailScanner-Information: Please contact the ISP for more information X-dinsnail-net-MailScanner-ID: vBKLUBc1029352 X-dinsnail-net-MailScanner: Found to be clean X-dinsnail-net-MailScanner-From: michael@rivendell.weiser.dinsnail.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:238:43b4:3200:9392:5dcc:2f0e:a960 Subject: [Qemu-devel] [PATCH v3 3/7] linux-user: Fix endianess of aarch64 signal trampoline 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: Riku Voipio , Michael Weiser , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Since for aarch64 the signal trampoline is synthesized directly into the signal frame we need to make sure the instructions end up little-endian. Otherwise the wrong endianness will cause a SIGILL upon return from the signal handler on big-endian targets. Signed-off-by: Michael Weiser Reviewed-by: Richard Henderson --- linux-user/signal.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index dae14d4a89..81b7fbeb1e 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1599,9 +1599,13 @@ static void target_setup_frame(int usig, struct targ= et_sigaction *ka, if (ka->sa_flags & TARGET_SA_RESTORER) { return_addr =3D ka->sa_restorer; } else { - /* mov x8,#__NR_rt_sigreturn; svc #0 */ - __put_user(0xd2801168, &frame->tramp[0]); - __put_user(0xd4000001, &frame->tramp[1]); + /* + * mov x8,#__NR_rt_sigreturn; svc #0 + * Since these are instructions they need to be put as little-endi= an + * regardless of target default or current CPU endianness. + */ + __put_user_e(0xd2801168, &frame->tramp[0], le); + __put_user_e(0xd4000001, &frame->tramp[1], le); return_addr =3D frame_addr + offsetof(struct target_rt_sigframe, t= ramp); } env->xregs[0] =3D usig; --=20 2.15.1 From nobody Mon May 6 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513805824468494.3643929253051; Wed, 20 Dec 2017 13:37:04 -0800 (PST) Received: from localhost ([::1]:42454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRm2w-0002JM-Au for importer@patchew.org; Wed, 20 Dec 2017 16:37:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlxh-0006ks-UQ for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRlxh-0007uB-2r for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:37 -0500 Received: from heinz.dinsnail.net ([2a01:238:43b4:3200:9392:5dcc:2f0e:a960]:49860) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRlxg-0007sf-Rg for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:36 -0500 Received: from heinz.dinsnail.net ([IPv6:::1]) by heinz.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLUB5E029360; Wed, 20 Dec 2017 22:30:11 +0100 Received: from eldalonde.UUCP (uucp@localhost) by heinz.dinsnail.net (8.14.9/8.14.9/Submit) with bsmtp id vBKLUBKH029356; Wed, 20 Dec 2017 22:30:11 +0100 Received: from rivendell.weiser.dinsnail.net (rivendell.weiser.dinsnail.net [IPv6:fdbc:1bbf:5341::1:8]) by eldalonde.weiser.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLNHeI018665; Wed, 20 Dec 2017 22:23:17 +0100 Received: (from michael@localhost) by rivendell.weiser.dinsnail.net (8.14.9/8.14.3/Submit) id vBKLNHnZ012716; Wed, 20 Dec 2017 22:23:17 +0100 From: Michael Weiser To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 22:23:05 +0100 Message-Id: <20171220212308.12614-5-michael.weiser@gmx.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220212308.12614-1-michael.weiser@gmx.de> References: <20171220212308.12614-1-michael.weiser@gmx.de> X-dinsnail-net-MailScanner-Information: Please contact the ISP for more information X-dinsnail-net-MailScanner-ID: vBKLUB5E029360 X-dinsnail-net-MailScanner: Found to be clean X-dinsnail-net-MailScanner-From: michael@rivendell.weiser.dinsnail.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:238:43b4:3200:9392:5dcc:2f0e:a960 Subject: [Qemu-devel] [PATCH v3 4/7] configure: Add aarch64_be-linux-user 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: Riku Voipio , Michael Weiser , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add target aarch64_be-linux-user. This allows a qemu-aarch64_be binary to be built that will run big-endian aarch64 binaries. Signed-off-by: Michael Weiser Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier --- configure | 5 +++-- default-configs/aarch64_be-linux-user.mak | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 default-configs/aarch64_be-linux-user.mak diff --git a/configure b/configure index 9c8aa5a98b..95d5808be1 100755 --- a/configure +++ b/configure @@ -6369,7 +6369,7 @@ target_name=3D$(echo $target | cut -d '-' -f 1) target_bigendian=3D"no" =20 case "$target_name" in - armeb|hppa|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or1k|ppc|ppcem= b|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb) + armeb|aarch64_be|hppa|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or1= k|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensae= b) target_bigendian=3Dyes ;; esac @@ -6424,7 +6424,8 @@ case "$target_name" in mttcg=3D"yes" gdb_xml_files=3D"arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" ;; - aarch64) + aarch64|aarch64_be) + TARGET_ARCH=3Daarch64 TARGET_BASE_ARCH=3Darm bflt=3D"yes" mttcg=3D"yes" diff --git a/default-configs/aarch64_be-linux-user.mak b/default-configs/aa= rch64_be-linux-user.mak new file mode 100644 index 0000000000..a69d9d2e41 --- /dev/null +++ b/default-configs/aarch64_be-linux-user.mak @@ -0,0 +1 @@ +# Default configuration for aarch64_be-linux-user --=20 2.15.1 From nobody Mon May 6 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513805820293755.9833224690713; Wed, 20 Dec 2017 13:37:00 -0800 (PST) Received: from localhost ([::1]:42452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRm2k-000270-6y for importer@patchew.org; Wed, 20 Dec 2017 16:36:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlxc-0006g1-S9 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRlxb-0007kx-V6 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:32 -0500 Received: from heinz.dinsnail.net ([2a01:238:43b4:3200:9392:5dcc:2f0e:a960]:49852) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRlxb-0007j4-Ny for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:31 -0500 Received: from heinz.dinsnail.net ([IPv6:::1]) by heinz.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLUBGu029368; Wed, 20 Dec 2017 22:30:11 +0100 Received: from eldalonde.UUCP (uucp@localhost) by heinz.dinsnail.net (8.14.9/8.14.9/Submit) with bsmtp id vBKLUB4m029367; Wed, 20 Dec 2017 22:30:11 +0100 Received: from rivendell.weiser.dinsnail.net (rivendell.weiser.dinsnail.net [IPv6:fdbc:1bbf:5341::1:8]) by eldalonde.weiser.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLNIN1018669; Wed, 20 Dec 2017 22:23:18 +0100 Received: (from michael@localhost) by rivendell.weiser.dinsnail.net (8.14.9/8.14.3/Submit) id vBKLNIte012717; Wed, 20 Dec 2017 22:23:18 +0100 From: Michael Weiser To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 22:23:06 +0100 Message-Id: <20171220212308.12614-6-michael.weiser@gmx.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220212308.12614-1-michael.weiser@gmx.de> References: <20171220212308.12614-1-michael.weiser@gmx.de> X-dinsnail-net-MailScanner-Information: Please contact the ISP for more information X-dinsnail-net-MailScanner-ID: vBKLUBGu029368 X-dinsnail-net-MailScanner: Found to be clean X-dinsnail-net-MailScanner-From: michael@rivendell.weiser.dinsnail.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:238:43b4:3200:9392:5dcc:2f0e:a960 Subject: [Qemu-devel] [PATCH v3 5/7] linux-user: Add aarch64_be magic numbers to qemu-binfmt-conf.sh 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: Riku Voipio , Michael Weiser , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" As we now have a linux-user aarch64_be target, we can add it to the list of supported targets in qemu-binfmt-conf.sh Signed-off-by: Michael Weiser Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 8afc3eb5bb..d69953525c 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -4,7 +4,7 @@ =20 qemu_target_list=3D"i386 i486 alpha arm sparc32plus ppc ppc64 ppc64le m68k= \ mips mipsel mipsn32 mipsn32el mips64 mips64el \ -sh4 sh4eb s390x aarch64 hppa" +sh4 sh4eb s390x aarch64 aarch64_be hppa" =20 i386_magic=3D'\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\= x00\x03\x00' i386_mask=3D'\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\= xff\xfe\xff\xff\xff' @@ -92,6 +92,10 @@ aarch64_magic=3D'\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00= \x00\x00\x00\x00\x02\x00\x aarch64_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x= ff\xff\xfe\xff\xff\xff' aarch64_family=3Darm =20 +aarch64_be_magic=3D'\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x0= 0\x00\x02\x00\xb7' +aarch64_be_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xf= f\xff\xff\xff\xfe\xff\xff' +aarch64_be_family=3Darm + hppa_magic=3D'\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00= \x00\x00\x02\x00\x0f' hppa_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\= xff\xff\xfe\xff\xff' hppa_family=3Dhppa --=20 2.15.1 From nobody Mon May 6 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513805947212253.5798119238226; Wed, 20 Dec 2017 13:39:07 -0800 (PST) Received: from localhost ([::1]:42633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRm4q-0004Eo-7q for importer@patchew.org; Wed, 20 Dec 2017 16:39:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlxm-0006nQ-Ij for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRlxk-00082K-Vn for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:41 -0500 Received: from heinz.dinsnail.net ([2a01:238:43b4:3200:9392:5dcc:2f0e:a960]:49868) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRlxk-0007zT-Mm for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:40 -0500 Received: from heinz.dinsnail.net ([IPv6:::1]) by heinz.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLUCMT029370; Wed, 20 Dec 2017 22:30:12 +0100 Received: from eldalonde.UUCP (uucp@localhost) by heinz.dinsnail.net (8.14.9/8.14.9/Submit) with bsmtp id vBKLUBxm029369; Wed, 20 Dec 2017 22:30:11 +0100 Received: from rivendell.weiser.dinsnail.net (rivendell.weiser.dinsnail.net [IPv6:fdbc:1bbf:5341::1:8]) by eldalonde.weiser.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLNJPR018673; Wed, 20 Dec 2017 22:23:19 +0100 Received: (from michael@localhost) by rivendell.weiser.dinsnail.net (8.14.9/8.14.3/Submit) id vBKLNJue012718; Wed, 20 Dec 2017 22:23:19 +0100 From: Michael Weiser To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 22:23:07 +0100 Message-Id: <20171220212308.12614-7-michael.weiser@gmx.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220212308.12614-1-michael.weiser@gmx.de> References: <20171220212308.12614-1-michael.weiser@gmx.de> X-dinsnail-net-MailScanner-Information: Please contact the ISP for more information X-dinsnail-net-MailScanner-ID: vBKLUCMT029370 X-dinsnail-net-MailScanner: Found to be clean X-dinsnail-net-MailScanner-From: michael@rivendell.weiser.dinsnail.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:238:43b4:3200:9392:5dcc:2f0e:a960 Subject: [Qemu-devel] [PATCH v3 6/7] linux-user: Separate binfmt arm CPU families 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: Riku Voipio , Michael Weiser , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Give big-endian arm and aarch64 CPUs their own family in qemu-binfmt-conf.sh to make sure we register qemu-user for binaries of the opposite endianness on arm and aarch64. Apart from the family assignments of the magic vales, qemu_get_family() needs to be able to distinguish the two and recognise aarch64{,_be} as well. Signed-off-by: Michael Weiser Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index d69953525c..597efdbe50 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -24,7 +24,7 @@ arm_family=3Darm =20 armeb_magic=3D'\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00= \x02\x00\x28' armeb_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff= \xff\xff\xfe\xff\xff' -armeb_family=3Darm +armeb_family=3Darmeb =20 sparc_magic=3D'\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00= \x02\x00\x02' sparc_mask=3D'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff= \xff\xff\xfe\xff\xff' @@ -94,7 +94,7 @@ aarch64_family=3Darm =20 aarch64_be_magic=3D'\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x0= 0\x00\x02\x00\xb7' aarch64_be_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xf= f\xff\xff\xff\xfe\xff\xff' -aarch64_be_family=3Darm +aarch64_be_family=3Darmeb =20 hppa_magic=3D'\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00= \x00\x00\x02\x00\x0f' hppa_mask=3D'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\= xff\xff\xfe\xff\xff' @@ -115,9 +115,12 @@ qemu_get_family() { ppc64el|ppc64le) echo "ppcle" ;; - arm|armel|armhf|arm64|armv[4-9]*) + arm|armel|armhf|arm64|armv[4-9]*l|aarch64) echo "arm" ;; + armeb|armv[4-9]*b|aarch64_be) + echo "armeb" + ;; sparc*) echo "sparc" ;; --=20 2.15.1 From nobody Mon May 6 11:25:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15138056274871005.5268889916301; Wed, 20 Dec 2017 13:33:47 -0800 (PST) Received: from localhost ([::1]:42427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlzj-0007uC-E2 for importer@patchew.org; Wed, 20 Dec 2017 16:33:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRlxL-0006S9-7x for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRlxK-0007DJ-F2 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:15 -0500 Received: from heinz.dinsnail.net ([2a01:238:43b4:3200:9392:5dcc:2f0e:a960]:49824) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRlxK-0007BE-67 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 16:31:14 -0500 Received: from heinz.dinsnail.net ([IPv6:::1]) by heinz.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLUCU5029372; Wed, 20 Dec 2017 22:30:12 +0100 Received: from eldalonde.UUCP (uucp@localhost) by heinz.dinsnail.net (8.14.9/8.14.9/Submit) with bsmtp id vBKLUCRM029371; Wed, 20 Dec 2017 22:30:12 +0100 Received: from rivendell.weiser.dinsnail.net (rivendell.weiser.dinsnail.net [IPv6:fdbc:1bbf:5341::1:8]) by eldalonde.weiser.dinsnail.net (8.14.9/8.14.9) with ESMTP id vBKLNLg1018677; Wed, 20 Dec 2017 22:23:21 +0100 Received: (from michael@localhost) by rivendell.weiser.dinsnail.net (8.14.9/8.14.3/Submit) id vBKLNLlX012719; Wed, 20 Dec 2017 22:23:21 +0100 From: Michael Weiser To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 22:23:08 +0100 Message-Id: <20171220212308.12614-8-michael.weiser@gmx.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220212308.12614-1-michael.weiser@gmx.de> References: <20171220212308.12614-1-michael.weiser@gmx.de> X-dinsnail-net-MailScanner-Information: Please contact the ISP for more information X-dinsnail-net-MailScanner-ID: vBKLUCU5029372 X-dinsnail-net-MailScanner: Found to be clean X-dinsnail-net-MailScanner-From: michael@rivendell.weiser.dinsnail.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:238:43b4:3200:9392:5dcc:2f0e:a960 Subject: [Qemu-devel] [PATCH v3 7/7] linux-user: Activate armeb handler registration 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: Riku Voipio , Michael Weiser , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" armeb is missing from the target list in qemu-binfmt-conf.sh. Add it so the handler for those binaries gets registered by the script. Signed-off-by: Michael Weiser Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 597efdbe50..ea5a748745 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -2,7 +2,7 @@ # enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390/HPPA # program execution by the kernel =20 -qemu_target_list=3D"i386 i486 alpha arm sparc32plus ppc ppc64 ppc64le m68k= \ +qemu_target_list=3D"i386 i486 alpha arm armeb sparc32plus ppc ppc64 ppc64l= e m68k \ mips mipsel mipsn32 mipsn32el mips64 mips64el \ sh4 sh4eb s390x aarch64 aarch64_be hppa" =20 --=20 2.15.1