mbox

[PULL,00/34] tcg patch queue

Message ID 20210611234144.653682-1-richard.henderson@linaro.org (mailing list archive)
State New, archived
Headers show

Pull-request

https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210611

Message

Richard Henderson June 11, 2021, 11:41 p.m. UTC
This is mostly my code_gen_buffer cleanup, plus a few other random
changes thrown in.  Including a fix for a recent float32_exp2 bug.


r~


The following changes since commit 894fc4fd670aaf04a67dc7507739f914ff4bacf2:

  Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-06-11 09:21:48 +0100)

are available in the Git repository at:

  https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210611

for you to fetch changes up to 60afaddc208d34f6dc86dd974f6e02724fba6eb6:

  docs/devel: Explain in more detail the TB chaining mechanisms (2021-06-11 09:41:25 -0700)

----------------------------------------------------------------
Clean up code_gen_buffer allocation.
Add tcg_remove_ops_after.
Fix tcg_constant_* documentation.
Improve TB chaining documentation.
Fix float32_exp2.

----------------------------------------------------------------
Jose R. Ziviani (1):
      tcg/arm: Fix tcg_out_op function signature

Luis Pires (1):
      docs/devel: Explain in more detail the TB chaining mechanisms

Richard Henderson (32):
      meson: Split out tcg/meson.build
      meson: Split out fpu/meson.build
      tcg: Re-order tcg_region_init vs tcg_prologue_init
      tcg: Remove error return from tcg_region_initial_alloc__locked
      tcg: Split out tcg_region_initial_alloc
      tcg: Split out tcg_region_prologue_set
      tcg: Split out region.c
      accel/tcg: Inline cpu_gen_init
      accel/tcg: Move alloc_code_gen_buffer to tcg/region.c
      accel/tcg: Rename tcg_init to tcg_init_machine
      tcg: Create tcg_init
      accel/tcg: Merge tcg_exec_init into tcg_init_machine
      accel/tcg: Use MiB in tcg_init_machine
      accel/tcg: Pass down max_cpus to tcg_init
      tcg: Introduce tcg_max_ctxs
      tcg: Move MAX_CODE_GEN_BUFFER_SIZE to tcg-target.h
      tcg: Replace region.end with region.total_size
      tcg: Rename region.start to region.after_prologue
      tcg: Tidy tcg_n_regions
      tcg: Tidy split_cross_256mb
      tcg: Move in_code_gen_buffer and tests to region.c
      tcg: Allocate code_gen_buffer into struct tcg_region_state
      tcg: Return the map protection from alloc_code_gen_buffer
      tcg: Sink qemu_madvise call to common code
      util/osdep: Add qemu_mprotect_rw
      tcg: Round the tb_size default from qemu_get_host_physmem
      tcg: Merge buffer protection and guard page protection
      tcg: When allocating for !splitwx, begin with PROT_NONE
      tcg: Move tcg_init_ctx and tcg_ctx from accel/tcg/
      tcg: Introduce tcg_remove_ops_after
      tcg: Fix documentation for tcg_constant_* vs tcg_temp_free_*
      softfloat: Fix tp init in float32_exp2

 docs/devel/tcg.rst        | 101 ++++-
 meson.build               |  12 +-
 accel/tcg/internal.h      |   2 +
 include/qemu/osdep.h      |   1 +
 include/sysemu/tcg.h      |   2 -
 include/tcg/tcg.h         |  28 +-
 tcg/aarch64/tcg-target.h  |   1 +
 tcg/arm/tcg-target.h      |   1 +
 tcg/i386/tcg-target.h     |   2 +
 tcg/mips/tcg-target.h     |   6 +
 tcg/ppc/tcg-target.h      |   2 +
 tcg/riscv/tcg-target.h    |   1 +
 tcg/s390/tcg-target.h     |   3 +
 tcg/sparc/tcg-target.h    |   1 +
 tcg/tcg-internal.h        |  40 ++
 tcg/tci/tcg-target.h      |   1 +
 accel/tcg/tcg-all.c       |  32 +-
 accel/tcg/translate-all.c | 439 +-------------------
 bsd-user/main.c           |   3 +-
 fpu/softfloat.c           |   2 +-
 linux-user/main.c         |   1 -
 tcg/region.c              | 999 ++++++++++++++++++++++++++++++++++++++++++++++
 tcg/tcg.c                 | 649 +++---------------------------
 util/osdep.c              |   9 +
 tcg/arm/tcg-target.c.inc  |   3 +-
 fpu/meson.build           |   1 +
 tcg/meson.build           |  14 +
 27 files changed, 1266 insertions(+), 1090 deletions(-)
 create mode 100644 tcg/tcg-internal.h
 create mode 100644 tcg/region.c
 create mode 100644 fpu/meson.build
 create mode 100644 tcg/meson.build

