From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7i1J-0002gY-Q2 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 06:35:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7i1E-0007VH-OA for qemu-devel@nongnu.org; Wed, 24 Jun 2015 06:35:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7i1E-0007VD-Ir for qemu-devel@nongnu.org; Wed, 24 Jun 2015 06:35:00 -0400 Message-ID: <558A87D0.4090601@redhat.com> Date: Wed, 24 Jun 2015 12:34:56 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403355502-12288-1-git-send-email-pbonzini@redhat.com> <1403355502-12288-5-git-send-email-pbonzini@redhat.com> <53AC2B9B.40801@redhat.com> <558A81DC.5090402@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , QEMU Developers On 24/06/2015 12:21, Peter Maydell wrote: > > I think signal_cpsr_e is exactly what you want for AArch32. It sets > > CPSR.E in main and setup_return for AArch32. > > > > For AArch64 you don't need anything because, even though the kernel does > > trap setend and tweak SCTLR.E0E in response to it, setup_return doesn't > > try to restore the native endianness. > > I didn't think SETEND existed at all in AArch64? No, but the kernel traps it and flips SCTLR.E0E. We don't have to emulate that, and anyway you're right that userspace code will always be the same endianness as the signal handler: the kernel expects it that way. Paolo > It's a 32-bit only > instruction. So the AArch64 setup is anyway much simpler because > you don't have to worry about the userspace code being a different > endianness to what you want to run the signal handler as.