[PULL v3 00/44] tcg patch queue

Richard Henderson posted 44 patches 2 years, 7 months ago
Only 1 patches received!
There is a newer version of this series
bsd-user/qemu.h                           |   2 +-
include/exec/translate-all.h              |   1 +
include/exec/translator.h                 |  44 +--
include/hw/core/tcg-cpu-ops.h             |  26 +-
include/tcg/tcg-op.h                      |   2 -
linux-user/qemu.h                         |   2 +-
target/alpha/cpu.h                        |   2 +-
target/arm/arm_ldst.h                     |  12 +-
target/arm/cpu.h                          |   3 +-
target/cris/cpu.h                         |   2 +-
target/hppa/cpu.h                         |   4 +-
target/i386/cpu.h                         |   3 +
target/i386/tcg/helper-tcg.h              |   2 +
target/m68k/cpu.h                         |   2 +
target/microblaze/cpu.h                   |   2 +
target/mips/tcg/tcg-internal.h            |   5 +-
target/openrisc/cpu.h                     |   5 +-
target/ppc/cpu.h                          |   4 +-
target/riscv/cpu.h                        |   2 +-
target/rx/cpu.h                           |   2 +
target/sh4/cpu.h                          |   4 +-
target/xtensa/cpu.h                       |   2 +
tcg/arm/tcg-target.h                      |  27 +-
accel/tcg/cpu-exec.c                      |  14 +-
accel/tcg/tcg-accel-ops-rr.c              |   2 -
accel/tcg/translate-all.c                 |  59 ++--
accel/tcg/translator.c                    |  39 +++
accel/tcg/user-exec.c                     |  48 ++-
bsd-user/i386/target_arch_cpu.c           |   5 -
bsd-user/x86_64/target_arch_cpu.c         |   5 -
linux-user/main.c                         |   7 -
target/alpha/cpu.c                        |   2 +-
target/alpha/helper.c                     |   5 +-
target/alpha/translate.c                  |   2 +-
target/arm/cpu.c                          |   7 +-
target/arm/cpu_tcg.c                      |   6 +-
target/arm/translate-a64.c                |   2 +-
target/arm/translate.c                    |   9 +-
target/avr/cpu.c                          |   3 -
target/cris/cpu.c                         |   4 +-
target/cris/helper.c                      |  17 +-
target/hexagon/translate.c                |   3 +-
target/hppa/cpu.c                         |   2 +-
target/hppa/int_helper.c                  |   7 +-
target/hppa/translate.c                   |   5 +-
target/i386/tcg/seg_helper.c              |  74 +----
target/i386/tcg/sysemu/seg_helper.c       |  62 ++++
target/i386/tcg/tcg-cpu.c                 |   8 +-
target/i386/tcg/translate.c               |  10 +-
target/m68k/cpu.c                         |   2 +-
target/m68k/op_helper.c                   |  16 +-
target/m68k/translate.c                   |   2 +-
target/microblaze/cpu.c                   |   2 +-
target/microblaze/helper.c                |  13 +-
target/mips/cpu.c                         |   2 +-
target/mips/tcg/exception.c               |  18 --
target/mips/tcg/sysemu/tlb_helper.c       |  18 ++
target/mips/tcg/translate.c               |   8 +-
target/mips/tcg/user/tlb_helper.c         |   5 -
target/nios2/cpu.c                        |   5 +-
target/openrisc/cpu.c                     |   2 +-
target/openrisc/interrupt.c               |   2 -
target/openrisc/translate.c               |   2 +-
target/ppc/cpu_init.c                     |   2 +-
target/ppc/excp_helper.c                  |  21 +-
target/ppc/translate.c                    |   5 +-
target/riscv/cpu.c                        |   2 +-
target/riscv/cpu_helper.c                 |   5 -
target/riscv/translate.c                  |   5 +-
target/rx/cpu.c                           |   2 +-
target/rx/helper.c                        |   4 +
target/s390x/tcg/translate.c              |  16 +-
target/sh4/cpu.c                          |   2 +-
target/sh4/helper.c                       |   9 +-
target/sh4/translate.c                    |   4 +-
target/sparc/cpu.c                        |   4 +-
target/sparc/translate.c                  |   2 +-
target/xtensa/cpu.c                       |   2 +-
target/xtensa/exc_helper.c                |   7 +-
target/xtensa/translate.c                 |   5 +-
target/mips/tcg/micromips_translate.c.inc |   2 +-
target/mips/tcg/mips16e_translate.c.inc   |   4 +-
target/mips/tcg/nanomips_translate.c.inc  |   4 +-
tcg/arm/tcg-target.c.inc                  | 517 ++++++++++++++++--------------
tcg/i386/tcg-target.c.inc                 |  13 +-
tcg/ppc/tcg-target.c.inc                  |  25 +-
target/openrisc/meson.build               |   6 +-
87 files changed, 702 insertions(+), 630 deletions(-)
[PULL v3 00/44] tcg patch queue
Posted by Richard Henderson 2 years, 7 months ago
Version 3: Rebase and fix a minor patch conflict.


