qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] bfff07: tcg: update the cpu running flag in c


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] bfff07: tcg: update the cpu running flag in cpu_exec_step_...
Date: Mon, 25 Jan 2021 02:36:19 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: bfff072c5035b8dfbdebeb6b9143f3ae8fe9f9f4
      
https://github.com/qemu/qemu/commit/bfff072c5035b8dfbdebeb6b9143f3ae8fe9f9f4
  Author: Douglas Crosher <dtc-ubuntu@scieneer.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M accel/tcg/cpu-exec.c

  Log Message:
  -----------
  tcg: update the cpu running flag in cpu_exec_step_atomic

The cpu_exec_step_atomic() function is called with the cpu->running
clear and proceeds to run target code without setting this flag. If
this target code generates an exception then handle_cpu_signal() will
unnecessarily abort.  For example if atomic code generates a memory
protection fault.

This patch at least sets and clears this running flag, and adds some
assertions to help detect other cases.

Signed-off-by: Douglas Crosher <dtc-ubuntu@scieneer.com>
Message-Id: <a272c656-f7c5-019d-1cc0-499b8f80f2fc@scieneer.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c52ea111e0ea2d5368a3ae601baafaae75e3317f
      
https://github.com/qemu/qemu/commit/c52ea111e0ea2d5368a3ae601baafaae75e3317f
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M include/qemu/compiler.h

  Log Message:
  -----------
  qemu/compiler: Split out qemu_build_not_reached_always

Provide a symbol that can always be used to signal an error,
regardless of optimization.  Usage of this should be protected
by e.g. __builtin_constant_p, which guards for optimization.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 666cc794abe7aa2e123a0963934e519d28a7102c
      
https://github.com/qemu/qemu/commit/666cc794abe7aa2e123a0963934e519d28a7102c
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M include/tcg/tcg.h

  Log Message:
  -----------
  tcg: Optimize inline dup_const for MO_64

Avoid the out-of-line function call for immediate MO_64.
In addition, diagnose all invalid constants at compile-time.

Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: d9d699dd7c7d2570e86ea7ff323465d5ea34e9e5
      
https://github.com/qemu/qemu/commit/d9d699dd7c7d2570e86ea7ff323465d5ea34e9e5
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    M accel/tcg/translate-all.c
    M include/exec/exec-all.h

  Log Message:
  -----------
  accel/tcg: Make cpu_gen_init() static

cpu_gen_init() is TCG specific, only used in tcg/translate-all.c.
No need to export it to other accelerators, declare it statically.

Reviewed-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210117164813.4101761-2-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 0f4abea8efa658ea53600739a8912969736b2d4a
      
https://github.com/qemu/qemu/commit/0f4abea8efa658ea53600739a8912969736b2d4a
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    M accel/tcg/cputlb.c
    M accel/tcg/translate-all.c
    M include/exec/exec-all.h

  Log Message:
  -----------
  accel/tcg: Move tb_flush_jmp_cache() to cputlb.c

Move and make the function static, as the only users
are here in cputlb.c.

Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c03f041f128301c6a6c32242846be08719cd4fc3
      
https://github.com/qemu/qemu/commit/c03f041f128301c6a6c32242846be08719cd4fc3
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    M accel/tcg/cpu-exec.c
    A accel/tcg/internal.h
    M accel/tcg/translate-all.c
    M include/exec/exec-all.h

  Log Message:
  -----------
  accel/tcg: Restrict tb_gen_code() from other accelerators

