RFC build more i386 tcg code modular.
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest29 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/29 | build: temporarily disable modular tcgmeson.build | +1 | 0 replies | |
| 2/29 | plugins: register qemu_plugin_opts using opts_init()include/ linux-user/ plugins/ +1 more | +9 | 0 replies | |
| 3/29 | tcg/module: move hmp.c to moduleaccel/ | +1 | 0 replies | |
| 4/29 | tcg/module: move cputlb.c to moduleaccel/ | +1 | 0 replies | |
| 5/29 | tcg/module: move tcg_ss to module [accel/tcg]accel/ | +1 | 0 replies | |
| 6/29 | tcg/module: move tcg_ss to module [tcg]tcg/ | +1 | 0 replies | |
| 7/29 | tcg/module: move files to module [target/i386/tcg]target/ target/ | +11 | 0 replies | |
| 8/29 | move cpu-exec-common.c from tcg module to core qemu [accel/tcg]accel/ | +4 | 0 replies | |
| 9/29 | tcg/module: add tcg-module.[ch] infrastructureaccel/ accel/ include/ | +17 | 2 replies | |
| 10/29 | tcg_funcs: Add tlb_flush to TCGModuleOpsaccel/ accel/ accel/ +13 more | +47 | 5 replies | |
| 11/29 | tcg_funcs: Add tlb_flush_page to TCGModuleOpsaccel/ accel/ include/ +3 more | +13 | 0 replies | |
| 12/29 | tcg_funcs: Add tlb_reset_dirty to TCGModuleOpsaccel/ accel/ include/ +2 more | +15 | 0 replies | |
| 13/29 | tcg_funcs: Add tlb_plugin_lookup to TCGModuleOpsaccel/ accel/ include/ +1 more | +14 | 0 replies | |
| 14/29 | tcg_funcs:Add tcg_exec_{realizefn,unrealizefn} to TCGModuleOpsaccel/ accel/ cpu.c +2 more | +20 | 0 replies | |
| 15/29 | tcg_funcs: Add tb_flush to TCGModuleOpsaccel/ accel/ accel/ +11 more | +21 | 1 reply | |
| 16/29 | tcg: use tb_page_addr_t for tb_invalidate_phys_range()accel/ cpu.c include/ +1 more | +4 | 0 replies | |
| 17/29 | tcg: drop tb_invalidate_phys_page_range()accel/ cpu.c include/ | +2 | 0 replies | |
| 18/29 | tcg_funcs: Add tb_invalidate_phys_range to TCGModuleOpsaccel/ accel/ cpu.c +4 more | +16 | 0 replies | |
| 19/29 | tcg_funcs: Add tb_check_watchpoint to TCGModuleOpsaccel/ accel/ include/ +2 more | +9 | 0 replies | |
| 20/29 | tcg_funcs: Add cpu_restore_state to TCGModuleOpsaccel/ accel/ accel/ +17 more | +36 | 2 replies | |
| 21/29 | tcg_funcs: Add curr_cflags to TCGModuleOpsaccel/ accel/ accel/ +3 more | +15 | 0 replies | |
| 22/29 | tcg_i386_funcs: Add update_fp_status to TCGI386ModuleOpsaccel/ accel/ include/ +3 more | +36 | 0 replies | |
| 23/29 | tcg_i386_funcs: Add update_mxcsr_status to TCGI386ModuleOpsaccel/ include/ target/ +2 more | +6 | 0 replies | |
| 24/29 | tcg_i386_funcs: Add update_mxcsr_from_sse_status to TCGI386ModuleOpsaccel/ include/ target/ +5 more | +8 | 0 replies | |
| 25/29 | tcg_i386_funcs: Add x86_register_ferr_irq to TCGI386ModuleOpsaccel/ hw/ hw/ +3 more | +16 | 0 replies | |
| 26/29 | tcg_i386_funcs: Add cpu_set_ignne to TCGI386ModuleOpsaccel/ hw/ include/ +2 more | +9 | 0 replies | |
| 27/29 | tcg_i386_funcs: Add cpu_x86_update_dr7 to TCGI386ModuleOpsaccel/ include/ target/ +3 more | +16 | 0 replies | |
| 28/29 | tcg_i386_funcs: Add cpu_cc_compute_all to TCGI386ModuleOpsaccel/ include/ target/ +6 more | +31 | 0 replies | |
| 29/29 | Revert "build: temporarily disable modular tcg"meson.build | +1 | 0 replies |
Reviews trailers per patch
2 of 29 patches have a Reviewed-by or Acked-by.
| Patch | David Gibson | Bastian Koppelmann | Greg Kurz |
|---|---|---|---|
| 1/29 | |||
| 2/29 | |||
| 3/29 | |||
| 4/29 | |||
| 5/29 | |||
| 6/29 | |||
| 7/29 | |||
| 8/29 | |||
| 9/29 | |||
| 10/29 | |||
| 11/29 | |||
| 12/29 | |||
| 13/29 | |||
| 14/29 | |||
| 15/29 | A-b | ||
| 16/29 | |||
| 17/29 | |||
| 18/29 | |||
| 19/29 | |||
| 20/29 | A-b | R-b | |
| 21/29 | |||
| 22/29 | |||
| 23/29 | |||
| 24/29 | |||
| 25/29 | |||
| 26/29 | |||
| 27/29 | |||
| 28/29 | |||
| 29/29 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 00/29] [RFC] build more i386 tcg code modular.
This series moves a big pile of code from core qemu to the tcg module.
To allow for more fine-grained patches the first patch disables modular tcg and the last patch re-enables it. Alternatively we could move all the build system changes (patches 4-8) to the end of the series and squash them into a single patch. Not sure which is better ...
The fundamental idea of this series is that any call from core qemu into tcg gets routed through function pointers. This is simliar to the way we handle the spice module (see ui/spice-module.c).
Initially the function pointers are filled with stubs, when the tcg module loads all function pointers are updated to point to the real functions instead. One side effect of this is that compile-time stubs will become runtime-stubs.
Series overview:
1 - disable modular tcg. 2 => 3 - misc small tweaks. 4 => 8 - build system changes. 9 => 21 - add generic tcg function pointers. 22 => 28 - add i386 tcg function pointers. 29 - re-enable modular tcg.
take care,
Gerd
Gerd Hoffmann (29):
build: temporarily disable modular tcg
plugins: register qemu_plugin_opts using opts_init() tcg/module: move hmp.c to module
tcg/module: move cputlb.c to module
tcg/module: move tcg_ss to module [accel/tcg]
tcg/module: move tcg_ss to module [tcg]
tcg/module: move files to module [target/i386/tcg]
move cpu-exec-common.c from tcg module to core qemu [accel/tcg] tcg/module: add tcg-module.[ch] infrastructure
tcg_funcs: Add tlb_flush to TCGModuleOps
tcg_funcs: Add tlb_flush_page to TCGModuleOps
tcg_funcs: Add tlb_reset_dirty to TCGModuleOps
tcg_funcs: Add tlb_plugin_lookup to TCGModuleOps tcg_funcs:Add tcg_exec_{realizefn,unrealizefn} to TCGModuleOps
tcg_funcs: Add tb_flush to TCGModuleOps
tcg: use tb_page_addr_t for tb_invalidate_phys_range()
tcg: drop tb_invalidate_phys_page_range()
tcg_funcs: Add tb_invalidate_phys_range to TCGModuleOps
tcg_funcs: Add tb_check_watchpoint to TCGModuleOps
tcg_funcs: Add cpu_restore_state to TCGModuleOps
tcg_funcs: Add curr_cflags to TCGModuleOps
tcg_i386_funcs: Add update_fp_status to TCGI386ModuleOps
tcg_i386_funcs: Add update_mxcsr_status to TCGI386ModuleOps
tcg_i386_funcs: Add update_mxcsr_from_sse_status to TCGI386ModuleOps
tcg_i386_funcs: Add x86_register_ferr_irq to TCGI386ModuleOps
tcg_i386_funcs: Add cpu_set_ignne to TCGI386ModuleOps
tcg_i386_funcs: Add cpu_x86_update_dr7 to TCGI386ModuleOps
tcg_i386_funcs: Add cpu_cc_compute_all to TCGI386ModuleOps Revert "build: temporarily disable modular tcg"
include/exec/cpu-all.h | 2 - include/exec/exec-all.h | 16 ++------ include/exec/ram_addr.h | 2 - include/exec/translate-all.h | 2 - include/qemu/plugin.h | 7 ---- include/tcg/tcg-module-i386.h | 15 ++++++++ include/tcg/tcg-module.h | 24 ++++++++++++ target/i386/cpu.h | 17 ++------ accel/stubs/tcg-stub.c | 4 -- accel/tcg/cpu-exec-common.c | 10 ++++- accel/tcg/cpu-exec.c | 15 ++++++-- accel/tcg/cputlb.c | 14 ++++++- accel/tcg/tcg-module-i386.c | 33 ++++++++++++++++ accel/tcg/tcg-module.c | 60 +++++++++++++++++++++++++++++ accel/tcg/translate-all.c | 55 +++++++------------------- cpu.c | 14 +++---- gdbstub.c | 4 +- hw/i386/pc.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/ppc/spapr_hcall.c | 2 +- linux-user/main.c | 2 +- linux-user/mmap.c | 8 ++-- linux-user/syscall.c | 4 +- plugins/api.c | 4 +- plugins/core.c | 2 +- plugins/loader.c | 11 +++++- softmmu/physmem.c | 22 +++++------ softmmu/vl.c | 1 - target/alpha/helper.c | 2 +- target/alpha/mem_helper.c | 2 +- target/alpha/sys_helper.c | 2 +- target/arm/helper.c | 26 ++++++------- target/arm/op_helper.c | 2 +- target/arm/tlb_helper.c | 8 ++-- target/cris/helper.c | 2 +- target/i386/cpu-dump.c | 2 +- target/i386/gdbstub.c | 2 +- target/i386/helper.c | 10 ++--- target/i386/machine.c | 8 ++-- target/i386/tcg/cc_helper.c | 9 ++++- target/i386/tcg/fpu_helper.c | 23 +++++++---- target/i386/tcg/int_helper.c | 8 ++-- target/i386/tcg/mem_helper.c | 8 ++-- target/i386/tcg/misc_helper.c | 4 +- target/i386/tcg/seg_helper.c | 10 ++--- target/i386/tcg/sysemu/bpt_helper.c | 9 ++++- target/i386/tcg/sysemu/fpu_helper.c | 12 +++++- target/i386/tcg/sysemu/svm_helper.c | 2 +- target/i386/tcg/tcg-stub.c | 25 ------------ target/m68k/op_helper.c | 6 +-- target/microblaze/helper.c | 2 +- target/mips/sysemu/cp0.c | 2 +- target/openrisc/sys_helper.c | 8 ++-- target/ppc/excp_helper.c | 2 +- target/riscv/csr.c | 2 +- target/s390x/gdbstub.c | 2 +- target/s390x/sigp.c | 2 +- target/s390x/tcg/excp_helper.c | 2 +- target/tricore/op_helper.c | 2 +- target/xtensa/helper.c | 6 +-- accel/tcg/meson.build | 24 ++++++++---- target/i386/tcg/meson.build | 7 +++- target/i386/tcg/sysemu/meson.build | 5 ++- tcg/meson.build | 2 +- 65 files changed, 367 insertions(+), 239 deletions(-) create mode 100644 include/tcg/tcg-module-i386.h create mode 100644 include/tcg/tcg-module.h create mode 100644 accel/tcg/tcg-module-i386.c create mode 100644 accel/tcg/tcg-module.c delete mode 100644 target/i386/tcg/tcg-stub.c
Signature · 1 line
2.31.1