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