r~


The following changes since commit c6f5e042d89e79206cd1ce5525d3df219f13c3cc:

  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210913-3' into staging (2021-09-13 21:06:15 +0100)

are available in the Git repository at:

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

for you to fetch changes up to a5b759b6dca7daf87fa5007a7f5784bf22f3830f:

  tcg/arm: More use of the TCGReg enum (2021-09-14 07:59:43 -0700)

----------------------------------------------------------------
Fix translation race condition for user-only.
Fix tcg/i386 encoding for VPSLLVQ, VPSRLVQ.
Fix tcg/arm tcg_out_vec_op signature.
Fix tcg/ppc (32bit) build with clang.
Remove dupluate TCG_KICK_PERIOD definition.
Remove unused tcg_global_reg_new.
Restrict cpu_exec_interrupt and its callees to sysemu.
Cleanups for tcg/arm.

----------------------------------------------------------------
Bin Meng (1):
      tcg: Remove tcg_global_reg_new defines

Ilya Leoshkevich (3):
      accel/tcg: Add DisasContextBase argument to translator_ld*
      accel/tcg: Clear PAGE_WRITE before translation
      accel/tcg/user-exec: Fix read-modify-write of code on s390 hosts

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

Luc Michel (1):
      accel/tcg: remove redundant TCG_KICK_PERIOD define

Philippe Mathieu-Daudé (25):
      target/avr: Remove pointless use of CONFIG_USER_ONLY definition
      target/i386: Restrict sysemu-only fpu_helper helpers
      target/i386: Simplify TARGET_X86_64 #ifdef'ry
      target/xtensa: Restrict do_transaction_failed() to sysemu
      accel/tcg: Rename user-mode do_interrupt hack as fake_user_interrupt
      target/alpha: Restrict cpu_exec_interrupt() handler to sysemu
      target/arm: Restrict cpu_exec_interrupt() handler to sysemu
      target/cris: Restrict cpu_exec_interrupt() handler to sysemu
      target/hppa: Restrict cpu_exec_interrupt() handler to sysemu
      target/i386: Restrict cpu_exec_interrupt() handler to sysemu
      target/i386: Move x86_cpu_exec_interrupt() under sysemu/ folder
      target/m68k: Restrict cpu_exec_interrupt() handler to sysemu
      target/microblaze: Restrict cpu_exec_interrupt() handler to sysemu
      target/mips: Restrict cpu_exec_interrupt() handler to sysemu
      target/nios2: Restrict cpu_exec_interrupt() handler to sysemu
      target/openrisc: Restrict cpu_exec_interrupt() handler to sysemu
      target/ppc: Restrict cpu_exec_interrupt() handler to sysemu
      target/riscv: Restrict cpu_exec_interrupt() handler to sysemu
      target/sh4: Restrict cpu_exec_interrupt() handler to sysemu
      target/sparc: Restrict cpu_exec_interrupt() handler to sysemu
      target/rx: Restrict cpu_exec_interrupt() handler to sysemu
      target/xtensa: Restrict cpu_exec_interrupt() handler to sysemu
      accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu
      user: Remove cpu_get_pic_interrupt() stubs
      user: Mark cpu_loop() with noreturn attribute

