mbox series

[PULL,0/9] final misc fixes for 5.1-rc0

Message ID 20200714095247.19573-1-alex.bennee@linaro.org
Headers show
Series final misc fixes for 5.1-rc0 | expand

Message

Alex Bennée July 14, 2020, 9:52 a.m. UTC
The following changes since commit 20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46:

  Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200713-pull-request' into staging (2020-07-13 16:58:44 +0100)

are available in the Git repository at:

  https://github.com/stsquad/qemu.git tags/pull-misc-for-rc0-140720-1

for you to fetch changes up to 4e6400c97024c2660b6db8aab1f0677744449f36:

  plugins: expand the bb plugin to be thread safe and track per-cpu (2020-07-14 09:08:25 +0100)

----------------------------------------------------------------
Final fixes for 5.1-rc0

  - minor documentation nit
  - clean all deps on re(configure)
  - docker.py bootstrap fixes
  - tweak containers.yml wildcards
  - fix float16 nan detection
  - conditional use of -Wpsabi
  - fix missing iotlb data for plugins
  - proper locking for helper based bb count

----------------------------------------------------------------
Alex Bennée (6):
      docs/devel: fix grammar in multi-thread-tcg
      configure: remove all dependencies on a (re)configure
      docker.py: fix fetching of FROM layers
      tests/plugins: don't unconditionally add -Wpsabi
      cputlb: ensure we save the IOTLB data in case of reset
      plugins: expand the bb plugin to be thread safe and track per-cpu

LIU Zhiwei (1):
      fpu/softfloat: fix up float16 nan recognition

Thomas Huth (2):
      tests/docker: Remove the libssh workaround from the ubuntu 20.04 image
      gitlab-ci/containers: Add missing wildcard where we should look for changes

 docs/devel/multi-thread-tcg.rst            |  2 +-
 configure                                  | 18 +++---
 include/hw/core/cpu.h                      | 16 +++++
 include/qemu/typedefs.h                    |  1 +
 accel/tcg/cputlb.c                         | 38 +++++++++++-
 fpu/softfloat-specialize.inc.c             |  4 +-
 tests/plugin/bb.c                          | 97 ++++++++++++++++++++++++++----
 .gitlab-ci.d/containers.yml                |  1 +
 tests/docker/docker.py                     | 16 +++--
 tests/docker/dockerfiles/ubuntu2004.docker |  3 -
 tests/plugin/Makefile                      | 22 +++++--
 11 files changed, 178 insertions(+), 40 deletions(-)

-- 
2.20.1

Comments

Peter Maydell July 15, 2020, 8:06 a.m. UTC | #1
On Tue, 14 Jul 2020 at 10:52, Alex Bennée <alex.bennee@linaro.org> wrote:
>

> The following changes since commit 20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46:

>

>   Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200713-pull-request' into staging (2020-07-13 16:58:44 +0100)

>

> are available in the Git repository at:

>

>   https://github.com/stsquad/qemu.git tags/pull-misc-for-rc0-140720-1

>

> for you to fetch changes up to 4e6400c97024c2660b6db8aab1f0677744449f36:

>

>   plugins: expand the bb plugin to be thread safe and track per-cpu (2020-07-14 09:08:25 +0100)

>

> ----------------------------------------------------------------

> Final fixes for 5.1-rc0

>

>   - minor documentation nit

>   - clean all deps on re(configure)

>   - docker.py bootstrap fixes

>   - tweak containers.yml wildcards

>   - fix float16 nan detection

>   - conditional use of -Wpsabi

>   - fix missing iotlb data for plugins

>   - proper locking for helper based bb count


Fails "make check" on aarch32 and aarch64 hosts, because
eg qemu-system-arm segfaults on startup:

$ gdb --args ./arm-softmmu/qemu-system-arm -M virt -display none
[...]
(gdb) r
Starting program: /home/pm/qemu/build/all/arm-softmmu/qemu-system-arm
-M virt -display none
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0xffffe873e550 (LWP 1666261)]
[New Thread 0xffffe7f3d550 (LWP 1666262)]
[New Thread 0xffffe72e7550 (LWP 1666263)]