tb_gen_code() is only called within TCG accelerator, declare it locally.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210117164813.4101761-4-f4bug@amsat.org>
[rth: Adjust vs changed tb_flush_jmp_cache patch.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: ee64036a4bec9fe79919812beddcf1a5f51f6bf6
      
https://github.com/qemu/qemu/commit/ee64036a4bec9fe79919812beddcf1a5f51f6bf6
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    M accel/stubs/tcg-stub.c

  Log Message:
  -----------
  accel/tcg: Declare missing cpu_loop_exit*() stubs

cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c,
and are not available when TCG accelerator is not built. Add stubs so
linking without TCG succeed.

Problematic files:

- hw/semihosting/console.c in qemu_semihosting_console_inc()
- hw/ppc/spapr_hcall.c in h_confer()
- hw/s390x/ipl.c in s390_ipl_reset_request()
- hw/misc/mips_itu.c

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210117164813.4101761-5-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 65269192241104342e3b1ba2b7b0f50e5042052e
      
https://github.com/qemu/qemu/commit/65269192241104342e3b1ba2b7b0f50e5042052e
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    M accel/tcg/cputlb.c
    M accel/tcg/internal.h
    M include/exec/exec-all.h

  Log Message:
  -----------
  accel/tcg: Restrict cpu_io_recompile() from other accelerators

As cpu_io_recompile() is only called within TCG accelerator
in cputlb.c, declare it locally.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210117164813.4101761-6-f4bug@amsat.org>
[rth: Adjust vs changed tb_flush_jmp_cache patch.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 653b87eb36045b506b79f0bb433016ef1c54bc9a
      
https://github.com/qemu/qemu/commit/653b87eb36045b506b79f0bb433016ef1c54bc9a
  Author: Roman Bolshakov <r.bolshakov@yadro.com>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    M accel/tcg/cpu-exec.c
    M accel/tcg/translate-all.c
    M include/qemu/osdep.h
    M tcg/tcg.c

  Log Message:
  -----------
  tcg: Toggle page execution for Apple Silicon

Pages can't be both write and executable at the same time on Apple
Silicon. macOS provides public API to switch write protection [1] for
JIT applications, like TCG.

1. 
https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon

Tested-by: Alexander Graf <agraf@csgraf.de>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20210113032806.18220-1-r.bolshakov@yadro.com>
[rth: Inline the qemu_thread_jit_* functions;
 drop the MAP_JIT change for a follow-on patch.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: ae30e86661b0f48562cd95918d37cbeec5d02262
      
https://github.com/qemu/qemu/commit/ae30e86661b0f48562cd95918d37cbeec5d02262
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-01-24 (Sun, 24 Jan 2021)

  Changed paths:
    M accel/tcg/translate-all.c
    M include/tcg/tcg.h
    M tcg/tcg.c

  Log Message:
  -----------
  tcg: Restart code generation when we run out of temps

Some large translation blocks can generate so many unique
constants that we run out of temps to hold them.  In this
case, longjmp back to the start of code generation and
restart with a smaller translation block.

Buglink: https://bugs.launchpad.net/bugs/1912065
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: e672f1d39755a6f7007dc8b04a9af43f1b7177ca
      
https://github.com/qemu/qemu/commit/e672f1d39755a6f7007dc8b04a9af43f1b7177ca
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-24 (Sun, 24 Jan 2021)

  Changed paths:
    M accel/stubs/tcg-stub.c
    M accel/tcg/cpu-exec.c
    M accel/tcg/cputlb.c
    A accel/tcg/internal.h
    M accel/tcg/translate-all.c
    M include/exec/exec-all.h
    M include/qemu/compiler.h
    M include/qemu/osdep.h
    M include/tcg/tcg.h
    M tcg/tcg.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210124' into 
staging

Fix tcg constant temp overflow.
Fix running during atomic single-step.
Partial support for apple silicon.
Cleanups for accel/tcg.

# gpg: Signature made Sun 24 Jan 2021 18:08:57 GMT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" 
[full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth-gitlab/tags/pull-tcg-20210124:
  tcg: Restart code generation when we run out of temps
  tcg: Toggle page execution for Apple Silicon
  accel/tcg: Restrict cpu_io_recompile() from other accelerators
  accel/tcg: Declare missing cpu_loop_exit*() stubs
  accel/tcg: Restrict tb_gen_code() from other accelerators
  accel/tcg: Move tb_flush_jmp_cache() to cputlb.c
  accel/tcg: Make cpu_gen_init() static
  tcg: Optimize inline dup_const for MO_64
  qemu/compiler: Split out qemu_build_not_reached_always
  tcg: update the cpu running flag in cpu_exec_step_atomic

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/e81eb5e6d108...e672f1d39755



reply via email to

[Prev in Thread] Current Thread [Next in Thread]