[Bug 1489560] Re: qemu-efi: hangs in kvm mode when built w/ gcc-5

Thomas Preud'homme thomas.preudhomme at arm.com
Tue Sep 22 03:27:15 UTC 2015


I built edk2 with and without the arm64-no-expensive-optimizations
patch, dumping the trees in both case (with -fdump-tree-bswap with the
patch and -fdump-tree-sincos without). Fortunately, the diff is quite
small and I could review it all. Transformations all look sound and
indeed there is a few transformations that wasn't done before the patch
mentionned in the initial bug report.

One thing that it does and could pose problem is transforming a serie of
byte load into a single unaligned 32bit load. This is allowed for this
target by default so nothing wrong here but maybe in this case unaligned
load should not be done. If that is the case, -mstrict-align should be
used when compiling all files. Dann, could you try compiling with this
flag instead of -mno-expensive-optimizations and see if you still hit
the bug? Unfortunately I don't have access to an aarch64 machine with
KVM available.

Best regards.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-5 in Ubuntu.
https://bugs.launchpad.net/bugs/1489560

Title:
  qemu-efi: hangs in kvm mode when built w/ gcc-5

Status in edk2 package in Ubuntu:
  Fix Committed
Status in gcc-5 package in Ubuntu:
  New

Bug description:
  When I rebuild edk2_0~20150106.5c2d456b-1build1 in wily or sid, KVM-
  accelerated arm64 VMs hang before displaying any console output. I
  bisected this down to a change in gcc (see below).

  Note that this does not impact fully emulated instances. That is, if I
  drop '-enable-kvm' and change '-cpu host' to '-cpu cortex-a57', it
  boots fine.

  Here's the gcc changeset that introduced the issue:

  From 470d5bb5a2aba04db8d9d9dce0c5a3d5efe85882 Mon Sep 17 00:00:00 2001
  From: thopre01 <thopre01 at 138bc75d-0d04-0410-961f-82ee72b054a4>
  Date: Fri, 23 May 2014 03:33:28 +0000
  Subject: [PATCH] 2014-05-23  Thomas Preud'homme  <thomas.preudhomme at arm.com>

          PR tree-optimization/54733
  gcc/
          * tree-ssa-math-opts.c (nop_stats): New "bswap_stats" structure.
          (CMPNOP): Define.
          (find_bswap_or_nop_load): New.
          (find_bswap_1): Renamed to ...
          (find_bswap_or_nop_1): This. Also add support for memory source.
          (find_bswap): Renamed to ...
          (find_bswap_or_nop): This. Also add support for memory source and
          detection of bitwise operations equivalent to load in host endianness.
          (execute_optimize_bswap): Likewise. Also move its leading comment back
          in place and split statement transformation into ...
          (bswap_replace): This.

  gcc/testsuite
          * gcc.dg/optimize-bswapdi-3.c: New test to check extension of bswap
          optimization to support memory sources and bitwise operations
          equivalent to load in host endianness.
          * gcc.dg/optimize-bswaphi-1.c: Likewise.
          * gcc.dg/optimize-bswapsi-2.c: Likewise.
          * gcc.c-torture/execute/bswap-2.c: Likewise.

  
  git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210843 138bc75d-0d04-0410-961f-82ee72b054a4

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/1489560/+subscriptions



More information about the foundations-bugs mailing list