Thread 4 "qemu-system-arm" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xffffe72e7550 (LWP 1666263)]
0x0000aaaaab1da004 in object_class_dynamic_cast_assert (class=0xaaaaabc209e0,
    typename=typename@entry=0xaaaaab33bfe8 "cpu",
file=file@entry=0xaaaaab3201a0 "/home/pm/qemu/accel/tcg/cputlb.c",
    line=line@entry=1025, func=func@entry=0xaaaaab3202f0
<__func__.35278> "tlb_fill") at /home/pm/qemu/qom/object.c:917
917         trace_object_class_dynamic_cast_assert(class ?
class->type->name : "(null)",
(gdb) bt
#0  0x0000aaaaab1da004 in object_class_dynamic_cast_assert
    (class=0xaaaaabc209e0, typename=typename@entry=0xaaaaab33bfe8
"cpu", file=file@entry=0xaaaaab3201a0
"/home/pm/qemu/accel/tcg/cputlb.c", line=line@entry=1025,
func=func@entry=0xaaaaab3202f0 <__func__.35278> "tlb_fill")
    at /home/pm/qemu/qom/object.c:917
#1  0x0000aaaaaaded754 in tlb_fill
    (cpu=0xaaaaabd301c0, addr=0, size=0, access_type=MMU_INST_FETCH,
mmu_idx=2, retaddr=0)
    at /home/pm/qemu/accel/tcg/cputlb.c:1025
#2  0x0000aaaaaadf0e08 in get_page_addr_code_hostp
(env=0xaaaaabd39870, addr=addr@entry=0, hostp=hostp@entry=0x0)
    at /home/pm/qemu/include/exec/cpu-all.h:451
#3  0x0000aaaaaadf0e70 in get_page_addr_code (env=<optimized out>,
addr=addr@entry=0)
    at /home/pm/qemu/accel/tcg/cputlb.c:1243
#4  0x0000aaaaaae08c30 in tb_htable_lookup
    (cpu=cpu@entry=0xaaaaabd301b0, pc=0, cs_base=<optimized out>,
flags=38928384, cf_mask=4278714368)
    at /home/pm/qemu/accel/tcg/cpu-exec.c:337
#5  0x0000aaaaaae09b14 in tb_lookup__cpu_state
    (cf_mask=<optimized out>, flags=0xffffe72e6b48,
cs_base=0xffffe72e6b40, pc=0xffffe72e6b44, cpu=0xaaaaabd301b0)
    at /home/pm/qemu/include/exec/tb-lookup.h:43
#6  tb_find (cf_mask=<optimized out>, tb_exit=0, last_tb=0x0,
cpu=0xaaaaabd301b0)
    at /home/pm/qemu/accel/tcg/cpu-exec.c:404
#7  cpu_exec (cpu=cpu@entry=0xaaaaabd301b0) at
/home/pm/qemu/accel/tcg/cpu-exec.c:731
#8  0x0000aaaaaaec45c4 in tcg_cpu_exec (cpu=0xaaaaabd301b0) at
/home/pm/qemu/softmmu/cpus.c:1356
#9  0x0000aaaaaaec69ec in qemu_tcg_cpu_thread_fn
(arg=arg@entry=0xaaaaabd301b0) at /home/pm/qemu/softmmu/cpus.c:1664
#10 0x0000aaaaab2e1758 in qemu_thread_start (args=<optimized out>) at
/home/pm/qemu/util/qemu-thread-posix.c:521
#11 0x0000fffff57be4fc in start_thread (arg=0xffffffffe10f) at
pthread_create.c:477
#12 0x0000fffff5716f2c in thread_start () at
../sysdeps/unix/sysv/linux/aarch64/clone.S:78

thanks
-- PMM
Alex Bennée July 15, 2020, 10:51 a.m. UTC | #2
Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 14 Jul 2020 at 10:52, Alex Bennée <alex.bennee@linaro.org> wrote:

>>

>> The following changes since commit 20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46:

>>

>>   Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200713-pull-request' into staging (2020-07-13 16:58:44 +0100)

>>

>> are available in the Git repository at:

>>

>>   https://github.com/stsquad/qemu.git tags/pull-misc-for-rc0-140720-1

>>

>> for you to fetch changes up to 4e6400c97024c2660b6db8aab1f0677744449f36:

>>

>>   plugins: expand the bb plugin to be thread safe and track per-cpu (2020-07-14 09:08:25 +0100)

>>

>> ----------------------------------------------------------------

>> Final fixes for 5.1-rc0

>>

>>   - minor documentation nit

>>   - clean all deps on re(configure)

>>   - docker.py bootstrap fixes

>>   - tweak containers.yml wildcards

>>   - fix float16 nan detection

>>   - conditional use of -Wpsabi

>>   - fix missing iotlb data for plugins

>>   - proper locking for helper based bb count