Richard Henderson (13):
      tcg/i386: Split P_VEXW from P_REXW
      tcg/ppc: Replace TCG_TARGET_CALL_DARWIN with _CALL_DARWIN
      tcg/ppc: Ensure _CALL_SYSV is set for 32-bit ELF
      tcg/arm: Remove fallback definition of __ARM_ARCH
      tcg/arm: Standardize on tcg_out_<branch>_{reg,imm}
      tcg/arm: Simplify use_armv5t_instructions
      tcg/arm: Support armv4t in tcg_out_goto and tcg_out_call
      tcg/arm: Split out tcg_out_ldstm
      tcg/arm: Simplify usage of encode_imm
      tcg/arm: Drop inline markers
      tcg/arm: Give enum arm_cond_code_e a typedef and use it
      tcg/arm: More use of the ARMInsn enum
      tcg/arm: More use of the TCGReg enum

 bsd-user/qemu.h                           |   2 +-
 include/exec/translate-all.h              |   1 +
 include/exec/translator.h                 |  44 +--
 include/hw/core/tcg-cpu-ops.h             |  26 +-
 include/tcg/tcg-op.h                      |   2 -
 linux-user/qemu.h                         |   2 +-
 target/alpha/cpu.h                        |   2 +-
 target/arm/arm_ldst.h                     |  12 +-
 target/arm/cpu.h                          |   3 +-
 target/cris/cpu.h                         |   2 +-
 target/hppa/cpu.h                         |   4 +-
 target/i386/cpu.h                         |   3 +
 target/i386/tcg/helper-tcg.h              |   2 +
 target/m68k/cpu.h                         |   2 +
 target/microblaze/cpu.h                   |   2 +
 target/mips/tcg/tcg-internal.h            |   5 +-
 target/openrisc/cpu.h                     |   5 +-
 target/ppc/cpu.h                          |   4 +-
 target/riscv/cpu.h                        |   2 +-
 target/rx/cpu.h                           |   2 +
 target/sh4/cpu.h                          |   4 +-
 target/xtensa/cpu.h                       |   2 +
 tcg/arm/tcg-target.h                      |  27 +-
 accel/tcg/cpu-exec.c                      |  14 +-
 accel/tcg/tcg-accel-ops-rr.c              |   2 -
 accel/tcg/translate-all.c                 |  59 ++--
 accel/tcg/translator.c                    |  39 +++
 accel/tcg/user-exec.c                     |  48 ++-
 bsd-user/i386/target_arch_cpu.c           |   5 -
 bsd-user/x86_64/target_arch_cpu.c         |   5 -
 linux-user/main.c                         |   7 -
 target/alpha/cpu.c                        |   2 +-
 target/alpha/helper.c                     |   5 +-
 target/alpha/translate.c                  |   2 +-
 target/arm/cpu.c                          |   7 +-
 target/arm/cpu_tcg.c                      |   6 +-
 target/arm/translate-a64.c                |   2 +-
 target/arm/translate.c                    |   9 +-
 target/avr/cpu.c                          |   3 -
 target/cris/cpu.c                         |   4 +-
 target/cris/helper.c                      |  17 +-
 target/hexagon/translate.c                |   3 +-
 target/hppa/cpu.c                         |   2 +-
 target/hppa/int_helper.c                  |   7 +-
 target/hppa/translate.c                   |   5 +-
 target/i386/tcg/seg_helper.c              |  74 +----
 target/i386/tcg/sysemu/seg_helper.c       |  62 ++++
 target/i386/tcg/tcg-cpu.c                 |   8 +-
 target/i386/tcg/translate.c               |  10 +-
 target/m68k/cpu.c                         |   2 +-
 target/m68k/op_helper.c                   |  16 +-
 target/m68k/translate.c                   |   2 +-
 target/microblaze/cpu.c                   |   2 +-
 target/microblaze/helper.c                |  13 +-
 target/mips/cpu.c                         |   2 +-
 target/mips/tcg/exception.c               |  18 --
 target/mips/tcg/sysemu/tlb_helper.c       |  18 ++
 target/mips/tcg/translate.c               |   8 +-
 target/mips/tcg/user/tlb_helper.c         |   5 -
 target/nios2/cpu.c                        |   5 +-
 target/openrisc/cpu.c                     |   2 +-
 target/openrisc/interrupt.c               |   2 -
 target/openrisc/translate.c               |   2 +-
 target/ppc/cpu_init.c                     |   2 +-
 target/ppc/excp_helper.c                  |  21 +-
 target/ppc/translate.c                    |   5 +-
 target/riscv/cpu.c                        |   2 +-
 target/riscv/cpu_helper.c                 |   5 -
 target/riscv/translate.c                  |   5 +-
 target/rx/cpu.c                           |   2 +-
 target/rx/helper.c                        |   4 +
 target/s390x/tcg/translate.c              |  16 +-
 target/sh4/cpu.c                          |   2 +-
 target/sh4/helper.c                       |   9 +-
 target/sh4/translate.c                    |   4 +-
 target/sparc/cpu.c                        |   4 +-
 target/sparc/translate.c                  |   2 +-
 target/xtensa/cpu.c                       |   2 +-
 target/xtensa/exc_helper.c                |   7 +-
 target/xtensa/translate.c                 |   5 +-
 target/mips/tcg/micromips_translate.c.inc |   2 +-
 target/mips/tcg/mips16e_translate.c.inc   |   4 +-
 target/mips/tcg/nanomips_translate.c.inc  |   4 +-
 tcg/arm/tcg-target.c.inc                  | 517 ++++++++++++++++--------------
 tcg/i386/tcg-target.c.inc                 |  13 +-
 tcg/ppc/tcg-target.c.inc                  |  25 +-
 target/openrisc/meson.build               |   6 +-
 87 files changed, 702 insertions(+), 630 deletions(-)