Comments

Peter Maydell June 13, 2021, 3:13 p.m. UTC | #1
On Sat, 12 Jun 2021 at 00:47, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> This is mostly my code_gen_buffer cleanup, plus a few other random
> changes thrown in.  Including a fix for a recent float32_exp2 bug.
>
>
> r~
>
>
> The following changes since commit 894fc4fd670aaf04a67dc7507739f914ff4bacf2:
>
>   Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-06-11 09:21:48 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210611
>
> for you to fetch changes up to 60afaddc208d34f6dc86dd974f6e02724fba6eb6:
>
>   docs/devel: Explain in more detail the TB chaining mechanisms (2021-06-11 09:41:25 -0700)
>
> ----------------------------------------------------------------
> Clean up code_gen_buffer allocation.
> Add tcg_remove_ops_after.
> Fix tcg_constant_* documentation.
> Improve TB chaining documentation.
> Fix float32_exp2.

Compile failure on OSX:

../../tcg/region.c:706:12: error: incompatible pointer to integer
conversion assigning to 'mach_vm_address_t' (aka 'unsigned long long')
from 'void *' [-Werror,-Wint-conversion]
    buf_rw = region.start_aligned;
           ^ ~~~~~~~~~~~~~~~~~~~~
1 error generated.

thanks
-- PMM
Peter Maydell June 13, 2021, 5:10 p.m. UTC | #2
On Sun, 13 Jun 2021 at 16:13, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sat, 12 Jun 2021 at 00:47, Richard Henderson
> <richard.henderson@linaro.org> wrote:
> >
> > This is mostly my code_gen_buffer cleanup, plus a few other random
> > changes thrown in.  Including a fix for a recent float32_exp2 bug.
> >
> >
> > r~
> >
> >
> > The following changes since commit 894fc4fd670aaf04a67dc7507739f914ff4bacf2:
> >
> >   Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-06-11 09:21:48 +0100)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210611
> >
> > for you to fetch changes up to 60afaddc208d34f6dc86dd974f6e02724fba6eb6:
> >
> >   docs/devel: Explain in more detail the TB chaining mechanisms (2021-06-11 09:41:25 -0700)
> >
> > ----------------------------------------------------------------
> > Clean up code_gen_buffer allocation.
> > Add tcg_remove_ops_after.
> > Fix tcg_constant_* documentation.
> > Improve TB chaining documentation.
> > Fix float32_exp2.
>
> Compile failure on OSX:
>
> ../../tcg/region.c:706:12: error: incompatible pointer to integer
> conversion assigning to 'mach_vm_address_t' (aka 'unsigned long long')
> from 'void *' [-Werror,-Wint-conversion]
>     buf_rw = region.start_aligned;
>            ^ ~~~~~~~~~~~~~~~~~~~~
> 1 error generated.

Also on x86-64 host, this failure in check-tcg:

make[2]: Leaving directory
'/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
make[2]: Entering directory
'/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
timeout --foreground 60
/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/qemu-hppa
 signals >  signals.out
timeout: the monitored command dumped core
Illegal instruction
../Makefile.target:156: recipe for target 'run-signals' failed
make[2]: *** [run-signals] Error 132
make[2]: Leaving directory
'/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
/home/petmay01/linaro/qemu-for-merges/tests/tcg/Makefile.qemu:102:
recipe for target 'run-guest-tests' failed

but I think this is a pre-existing intermittent.

