[PATCH 0/6] target: Use env_archcpu() instead of ARCH_CPU(env_cpu(env))

Philippe Mathieu-Daudé posted 6 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231009110239.66778-1-philmd@linaro.org
Maintainers: Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liweiwei@iscas.ac.cn>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Max Filippov <jcmvbkbc@gmail.com>
target/i386/hvf/x86_emu.h |  4 ++--
target/riscv/internals.h  |  8 ++++----
target/i386/hvf/hvf.c     |  4 ++--
target/i386/hvf/x86_emu.c | 25 ++++++++++++-------------
target/ppc/excp_helper.c  |  2 +-
target/s390x/diag.c       |  2 +-
target/xtensa/op_helper.c |  4 ++--
7 files changed, 24 insertions(+), 25 deletions(-)
[PATCH 0/6] target: Use env_archcpu() instead of ARCH_CPU(env_cpu(env))
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
When we have a CPUArchState* pointer we can directly get the
corresponding ArchCPU* pointer with env_archcpu(). No need to
use QOM cast which is slower due when building with
--enable-qom-cast-debug.

This series replace ARCH_CPU(env_cpu(env)) by env_archcpu(env)
when possible.

Philippe Mathieu-Daudé (6):
  target/ppc: Use env_archcpu() in helper_book3s_msgsndp()
  target/riscv: Use env_archcpu() in [check_]nanbox()
  target/s390x: Use env_archcpu() in handle_diag_308()
  target/xtensa: Use env_archcpu() in update_c[compare|count]()
  target/i386/hvf: Use x86_cpu in simulate_[rdmsr|wrmsr]()
  target/i386: Use env_archcpu() in simulate_[rdmsr/wrmsr]()

 target/i386/hvf/x86_emu.h |  4 ++--
 target/riscv/internals.h  |  8 ++++----
 target/i386/hvf/hvf.c     |  4 ++--
 target/i386/hvf/x86_emu.c | 25 ++++++++++++-------------
 target/ppc/excp_helper.c  |  2 +-
 target/s390x/diag.c       |  2 +-
 target/xtensa/op_helper.c |  4 ++--
 7 files changed, 24 insertions(+), 25 deletions(-)

-- 
2.41.0


Re: [PATCH 0/6] target: Use env_archcpu() instead of ARCH_CPU(env_cpu(env))
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
On 9/10/23 13:02, Philippe Mathieu-Daudé wrote:

> Philippe Mathieu-Daudé (6):
>    target/ppc: Use env_archcpu() in helper_book3s_msgsndp()
>    target/riscv: Use env_archcpu() in [check_]nanbox()
>    target/s390x: Use env_archcpu() in handle_diag_308()
>    target/xtensa: Use env_archcpu() in update_c[compare|count]()
>    target/i386/hvf: Use x86_cpu in simulate_[rdmsr|wrmsr]()
>    target/i386: Use env_archcpu() in simulate_[rdmsr/wrmsr]()

Series queued.


Re: [PATCH 0/6] target: Use env_archcpu() instead of ARCH_CPU(env_cpu(env))
Posted by Richard Henderson 1 year, 1 month ago
On 10/9/23 04:02, Philippe Mathieu-Daudé wrote:
> When we have a CPUArchState* pointer we can directly get the
> corresponding ArchCPU* pointer with env_archcpu(). No need to
> use QOM cast which is slower due when building with
> --enable-qom-cast-debug.
> 
> This series replace ARCH_CPU(env_cpu(env)) by env_archcpu(env)
> when possible.
> 
> Philippe Mathieu-Daudé (6):
>    target/ppc: Use env_archcpu() in helper_book3s_msgsndp()
>    target/riscv: Use env_archcpu() in [check_]nanbox()
>    target/s390x: Use env_archcpu() in handle_diag_308()
>    target/xtensa: Use env_archcpu() in update_c[compare|count]()
>    target/i386/hvf: Use x86_cpu in simulate_[rdmsr|wrmsr]()
>    target/i386: Use env_archcpu() in simulate_[rdmsr/wrmsr]()

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~