From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNmxT-0007a8-0w for qemu-devel@nongnu.org; Thu, 04 Apr 2013 12:24:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNmxL-0005G2-DG for qemu-devel@nongnu.org; Thu, 04 Apr 2013 12:24:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNmxL-0005Fm-2v for qemu-devel@nongnu.org; Thu, 04 Apr 2013 12:24:07 -0400 Message-ID: <515DA38F.3080302@redhat.com> Date: Thu, 04 Apr 2013 18:00:15 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1364985128-23772-1-git-send-email-pbonzini@redhat.com> <1364985128-23772-3-git-send-email-pbonzini@redhat.com> <515D9F40.4070802@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 02/10] elfload: fix size of registers for N32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: pmaydell@linaro.org, qemu-devel@nongnu.org, aurelien@aurel32.net Il 04/04/2013 17:46, Peter Maydell ha scritto: > On 4 April 2013 16:41, Paolo Bonzini wrote: >> Il 04/04/2013 17:32, Peter Maydell ha scritto: >>> This is kind of ugly but it looks like the kernel is kind >>> of ugly too (ie elf_greg_t as a type is not defined the >>> same way necessarily for all targets and ABIs). At some >>> point this type should probably live in a header file >>> in linux-user/$arch/ but for now I guess it can pass. >>> >>> Reviewed-by: Peter Maydell >> >> I'll add abi_reg to abitypes.h and move tswapreg there, so >> that the signal handling structures could use it too. > > I started off thinking that was the right thing, but then > I realised that the signal handling structures vary in what > they use (eg the MIPS ones tend to really use u32 and u64), > so they aren't necessarily the same type as elf_greg_t). Right, MIPS o32 uses uint64_t. So I'll keep target_elf_greg_t as in v2. > I think the conceptual ideal is that we should have > abi types which match the kernel's user-facing types. > This is a bit messed up here because the kernel doesn't > actually expose elf_greg_t in most archs (and because > MIPS has different types for "what the kernel thinks > long is" vs "what userspace thinks long is", which is > just plain confusing when looking at non-user-facing > struct definitions). Paolo