Received: from eggs.gnu.org ([209.51.188.92]:50389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1a8h-00067H-Hm for qemu-devel@nongnu.org; Wed, 06 Mar 2019 12:15:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1a8f-0004vC-D3 for qemu-devel@nongnu.org; Wed, 06 Mar 2019 12:15:31 -0500 References: <201902270125.36158.randrianasulu@gmail.com> <201902281139.14787.randrianasulu@gmail.com> <95377a0f-a947-57d7-98af-82f105a23073@vivier.eu> From: Laurent Vivier Message-ID: Date: Wed, 6 Mar 2019 18:15:14 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [Qemu-ppc] regression: target/ppc: convert VSX logical operations to vector operations broke X for ppc64le guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland , Andrew Randrianasulu Cc: Richard Henderson , "qemu-ppc@nongnu.org" , qemu-devel@nongnu.org, David Gibson On 06/03/2019 17:47, Mark Cave-Ayland wrote: > On 06/03/2019 16:42, Laurent Vivier wrote: > >> On 28/02/2019 17:59, Mark Cave-Ayland wrote: >>> On 28/02/2019 08:39, Andrew Randrianasulu wrote: >>> >>>>>> configure line: >>>>>> setarch i686 ./configure --target-list=ppc64-softmmu >>>>>> >>>>>> launch line: >>>>>> ppc64-softmmu/qemu-system-ppc64 -display >>>>>> sdl,gl=on -hda /mnt/sdb1/PPC-img/alpine_disk.img >>>>>> >>>>>> where alpine_disk.img is HDD installed Alpine 3.7 for ppc64le with xfce4 >>>>>> desktop. >>>>> >>>>> AFAICT the vector instructions converted here are independent of endian, so >>>>> I can't see why this patch on its own would have any effect. >>>>> >>>>> Maybe it could be because the "setarch i686" part forces use of some >>>>> lesser-used 32-bit paths in the vector code - is this required? And do you >>>>> see the same issue on a x86_64 build? >>>> >>>> I use 32-bit Slackware userland with x86_64 kerenl - so setarch prevent most of >>>> configures from detecting my arch wrongly. >>>> >>>> Yes, bug was and is present with qemu compiled for x86_64 (inside chroot). >>>> I initially discovered it there, and after dropping -O3 and even march=native, >>>> and even disabling avx2 via configure switch - moved to bisect. >>>> >>>> https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg06414.html >>> >>> Can you upload your alpine_disk.img somewhere and then email me the link off-list? >>> I'll see if I can take a look when I get a spare moment. >> >> I've also bisected to this commit for a problem with qemu-pp64le. >> >> commit 7b8fe477e12b164dda97f79e27b55b805d90384f >> Author: Richard Henderson >> Date: Fri Feb 15 10:00:46 2019 +0000 >> >> target/ppc: convert VSX logical operations to vector operations >> >> Signed-off-by: Richard Henderson >> Acked-by: David Gibson >> Message-Id: <20190215100058.20015-6-mark.cave-ayland@ilande.co.uk> >> Signed-off-by: David Gibson >> >> >> debian stretch ppc64el fails to build the well known hello.c example: >> # $ cat /tmp/hello.c >> #include >> int main(void) >> { >> printf("Hello World!\n"); >> return 0; >> } >> # cc -o /tmp/hello /tmp/hello.c >> In file included from :0:0: >> /usr/include/stdc-predef.h:26:2: error: unknown type name '_STDC_' >> explicitly includes a system header. GCC knows the name of this >> ^ ~~~~ >> /usr/include/stdc-predef.h:28:1: error: expected '=', ',', ';', 'asm' or >> '__attribute__' before '_STDC_PREDEF_H' >> >> ^ >> /usr/include/stdc-predef.h:42:2: error: missing terminating ' character >> #endif >> ^~~~~ >> ... > > Hi Laurent, > > This should be fixed by the patchset at > https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg00473.html - can you test > and confirm that it also works for you? > > I'm currently in the process of working on a v2 to address Richard's comments, > hopefully I will be able to send it through later this evening or tomorrow. Thank you Mark. yes, this series fixes the problem for me too. Thanks, Laurent