All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/29] [RFC] build more i386 tcg code modular.
@ 2021-08-31 12:15 ` Gerd Hoffmann
  0 siblings, 0 replies; 80+ messages in thread
From: Gerd Hoffmann @ 2021-08-31 12:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Michael S. Tsirkin, Bin Meng, David Hildenbrand,
	Aleksandar Rikalo, Peter Xu, Philippe Mathieu-Daudé,
	Max Filippov, Alistair Francis, Gerd Hoffmann, Edgar E. Iglesias,
	Alexandre Iooss, Huacai Chen, Halil Pasic, Christian Borntraeger,
	Palmer Dabbelt, Philippe Mathieu-Daudé,
	Thomas Huth, Eduardo Habkost, Richard Henderson, Greg Kurz,
	qemu-s390x, qemu-arm, Stafford Horne, Alex Bennée,
	David Gibson, qemu-riscv, Bastian Koppelmann, Cornelia Huck,
	Laurent Vivier, qemu-ppc, Paolo Bonzini, Mahmoud Mandour,
	Aurelien Jarno

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

-- 
2.31.1




^ permalink raw reply	[flat|nested] 80+ messages in thread

end of thread, other threads:[~2021-09-29 10:37 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 12:15 [PATCH 00/29] [RFC] build more i386 tcg code modular Gerd Hoffmann
2021-08-31 12:15 ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 01/29] build: temporarily disable modular tcg Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 02/29] plugins: register qemu_plugin_opts using opts_init() Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 03/29] tcg/module: move hmp.c to module Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 04/29] tcg/module: move cputlb.c " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 05/29] tcg/module: move tcg_ss to module [accel/tcg] Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 06/29] tcg/module: move tcg_ss to module [tcg] Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 07/29] tcg/module: move files to module [target/i386/tcg] Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 08/29] move cpu-exec-common.c from tcg module to core qemu [accel/tcg] Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 09/29] tcg/module: add tcg-module.[ch] infrastructure Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-09-28 11:47   ` Philippe Mathieu-Daudé
2021-09-28 11:47     ` Philippe Mathieu-Daudé
2021-09-28 12:11     ` Gerd Hoffmann
2021-09-28 12:11       ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-09-02 13:09   ` Richard Henderson
2021-09-02 13:09     ` Richard Henderson
2021-09-28 11:32     ` Gerd Hoffmann
2021-09-28 11:32       ` Gerd Hoffmann
2021-09-28 12:50       ` Richard Henderson
2021-09-28 12:50         ` Richard Henderson
2021-09-29  7:09         ` Gerd Hoffmann
2021-09-29  7:09           ` Gerd Hoffmann
2021-09-29 10:35           ` Richard Henderson
2021-09-29 10:35             ` Richard Henderson
2021-08-31 12:15 ` [PATCH 11/29] tcg_funcs: Add tlb_flush_page " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 12/29] tcg_funcs: Add tlb_reset_dirty " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 13/29] tcg_funcs: Add tlb_plugin_lookup " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 14/29] tcg_funcs:Add tcg_exec_{realizefn, unrealizefn} " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 15/29] tcg_funcs: Add tb_flush " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-09-01  8:10   ` Greg Kurz
2021-09-01  8:10     ` Greg Kurz
2021-08-31 12:15 ` [PATCH 16/29] tcg: use tb_page_addr_t for tb_invalidate_phys_range() Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 17/29] tcg: drop tb_invalidate_phys_page_range() Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 18/29] tcg_funcs: Add tb_invalidate_phys_range to TCGModuleOps Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 19/29] tcg_funcs: Add tb_check_watchpoint " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 20/29] tcg_funcs: Add cpu_restore_state " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-09-01  2:35   ` David Gibson
2021-09-01  2:35     ` David Gibson
2021-09-01  8:09   ` Bastian Koppelmann
2021-09-01  8:09     ` Bastian Koppelmann
2021-08-31 12:15 ` [PATCH 21/29] tcg_funcs: Add curr_cflags " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 22/29] tcg_i386_funcs: Add update_fp_status to TCGI386ModuleOps Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 23/29] tcg_i386_funcs: Add update_mxcsr_status " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 24/29] tcg_i386_funcs: Add update_mxcsr_from_sse_status " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 25/29] tcg_i386_funcs: Add x86_register_ferr_irq " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 26/29] tcg_i386_funcs: Add cpu_set_ignne " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 27/29] tcg_i386_funcs: Add cpu_x86_update_dr7 " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 28/29] tcg_i386_funcs: Add cpu_cc_compute_all " Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann
2021-08-31 12:15 ` [PATCH 29/29] Revert "build: temporarily disable modular tcg" Gerd Hoffmann
2021-08-31 12:15   ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.