Re: [PULL v3 00/44] tcg patch queue
Posted by Peter Maydell 2 years, 7 months ago
On Tue, 14 Sept 2021 at 16:53, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Version 3: Rebase and fix a minor patch conflict.
>
>
> r~
>
>
> The following changes since commit c6f5e042d89e79206cd1ce5525d3df219f13c3cc:
>
>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210913-3' into staging (2021-09-13 21:06:15 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210914
>
> for you to fetch changes up to a5b759b6dca7daf87fa5007a7f5784bf22f3830f:
>
>   tcg/arm: More use of the TCGReg enum (2021-09-14 07:59:43 -0700)
>
> ----------------------------------------------------------------
> Fix translation race condition for user-only.
> Fix tcg/i386 encoding for VPSLLVQ, VPSRLVQ.
> Fix tcg/arm tcg_out_vec_op signature.
> Fix tcg/ppc (32bit) build with clang.
> Remove dupluate TCG_KICK_PERIOD definition.
> Remove unused tcg_global_reg_new.
> Restrict cpu_exec_interrupt and its callees to sysemu.
> Cleanups for tcg/arm.

This throws up new warnings on FreeBSD:

../src/bsd-user/main.c:148:1: warning: function declared 'noreturn'
should not return [-Winvalid-noreturn]

Unlike linux-user, where cpu_loop() is the direct implementation
of the target-specific main loop, on bsd-user cpu_loop() seems
to just call target_cpu_loop(). Since target_cpu_loop() isn't
marked noreturn, the compiler complains about cpu_loop() being
marked noreturn.

Easy fix would be to just drop the bsd-user part of
"user: Mark cpu_loop() with noreturn attribute" I guess.
Otherwise you could try marking all the target_cpu_loop()
functions noreturn as well.

-- PMM

