RFC Compile accel/tcg once (partially)
Status from this message: Queued, thanks.
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest34 patches 51 repliesApplied
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/34 | target: [PAGE_VARY] Use PAGE_VARY for all softmmu targetstarget/ target/ target/ +15 more | +114 | 2 replies | |
| 2/34 | target: [PAGE_VARY] Move TARGET_PAGE_BITS_MIN to TargetPageBitsaccel/ include/ include/ +24 more | +37 | 1 reply | |
| 3/34 | exec: [PAGE_VARY] Move TARGET_PAGE_BITS_VARY to common headerinclude/ include/ | +35 | 1 reply | |
| 4/34 | exec: [PAGE_VARY] Unpoison TARGET_PAGE_* macros for system modeinclude/ | +2 | 1 reply | |
| 5/34 | target/tricore: [VADDR] Use target_ulong for EAtarget/ | +4 | 2 replies | |
| 6/34 | exec: [VADDR] Move vaddr defines to separate fileinclude/ include/ | +18 | 3 replies | |
| 7/34 | hw/core: [VADDR] Include vaddr.h from cpu.hinclude/ | +1 | 2 replies | |
| 8/34 | target: [VADDR] Use vaddr in gen_intermediate_codeinclude/ target/ target/ +19 more | +22 | 2 replies | |
| 9/34 | exec: [VADDR] Use vaddr in DisasContextBase for virtual addressesinclude/ target/ target/ +2 more | +14 | 2 replies | |
| 10/34 | exec: [VADDR] typedef abi_ptr to vaddrinclude/ | +2 | 2 replies | |
| 11/34 | Squash of header code shufflingaccel/ accel/ hw/ +12 more | +459 | 0 replies | |
| 12/34 | target: Uninline cpu_mmu_index()include/ target/ target/ +40 more | +222 | 2 replies | |
| 13/34 | target: Uninline cpu_get_tb_cpu_state()include/ target/ target/ +38 more | +350 | 2 replies | |
| 14/34 | exec: [CPUTLB] Move PAGE_* macros to common headerinclude/ include/ | +30 | 2 replies | |
| 15/34 | exec: [CPUTLB] Move TLB_*/tlb_*() to common headerinclude/ include/ | +83 | 1 reply | |
| 16/34 | exec: [CPUTLB] Move cpu_*()/cpu_env() to common headerinclude/ include/ | +25 | 3 replies | |
| 17/34 | hw/core: [CPUTLB] Move target specifics to end of TCGCPUOpsinclude/ | +17 | 2 replies | |
| 18/34 | accel/stubs: [CPUTLB] Move xen.h stubs to xen-stub.caccel/ include/ | +12 | 1 reply | |
| 19/34 | accel/tcg: [CPUTLB] Use TCGContext.addr_type instead of TARGET_LONG_BITSaccel/ include/ | +36 | 1 reply | |
| 20/34 | accel/tcg: [CPUTLB] Use TCGContext.guest_mo for memory orderingaccel/ | +4 | 1 reply | |
| 21/34 | accel/tcg: [CPUTLB] Use tcg_ctx->tlb_dyn_max_bitsaccel/ | +1 | 1 reply | |
| 22/34 | accel/tcg: [CPUTLB] Move CPU_TLB_DYN_[DEFAULT|MIN]* to cputlb.caccel/ include/ | +3 | 1 reply | |
| 23/34 | tcg: [CPUTLB] Add `mo_te` field to TCGContextinclude/ | +1 | 1 reply | |
| 24/34 | accel/tcg: [CPUTLB] Set mo_te in TCGContextaccel/ | +3 | 0 replies | |
| 25/34 | accel/tcg: [CPUTLB] Use tcg_ctx->mo_te instead of MO_TEaccel/ | +6 | 0 replies | |
| 26/34 | Wrap target macros in functionscpu-target.c include/ | +71 | 3 replies | |
| 27/34 | accel/tcg: Make translate-all.c target independentaccel/ | +18 | 4 replies | |
| 28/34 | accel/tcg: Make plugin-gen.c target independentaccel/ | +7 | 1 reply | |
| 29/34 | accel/tcg: Make tb-maint.c target indpendentaccel/ | +25 | 1 reply | |
| 30/34 | accel/tcg: Make tcg-all.c target indpendentaccel/ | +9 | 3 replies | |
| 31/34 | accel/tcg: Make tcg-runtime-gvec.c target independentaccel/ | +1 | 1 reply | |
| 32/34 | accel/tcg: Make tcg-runtime.c target independentaccel/ | +1 | 1 reply | |
| 33/34 | accel/tcg: Make translator.c (partially) target independentaccel/ | +8 | 1 reply | |
| 34/34 | accel/tcg: Compile (a few files) once for system-modeaccel/ | +45 | 0 replies |
Reviews trailers per patch
20 of 34 patches have a Reviewed-by or Acked-by.
| Patch | Philippe Mathieu-Daudé | Richard Henderson |
|---|---|---|
| 1/34 | R-b | |
| 2/34 | ||
| 3/34 | ||
| 4/34 | R-b | |
| 5/34 | R-b | |
| 6/34 | R-b | |
| 7/34 | R-b | |
| 8/34 | R-b | |
| 9/34 | R-b | |
| 10/34 | R-b | |
| 11/34 | ||
| 12/34 | R-b | |
| 13/34 | R-b | |
| 14/34 | R-b | |
| 15/34 | R-b | |
| 16/34 | R-b | |
| 17/34 | ||
| 18/34 | R-b | |
| 19/34 | ||
| 20/34 | ||
| 21/34 | ||
| 22/34 | R-b | |
| 23/34 | ||
| 24/34 | ||
| 25/34 | ||
| 26/34 | ||
| 27/34 | ||
| 28/34 | R-b | |
| 29/34 | ||
| 30/34 | A-b | |
| 31/34 | R-b | |
| 32/34 | R-b | |
| 33/34 | R-b | |
| 34/34 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 00/34] Compile accel/tcg once (partially)
Based on an older version of rth/tcg-next and some patches by me, Philippe, and Richard (most of which have since been merged), base branch here
https://gitlab.com/AntonJohansson/qemu/-/tree/feature/accel-tcg-once-base
Rebase is in the works, but should not affect the larger parts of this patchset that I'm looking for feedback on.
This patchset moves forward with the single binary/compile once work and tries to compile translation units in accel/tcg/ once for system mode. The following files are compiled once in this patchset
cputlb.c
tcg-all.c
tcg-runtime.c
tcg-runtime-gvec.c
tb-maint.c
plugin-gen.c
translate-all.c
and debuginfo.c is also moved to common_ss as it doesn't contain any target specifics. Work still remains for
cpu-exec.c (TARGET_I386 ifdefs)
translator.c (tswap(), ldl_p() and friends)
Brackets [...] in patch names are temporary and indicate patches that "belong" together and can be split out easier.
Major changes which I'm looking for feedback on:
- [PAGE_VARY] patches:
Switches to variable page sizes as a default for all system mode targets, meaning TARGET_PAGE_* and TLB_* become target independent.
- "Uninline cpu_mmu_index()"/"Uninline cpu_get_tb_cpu_state()":
Uninlines cpu_mmu_index() (used by cputlb.c) and cpu_get_tb_cpu_state() (used by translate-all.c) so they can be called from accel/tcg without pulling in target specifics.
- "Wrap target macros in functions":
Introduces wrapper functions in cpu-target.c around target macros that I'm not sure how to deal with.
Anton Johansson (34):
target: [PAGE_VARY] Use PAGE_VARY for all softmmu targets
target: [PAGE_VARY] Move TARGET_PAGE_BITS_MIN to TargetPageBits
exec: [PAGE_VARY] Move TARGET_PAGE_BITS_VARY to common header
exec: [PAGE_VARY] Unpoison TARGET_PAGE_* macros for system mode target/tricore: [VADDR] Use target_ulong for EA
exec: [VADDR] Move vaddr defines to separate file hw/core: [VADDR] Include vaddr.h from cpu.h
target: [VADDR] Use vaddr in gen_intermediate_code
exec: [VADDR] Use vaddr in DisasContextBase for virtual addresses
exec: [VADDR] typedef abi_ptr to vaddr
[IGNORE] Squash of header code shuffling
target: Uninline cpu_mmu_index()
target: Uninline cpu_get_tb_cpu_state()
exec: [CPUTLB] Move PAGE_* macros to common header
exec: [CPUTLB] Move TLB_*/tlb_*() to common header
exec: [CPUTLB] Move cpu_*()/cpu_env() to common header hw/core: [CPUTLB] Move target specifics to end of TCGCPUOps accel/stubs: [CPUTLB] Move xen.h stubs to xen-stub.c accel/tcg: [CPUTLB] Use TCGContext.addr_type instead of
TARGET_LONG_BITS
accel/tcg: [CPUTLB] Use TCGContext.guest_mo for memory ordering accel/tcg: [CPUTLB] Use tcg_ctx->tlb_dyn_max_bits accel/tcg: [CPUTLB] Move CPU_TLB_DYN_[DEFAULT|MIN]* to cputlb.c
tcg: [CPUTLB] Add mo_te field to TCGContext accel/tcg: [CPUTLB] Set mo_te in TCGContext
accel/tcg: [CPUTLB] Use tcg_ctx->mo_te instead of MO_TE Wrap target macros in functions
accel/tcg: Make translate-all.c target independent accel/tcg: Make plugin-gen.c target independent accel/tcg: Make tb-maint.c target indpendent accel/tcg: Make tcg-all.c target indpendent
accel/tcg: Make tcg-runtime-gvec.c target independent accel/tcg: Make tcg-runtime.c target independent accel/tcg: Make translator.c (partially) target independent accel/tcg: Compile (a few files) once for system-mode
accel/tcg/internal-target.h | 11 +- accel/tcg/tb-hash.h | 4 +- hw/s390x/s390-virtio-hcall.h | 2 + include/exec/cpu-all.h | 156 +------------- include/exec/cpu-common.h | 185 ++++++++++++++++- include/exec/cpu-defs.h | 7 +- include/exec/cpu_ldst-target.h | 52 +++++ include/exec/cpu_ldst.h | 95 +++------ include/exec/exec-all.h | 347 +------------------------------ include/exec/exec-common.h | 367 +++++++++++++++++++++++++++++++++ include/exec/memory-internal.h | 2 +- include/exec/page-vary.h | 1 + include/exec/poison.h | 2 + include/exec/ram_addr.h | 3 +- include/exec/translator.h | 8 +- include/exec/vaddr.h | 18 ++ include/hw/core/cpu.h | 11 +- include/hw/core/tcg-cpu-ops.h | 32 +-- include/qemu/plugin-memory.h | 1 - include/sysemu/xen.h | 27 --- include/tcg/tcg.h | 1 + target/alpha/cpu-param.h | 6 + target/alpha/cpu.h | 20 -- target/arm/cpu-param.h | 2 +- target/arm/cpu.h | 16 -- target/avr/cpu-param.h | 6 + target/avr/cpu.h | 24 --- target/cris/cpu-param.h | 7 + target/cris/cpu.h | 14 -- target/hexagon/cpu.h | 21 -- target/hppa/cpu-param.h | 6 + target/hppa/cpu.h | 55 ----- target/i386/cpu-param.h | 6 + target/i386/cpu.h | 16 -- target/loongarch/cpu-param.h | 5 + target/loongarch/cpu.h | 23 --- target/m68k/cpu-param.h | 6 + target/m68k/cpu.h | 20 -- target/microblaze/cpu-param.h | 6 +- target/microblaze/cpu.h | 23 --- target/mips/cpu-param.h | 2 +- target/mips/cpu.h | 23 +-- target/mips/tcg/translate.h | 3 +- target/nios2/cpu-param.h | 5 +- target/nios2/cpu.h | 18 -- target/openrisc/cpu-param.h | 8 +- target/openrisc/cpu.h | 22 -- target/ppc/cpu-param.h | 6 + target/ppc/cpu.h | 21 -- target/riscv/cpu-param.h | 7 + target/riscv/cpu.h | 5 - target/rx/cpu-param.h | 8 +- target/rx/cpu.h | 14 -- target/s390x/cpu-param.h | 8 +- target/s390x/cpu.h | 53 ----- target/sh4/cpu-param.h | 4 +- target/sh4/cpu.h | 25 --- target/sparc/cpu-param.h | 17 +- target/sparc/cpu.h | 63 ------ target/tricore/cpu-param.h | 8 +- target/tricore/cpu.h | 17 -- target/xtensa/cpu-param.h | 8 +- target/xtensa/cpu.h | 73 ------- accel/stubs/xen-stub.c | 12 ++ accel/tcg/cpu-exec.c | 1 + accel/tcg/cputlb.c | 51 +++-- accel/tcg/plugin-gen.c | 15 +- accel/tcg/tb-maint.c | 47 +++-- accel/tcg/tcg-all.c | 25 +-- accel/tcg/tcg-runtime-gvec.c | 2 +- accel/tcg/tcg-runtime.c | 2 +- accel/tcg/translate-all.c | 40 ++-- accel/tcg/translator.c | 16 +- cpu-target.c | 62 ++++++ page-vary-common.c | 1 + page-vary-target.c | 4 +- plugins/core.c | 1 + target/alpha/cpu.c | 19 ++ target/alpha/translate.c | 2 +- target/arm/cpu.c | 6 + target/arm/tcg/translate.c | 6 +- target/avr/cpu.c | 23 +++ target/avr/translate.c | 2 +- target/cris/cpu.c | 14 ++ target/cris/translate.c | 2 +- target/hexagon/cpu.c | 21 ++ target/hexagon/translate.c | 5 +- target/hppa/cpu.c | 59 ++++++ target/hppa/translate.c | 2 +- target/i386/cpu.c | 16 ++ target/i386/tcg/translate.c | 2 +- target/loongarch/cpu.c | 23 +++ target/loongarch/translate.c | 2 +- target/m68k/cpu.c | 21 ++ target/m68k/translate.c | 4 +- target/microblaze/cpu.c | 23 +++ target/microblaze/translate.c | 2 +- target/mips/cpu.c | 23 +++ target/mips/tcg/translate.c | 14 +- target/nios2/cpu.c | 18 ++ target/nios2/translate.c | 2 +- target/openrisc/cpu.c | 22 ++ target/openrisc/translate.c | 2 +- target/ppc/cpu.c | 20 ++ target/ppc/translate.c | 2 +- target/riscv/cpu_helper.c | 2 +- target/riscv/translate.c | 2 +- target/rx/cpu.c | 14 ++ target/rx/translate.c | 2 +- target/s390x/cpu.c | 55 +++++ target/s390x/tcg/translate.c | 2 +- target/sh4/cpu.c | 28 +++ target/sh4/translate.c | 2 +- target/sparc/cpu.c | 63 ++++++ target/sparc/gdbstub.c | 3 + target/sparc/translate.c | 2 +- target/tricore/cpu.c | 17 ++ target/tricore/op_helper.c | 8 +- target/tricore/translate.c | 2 +- target/xtensa/cpu.c | 72 +++++++ target/xtensa/translate.c | 2 +- accel/tcg/meson.build | 57 +++-- 122 files changed, 1656 insertions(+), 1345 deletions(-) create mode 100644 include/exec/cpu_ldst-target.h create mode 100644 include/exec/exec-common.h create mode 100644 include/exec/vaddr.h
Signature · 1 line
2.43.0