-- PMM
Richard Henderson June 14, 2021, 1:37 a.m. UTC | #3
On 6/13/21 10:10 AM, Peter Maydell wrote:
> Also on x86-64 host, this failure in check-tcg:
> 
> make[2]: Leaving directory
> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
> make[2]: Entering directory
> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
> timeout --foreground 60
> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/qemu-hppa
>   signals >  signals.out
> timeout: the monitored command dumped core
> Illegal instruction
> ../Makefile.target:156: recipe for target 'run-signals' failed
> make[2]: *** [run-signals] Error 132
> make[2]: Leaving directory
> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
> /home/petmay01/linaro/qemu-for-merges/tests/tcg/Makefile.qemu:102:
> recipe for target 'run-guest-tests' failed
> 
> but I think this is a pre-existing intermittent.

Interesting.  I've never seen this one before.
Do you recall if this is only intermittent with -static?


r~
Peter Maydell June 14, 2021, 9:28 a.m. UTC | #4
On Mon, 14 Jun 2021 at 02:37, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/13/21 10:10 AM, Peter Maydell wrote:
> > Also on x86-64 host, this failure in check-tcg:
> >
> > make[2]: Leaving directory
> > '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
> > make[2]: Entering directory
> > '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
> > timeout --foreground 60
> > /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/qemu-hppa
> >   signals >  signals.out
> > timeout: the monitored command dumped core
> > Illegal instruction
> > ../Makefile.target:156: recipe for target 'run-signals' failed
> > make[2]: *** [run-signals] Error 132
> > make[2]: Leaving directory
> > '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
> > /home/petmay01/linaro/qemu-for-merges/tests/tcg/Makefile.qemu:102:
> > recipe for target 'run-guest-tests' failed
> >
> > but I think this is a pre-existing intermittent.
>
> Interesting.  I've never seen this one before.
> Do you recall if this is only intermittent with -static?

I only run check-tcg on my static build, so I don't know if that's
a requirement to see the failure. I think I may have also seen it
on the gitlab runs as an intermittent.

-- PMM
Alex Bennée June 14, 2021, 9:35 a.m. UTC | #5
Richard Henderson <richard.henderson@linaro.org> writes:

> On 6/13/21 10:10 AM, Peter Maydell wrote:
>> Also on x86-64 host, this failure in check-tcg:
>> make[2]: Leaving directory
>> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
>> make[2]: Entering directory
>> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
>> timeout --foreground 60
>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/qemu-hppa
>>   signals >  signals.out
>> timeout: the monitored command dumped core
>> Illegal instruction
>> ../Makefile.target:156: recipe for target 'run-signals' failed
>> make[2]: *** [run-signals] Error 132
>> make[2]: Leaving directory
>> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
>> /home/petmay01/linaro/qemu-for-merges/tests/tcg/Makefile.qemu:102:
>> recipe for target 'run-guest-tests' failed
>> but I think this is a pre-existing intermittent.
>
> Interesting.  I've never seen this one before.
> Do you recall if this is only intermittent with -static?

It's about a 1% failure rate for static builds only - I have yet to
catch and keep a core dump.
Philippe Mathieu-Daudé June 14, 2021, 3 p.m. UTC | #6
On 6/14/21 11:35 AM, Alex Bennée wrote:
> Richard Henderson <richard.henderson@linaro.org> writes:
>> On 6/13/21 10:10 AM, Peter Maydell wrote:
>>> Also on x86-64 host, this failure in check-tcg:
>>> make[2]: Leaving directory
>>> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
>>> make[2]: Entering directory
>>> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
>>> timeout --foreground 60
>>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/qemu-hppa
>>>   signals >  signals.out
>>> timeout: the monitored command dumped core
>>> Illegal instruction
>>> ../Makefile.target:156: recipe for target 'run-signals' failed
>>> make[2]: *** [run-signals] Error 132
>>> make[2]: Leaving directory
>>> '/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/hppa-linux-user'
>>> /home/petmay01/linaro/qemu-for-merges/tests/tcg/Makefile.qemu:102:
>>> recipe for target 'run-guest-tests' failed
>>> but I think this is a pre-existing intermittent.
>>
>> Interesting.  I've never seen this one before.
>> Do you recall if this is only intermittent with -static?
> 
> It's about a 1% failure rate for static builds only - I have yet to
> catch and keep a core dump.

The s390x Tracis-CI runners crash from time to time:
https://travis-ci.org/github/qemu/qemu/jobs/774523480

Maybe you could try to run the signals test in loop there
until getting a coredump?