Re: [PULL v3 00/44] tcg patch queue
Posted by Philippe Mathieu-Daudé 2 years, 7 months ago
On 9/14/21 7:13 PM, Peter Maydell wrote:
> On Tue, 14 Sept 2021 at 16:53, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> Version 3: Rebase and fix a minor patch conflict.
>>
>>
>> r~
>>
>>
>> The following changes since commit c6f5e042d89e79206cd1ce5525d3df219f13c3cc:
>>
>>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210913-3' into staging (2021-09-13 21:06:15 +0100)
>>
>> are available in the Git repository at:
>>
>>   https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210914
>>
>> for you to fetch changes up to a5b759b6dca7daf87fa5007a7f5784bf22f3830f:
>>
>>   tcg/arm: More use of the TCGReg enum (2021-09-14 07:59:43 -0700)
>>
>> ----------------------------------------------------------------
>> Fix translation race condition for user-only.
>> Fix tcg/i386 encoding for VPSLLVQ, VPSRLVQ.
>> Fix tcg/arm tcg_out_vec_op signature.
>> Fix tcg/ppc (32bit) build with clang.
>> Remove dupluate TCG_KICK_PERIOD definition.
>> Remove unused tcg_global_reg_new.
>> Restrict cpu_exec_interrupt and its callees to sysemu.
>> Cleanups for tcg/arm.
> 
> This throws up new warnings on FreeBSD:
> 
> ../src/bsd-user/main.c:148:1: warning: function declared 'noreturn'
> should not return [-Winvalid-noreturn]
> 
> Unlike linux-user, where cpu_loop() is the direct implementation
> of the target-specific main loop, on bsd-user cpu_loop() seems
> to just call target_cpu_loop(). Since target_cpu_loop() isn't
> marked noreturn, the compiler complains about cpu_loop() being
> marked noreturn.

Sorry, my bad. I ran this on Gitlab CI but now realize the
FreeBSD job is marked as "allow to fail" so I missed it :(

> Easy fix would be to just drop the bsd-user part of
> "user: Mark cpu_loop() with noreturn attribute" I guess.
> Otherwise you could try marking all the target_cpu_loop()
> functions noreturn as well.

Richard, can you drop the offending patch from your pull
request?

Re: [PULL v3 00/44] tcg patch queue
Posted by Warner Losh 2 years, 6 months ago

> On Sep 14, 2021, at 11:27 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> 
> On 9/14/21 7:13 PM, Peter Maydell wrote:
>> On Tue, 14 Sept 2021 at 16:53, Richard Henderson
>> <richard.henderson@linaro.org> wrote:
>>> 
>>> Version 3: Rebase and fix a minor patch conflict.
>>> 
>>> 
>>> r~
>>> 
>>> 
>>> The following changes since commit c6f5e042d89e79206cd1ce5525d3df219f13c3cc:
>>> 
>>>  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210913-3' into staging (2021-09-13 21:06:15 +0100)
>>> 
>>> are available in the Git repository at:
>>> 
>>>  https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210914
>>> 
>>> for you to fetch changes up to a5b759b6dca7daf87fa5007a7f5784bf22f3830f:
>>> 
>>>  tcg/arm: More use of the TCGReg enum (2021-09-14 07:59:43 -0700)
>>> 
>>> ----------------------------------------------------------------
>>> Fix translation race condition for user-only.
>>> Fix tcg/i386 encoding for VPSLLVQ, VPSRLVQ.
>>> Fix tcg/arm tcg_out_vec_op signature.
>>> Fix tcg/ppc (32bit) build with clang.
>>> Remove dupluate TCG_KICK_PERIOD definition.
>>> Remove unused tcg_global_reg_new.
>>> Restrict cpu_exec_interrupt and its callees to sysemu.
>>> Cleanups for tcg/arm.
>> 
>> This throws up new warnings on FreeBSD:
>> 
>> ../src/bsd-user/main.c:148:1: warning: function declared 'noreturn'
>> should not return [-Winvalid-noreturn]
>> 
>> Unlike linux-user, where cpu_loop() is the direct implementation
>> of the target-specific main loop, on bsd-user cpu_loop() seems
>> to just call target_cpu_loop(). Since target_cpu_loop() isn't
>> marked noreturn, the compiler complains about cpu_loop() being
>> marked noreturn.
> 
> Sorry, my bad. I ran this on Gitlab CI but now realize the
> FreeBSD job is marked as "allow to fail" so I missed it :(
> 
>> Easy fix would be to just drop the bsd-user part of
>> "user: Mark cpu_loop() with noreturn attribute" I guess.
>> Otherwise you could try marking all the target_cpu_loop()
>> functions noreturn as well.
> 
> Richard, can you drop the offending patch from your pull
> request?

Yes. I think that’s best. I’m wanting to reorg a bit here, but I have
a number of architectures to plow through to do that…  I’ll pick it
up in my queue of things to do.  Sorry for the hassles that the
non-standard arrangement in bsd-user has. I’ll align them more
closely going forward.

Warner