From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRiHC-0003pv-Cf for qemu-devel@nongnu.org; Sun, 23 Mar 2014 09:17:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRiH6-0004o3-5S for qemu-devel@nongnu.org; Sun, 23 Mar 2014 09:17:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRiH5-0004nS-TR for qemu-devel@nongnu.org; Sun, 23 Mar 2014 09:17:16 -0400 Message-ID: <1395580652.5673.37.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Sun, 23 Mar 2014 15:17:32 +0200 In-Reply-To: <532ED8EB.4000306@redhat.com> References: <1395350099-14664-1-git-send-email-marcel.a@redhat.com> <532B645B.5020507@redhat.com> <1395353214.21800.6.camel@localhost.localdomain> <532B6B27.2080105@redhat.com> <1395354837.21800.12.camel@localhost.localdomain> <532B76E5.7090608@redhat.com> <20140323094943.GA6989@redhat.com> <1395577967.5673.17.camel@localhost.localdomain> <532ED8EB.4000306@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.0 V3] tests/acpi-test: do not run iasl on big endian machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , "Michael S. Tsirkin" , Alexey Kardashevskiy , Michael Tokarev , QEMU Developers , Stefan Hajnoczi , Laszlo Ersek , Andreas =?ISO-8859-1?Q?F=E4rber?= , Richard Henderson On Sun, 2014-03-23 at 13:51 +0100, Paolo Bonzini wrote: > Il 23/03/2014 13:32, Marcel Apfelbaum ha scritto: > >> > That's the endianness of the machine we're compiling QEMU > >> > for, not the endianness of the machine we're compiling QEMU > >> > on. If for instance you're on x86_64 cross-compiling for PPC > >> > then HOST_WORDS_BIGENDIAN is true, but the iasl you use > >> > in the build process will be running on a little endian machine. > > Hi Peter, are you sure about this? > > I saw the 'target_bigendian' that does what you described above. > > $bigendian is the result of a little C program that checks *host's* endian-ness. > > Of course I might have missed something. > > Peter is right. There are three systems: build (what you run on), host > (what you compile for), target (always x86-64 for now for acpi-test). > $bigendian and G_BYTE_ORDER check the host system. If you wanted to > test the build system's endianness, Laszlo's suggestion would be fine. > > However, Michael is also right if we assume that iasl on bigendian can > assemble, and that the problems are only on disassembling. This is > because in this particular case you'll be running an executable compiled > for the host and you know that host == build. > > I think the assumption is sane. As far as I remember, upstream iasl > doesn't compile at all on big-endian machines. You need specific > patches such as those shared by Fedora and Debian's. Unfortunately, the > patches are incomplete, they only fix assembling because that's what was > needed so far to cross-compile SeaBIOS. Hi Paolo, thanks for the help! I need a decision here :) 1. If iasl *does* work for the scenarios used by Qemu until now, I can conclude that the only part that suffers from it is the test itself, because it dis-assembles AML code. In this case I can handle it in the test itself by checking the endian-ness (V2 already posted), or trying to dis-assemble the expected AML file and not failing the test if this fails. 2. If iasl causes problems to run a x86_64 guest if one or both build/host machines are BE, we need to tweak the configuration file. After this discussion it seems that (2.) is not the case, I think maybe re-sending: [PATCH for-2.0 V2] tests/acpi-test: do not run iasl on big endian machines Is everyone OK with this? Thanks, Marcel > Paolo