>

> Fails "make check" on aarch32 and aarch64 hosts, because

> eg qemu-system-arm segfaults on startup:

>

> $ gdb --args ./arm-softmmu/qemu-system-arm -M virt -display none

> [...]

> (gdb) r

> Starting program: /home/pm/qemu/build/all/arm-softmmu/qemu-system-arm

> -M virt -display none

> [Thread debugging using libthread_db enabled]

> Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

> [New Thread 0xffffe873e550 (LWP 1666261)]

> [New Thread 0xffffe7f3d550 (LWP 1666262)]

> [New Thread 0xffffe72e7550 (LWP 1666263)]

>

> Thread 4 "qemu-system-arm" received signal SIGSEGV, Segmentation fault.

> [Switching to Thread 0xffffe72e7550 (LWP 1666263)]

> 0x0000aaaaab1da004 in object_class_dynamic_cast_assert (class=0xaaaaabc209e0,

>     typename=typename@entry=0xaaaaab33bfe8 "cpu",

> file=file@entry=0xaaaaab3201a0 "/home/pm/qemu/accel/tcg/cputlb.c",

>     line=line@entry=1025, func=func@entry=0xaaaaab3202f0

> <__func__.35278> "tlb_fill") at /home/pm/qemu/qom/object.c:917

> 917         trace_object_class_dynamic_cast_assert(class ?

> class->type->name : "(null)",

> (gdb) bt

> #0  0x0000aaaaab1da004 in object_class_dynamic_cast_assert

>     (class=0xaaaaabc209e0, typename=typename@entry=0xaaaaab33bfe8

> "cpu", file=file@entry=0xaaaaab3201a0

> "/home/pm/qemu/accel/tcg/cputlb.c", line=line@entry=1025,

> func=func@entry=0xaaaaab3202f0 <__func__.35278> "tlb_fill")

>     at /home/pm/qemu/qom/object.c:917

> #1  0x0000aaaaaaded754 in tlb_fill

>     (cpu=0xaaaaabd301c0, addr=0, size=0, access_type=MMU_INST_FETCH,

> mmu_idx=2, retaddr=0)

>     at /home/pm/qemu/accel/tcg/cputlb.c:1025

> #2  0x0000aaaaaadf0e08 in get_page_addr_code_hostp

> (env=0xaaaaabd39870, addr=addr@entry=0, hostp=hostp@entry=0x0)

>     at /home/pm/qemu/include/exec/cpu-all.h:451

> #3  0x0000aaaaaadf0e70 in get_page_addr_code (env=<optimized out>,

> addr=addr@entry=0)

>     at /home/pm/qemu/accel/tcg/cputlb.c:1243

> #4  0x0000aaaaaae08c30 in tb_htable_lookup

>     (cpu=cpu@entry=0xaaaaabd301b0, pc=0, cs_base=<optimized out>,

> flags=38928384, cf_mask=4278714368)

>     at /home/pm/qemu/accel/tcg/cpu-exec.c:337

> #5  0x0000aaaaaae09b14 in tb_lookup__cpu_state

>     (cf_mask=<optimized out>, flags=0xffffe72e6b48,

> cs_base=0xffffe72e6b40, pc=0xffffe72e6b44, cpu=0xaaaaabd301b0)

>     at /home/pm/qemu/include/exec/tb-lookup.h:43

> #6  tb_find (cf_mask=<optimized out>, tb_exit=0, last_tb=0x0,

> cpu=0xaaaaabd301b0)

>     at /home/pm/qemu/accel/tcg/cpu-exec.c:404

> #7  cpu_exec (cpu=cpu@entry=0xaaaaabd301b0) at

> /home/pm/qemu/accel/tcg/cpu-exec.c:731

> #8  0x0000aaaaaaec45c4 in tcg_cpu_exec (cpu=0xaaaaabd301b0) at

> /home/pm/qemu/softmmu/cpus.c:1356

> #9  0x0000aaaaaaec69ec in qemu_tcg_cpu_thread_fn

> (arg=arg@entry=0xaaaaabd301b0) at /home/pm/qemu/softmmu/cpus.c:1664

> #10 0x0000aaaaab2e1758 in qemu_thread_start (args=<optimized out>) at

> /home/pm/qemu/util/qemu-thread-posix.c:521

> #11 0x0000fffff57be4fc in start_thread (arg=0xffffffffe10f) at

> pthread_create.c:477

> #12 0x0000fffff5716f2c in thread_start () at

> ../sysdeps/unix/sysv/linux/aarch64/clone.S:78


This goes away after a make clean and rebuild. I suspect the commit:

  configure: remove all dependencies on a (re)configure

just causes the build to miss more of the bits on a rebuild. I'll drop
it for now and just live with the random syscall_nr.h files.

-- 
Alex Bennée
Philippe Mathieu-Daudé July 15, 2020, 12:29 p.m. UTC | #3
Hi Peter,

On 7/15/20 10:06 AM, Peter Maydell wrote:
> On Tue, 14 Jul 2020 at 10:52, Alex Bennée <alex.bennee@linaro.org> wrote:

>>

>> The following changes since commit 20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46:

>>

>>   Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200713-pull-request' into staging (2020-07-13 16:58:44 +0100)

>>

>> are available in the Git repository at:

>>

>>   https://github.com/stsquad/qemu.git tags/pull-misc-for-rc0-140720-1

>>

>> for you to fetch changes up to 4e6400c97024c2660b6db8aab1f0677744449f36:

>>

>>   plugins: expand the bb plugin to be thread safe and track per-cpu (2020-07-14 09:08:25 +0100)

>>

>> ----------------------------------------------------------------

>> Final fixes for 5.1-rc0

>>

>>   - minor documentation nit

>>   - clean all deps on re(configure)

>>   - docker.py bootstrap fixes

>>   - tweak containers.yml wildcards

>>   - fix float16 nan detection

>>   - conditional use of -Wpsabi

>>   - fix missing iotlb data for plugins

>>   - proper locking for helper based bb count

> 

> Fails "make check" on aarch32 and aarch64 hosts, because

> eg qemu-system-arm segfaults on startup:


What host/distrib are you using?

I can not reproduce on aarch64 (Ubuntu 20.04 LTS) using:
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

Any config in particular?

> 

> $ gdb --args ./arm-softmmu/qemu-system-arm -M virt -display none

> [...]

> (gdb) r

> Starting program: /home/pm/qemu/build/all/arm-softmmu/qemu-system-arm

> -M virt -display none

> [Thread debugging using libthread_db enabled]

> Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

> [New Thread 0xffffe873e550 (LWP 1666261)]

> [New Thread 0xffffe7f3d550 (LWP 1666262)]

> [New Thread 0xffffe72e7550 (LWP 1666263)]

> 

> Thread 4 "qemu-system-arm" received signal SIGSEGV, Segmentation fault.

> [Switching to Thread 0xffffe72e7550 (LWP 1666263)]

> 0x0000aaaaab1da004 in object_class_dynamic_cast_assert (class=0xaaaaabc209e0,

>     typename=typename@entry=0xaaaaab33bfe8 "cpu",

> file=file@entry=0xaaaaab3201a0 "/home/pm/qemu/accel/tcg/cputlb.c",

>     line=line@entry=1025, func=func@entry=0xaaaaab3202f0

> <__func__.35278> "tlb_fill") at /home/pm/qemu/qom/object.c:917

> 917         trace_object_class_dynamic_cast_assert(class ?

> class->type->name : "(null)",
Peter Maydell July 15, 2020, 12:51 p.m. UTC | #4
On Wed, 15 Jul 2020 at 13:29, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> What host/distrib are you using?

>

> I can not reproduce on aarch64 (Ubuntu 20.04 LTS) using:

> gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0


Ubuntu 20.04 LTS (this is the aarch64.ci.qemu.org packet.net box
you have access to). Also Ubuntu 18.04.4 LTS aarch32 chroot on
an aarch64 system.

> Any config in particular?


Nope, stock "configure" with no arguments. Incremental build, not
from-clean.

thanks
-- PMM
Philippe Mathieu-Daudé July 15, 2020, 12:54 p.m. UTC | #5
On 7/15/20 2:51 PM, Peter Maydell wrote:
> On Wed, 15 Jul 2020 at 13:29, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

>> What host/distrib are you using?

>>

>> I can not reproduce on aarch64 (Ubuntu 20.04 LTS) using:

>> gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

> 

> Ubuntu 20.04 LTS (this is the aarch64.ci.qemu.org packet.net box

> you have access to).


Yes this is where I tested.

> Also Ubuntu 18.04.4 LTS aarch32 chroot on

> an aarch64 system.

> 

>> Any config in particular?

> 

> Nope, stock "configure" with no arguments. Incremental build, not

> from-clean.


OK, I tested from-clean (in case that helps Alex).

Thanks,

Phil.