qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/29] tcg: Fix x86 TARGET_TB_PCREL (#1269)
@ 2022-10-24 13:24 Richard Henderson
  2022-10-24 13:24 ` [PATCH 01/29] accel/tcg: Add restore_state_to_opc to TCGCPUOps Richard Henderson
                   ` (29 more replies)
  0 siblings, 30 replies; 64+ messages in thread
From: Richard Henderson @ 2022-10-24 13:24 UTC (permalink / raw)
  To: qemu-devel

As per #1269, this affects NetBSD installer boot.

The problem is that one of the x86 acpi callbacks modifies
env->eip during an mmio store, which means that the tracking
that translate.c does is thrown out of whack.

Introduce a method to extract unwind data without the
writeback to env.  This isn't a perfect abstraction, but I
couldn't think of anything better.  There's a couple of lines
of code duplication, but probably less than any abstration
that we might put on top

Move restore_state_to_opc to a tcg_ops hook.

Remove the last use of cpu_restore_state with will_exit=false
from openrisc, which was on shaky ground already with similar
modifications to translate.c variables.

Remove the will_exit/reset_icount parameters, which are now
always true.


r~


Richard Henderson (29):
  accel/tcg: Add restore_state_to_opc to TCGCPUOps
  target/alpha: Convert to tcg_ops restore_state_to_opc
  target/arm: Convert to tcg_ops restore_state_to_opc
  target/avr: Convert to tcg_ops restore_state_to_opc
  target/cris: Convert to tcg_ops restore_state_to_opc
  target/hexagon: Convert to tcg_ops restore_state_to_opc
  target/hppa: Convert to tcg_ops restore_state_to_opc
  target/i386: Convert to tcg_ops restore_state_to_opc
  target/loongarch: Convert to tcg_ops restore_state_to_opc
  target/m68k: Convert to tcg_ops restore_state_to_opc
  target/microblaze: Convert to tcg_ops restore_state_to_opc
  target/mips: Convert to tcg_ops restore_state_to_opc
  target/nios2: Convert to tcg_ops restore_state_to_opc
  target/openrisc: Convert to tcg_ops restore_state_to_opc
  target/ppc: Convert to tcg_ops restore_state_to_opc
  target/riscv: Convert to tcg_ops restore_state_to_opc
  target/rx: Convert to tcg_ops restore_state_to_opc
  target/s390x: Convert to tcg_ops restore_state_to_opc
  target/sh4: Convert to tcg_ops restore_state_to_opc
  target/sparc: Convert to tcg_ops restore_state_to_opc
  target/tricore: Convert to tcg_ops restore_state_to_opc
  target/xtensa: Convert to tcg_ops restore_state_to_opc
  accel/tcg: Remove restore_state_to_opc function
  accel/tcg: Introduce cpu_unwind_state_data
  target/i386: Use cpu_unwind_state_data for tpr access
  target/openrisc: Always exit after mtspr npc
  target/openrisc: Use cpu_unwind_state_data for mfspr
  accel/tcg: Remove will_exit argument from cpu_restore_state
  accel/tcg: Remove reset_icount argument from cpu_restore_state_from_tb

 include/exec/exec-all.h             | 23 +++++---
 include/hw/core/tcg-cpu-ops.h       | 11 ++++
 target/mips/tcg/tcg-internal.h      |  3 +
 target/s390x/s390x-internal.h       |  4 +-
 target/sparc/cpu.h                  |  3 +
 accel/tcg/cpu-exec-common.c         |  2 +-
 accel/tcg/translate-all.c           | 87 ++++++++++++++++++-----------
 target/alpha/cpu.c                  |  9 +++
 target/alpha/helper.c               |  2 +-
 target/alpha/mem_helper.c           |  2 +-
 target/alpha/translate.c            |  6 --
 target/arm/cpu.c                    | 26 +++++++++
 target/arm/op_helper.c              |  2 +-
 target/arm/tlb_helper.c             |  8 +--
 target/arm/translate.c              | 22 --------
 target/avr/cpu.c                    | 11 ++++
 target/avr/translate.c              |  6 --
 target/cris/cpu.c                   | 11 ++++
 target/cris/helper.c                |  2 +-
 target/cris/translate.c             |  6 --
 target/hexagon/cpu.c                |  9 ++-
 target/hppa/cpu.c                   | 19 +++++++
 target/hppa/translate.c             | 13 -----
 target/i386/helper.c                | 21 ++++++-
 target/i386/tcg/sysemu/svm_helper.c |  2 +-
 target/i386/tcg/tcg-cpu.c           | 19 +++++++
 target/i386/tcg/translate.c         | 15 -----
 target/loongarch/cpu.c              | 11 ++++
 target/loongarch/translate.c        |  6 --
 target/m68k/cpu.c                   | 14 +++++
 target/m68k/op_helper.c             |  4 +-
 target/m68k/translate.c             | 10 ----
 target/microblaze/cpu.c             | 11 ++++
 target/microblaze/helper.c          |  2 +-
 target/microblaze/translate.c       |  7 ---
 target/mips/cpu.c                   |  1 +
 target/mips/tcg/translate.c         |  8 ++-
 target/nios2/cpu.c                  | 11 ++++
 target/nios2/op_helper.c            |  2 +-
 target/nios2/translate.c            |  6 --
 target/openrisc/cpu.c               | 13 +++++
 target/openrisc/sys_helper.c        | 17 ++++--
 target/openrisc/translate.c         | 10 ----
 target/ppc/cpu_init.c               | 10 ++++
 target/ppc/excp_helper.c            |  2 +-
 target/ppc/translate.c              |  6 --
 target/riscv/cpu.c                  |  9 ++-
 target/rx/cpu.c                     | 10 ++++
 target/rx/translate.c               |  6 --
 target/s390x/cpu.c                  |  1 +
 target/s390x/tcg/excp_helper.c      |  2 +-
 target/s390x/tcg/translate.c        |  7 ++-
 target/sh4/cpu.c                    | 16 ++++++
 target/sh4/translate.c              | 10 ----
 target/sparc/cpu.c                  |  1 +
 target/sparc/translate.c            |  7 ++-
 target/tricore/cpu.c                | 11 ++++
 target/tricore/op_helper.c          |  2 +-
 target/tricore/translate.c          |  6 --
 target/xtensa/cpu.c                 | 10 ++++
 target/xtensa/helper.c              |  6 +-
 target/xtensa/translate.c           |  6 --
 62 files changed, 386 insertions(+), 219 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2022-10-25 23:09 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 13:24 [PATCH 00/29] tcg: Fix x86 TARGET_TB_PCREL (#1269) Richard Henderson
2022-10-24 13:24 ` [PATCH 01/29] accel/tcg: Add restore_state_to_opc to TCGCPUOps Richard Henderson
2022-10-24 15:05   ` Claudio Fontana
2022-10-24 15:15     ` Richard Henderson
2022-10-25  8:41       ` Claudio Fontana
2022-10-24 13:24 ` [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Richard Henderson
2022-10-25  9:12   ` Claudio Fontana
2022-10-24 13:24 ` [PATCH 02/29] target/alpha: Convert to tcg_ops restore_state_to_opc Richard Henderson
2022-10-24 15:08   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 03/29] target/arm: " Richard Henderson
2022-10-24 14:27   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 04/29] target/avr: " Richard Henderson
2022-10-24 14:01   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 05/29] target/cris: " Richard Henderson
2022-10-24 14:58   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 06/29] target/hexagon: " Richard Henderson
2022-10-24 14:27   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 07/29] target/hppa: " Richard Henderson
2022-10-24 14:02   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 08/29] target/i386: " Richard Henderson
2022-10-24 14:59   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 09/29] target/loongarch: " Richard Henderson
2022-10-24 14:59   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 10/29] target/m68k: " Richard Henderson
2022-10-24 17:55   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 11/29] target/microblaze: " Richard Henderson
2022-10-24 17:56   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 12/29] target/mips: " Richard Henderson
2022-10-24 14:02   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 13/29] target/nios2: " Richard Henderson
2022-10-24 14:03   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 14/29] target/openrisc: " Richard Henderson
2022-10-24 15:00   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 15/29] target/ppc: " Richard Henderson
2022-10-24 17:56   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 16/29] target/riscv: " Richard Henderson
2022-10-24 14:03   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 17/29] target/rx: " Richard Henderson
2022-10-24 14:03   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 18/29] target/s390x: " Richard Henderson
2022-10-24 14:05   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 19/29] target/sh4: " Richard Henderson
2022-10-24 14:04   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 20/29] target/sparc: " Richard Henderson
2022-10-24 14:07   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 21/29] target/tricore: " Richard Henderson
2022-10-24 14:04   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 22/29] target/xtensa: " Richard Henderson
2022-10-24 17:56   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function Richard Henderson
2022-10-25  8:56   ` Claudio Fontana
2022-10-24 13:24 ` [PATCH 24/29] accel/tcg: Introduce cpu_unwind_state_data Richard Henderson
2022-10-25  9:23   ` Claudio Fontana
2022-10-25  9:32     ` Claudio Fontana
2022-10-25 23:08     ` Richard Henderson
2022-10-24 13:24 ` [PATCH 25/29] target/i386: Use cpu_unwind_state_data for tpr access Richard Henderson
2022-10-24 13:24 ` [PATCH 26/29] target/openrisc: Always exit after mtspr npc Richard Henderson
2022-10-25 15:39   ` Philippe Mathieu-Daudé
2022-10-25 15:49     ` Richard Henderson
2022-10-24 13:24 ` [PATCH 27/29] target/openrisc: Use cpu_unwind_state_data for mfspr Richard Henderson
2022-10-24 13:24 ` [PATCH 28/29] accel/tcg: Remove will_exit argument from cpu_restore_state Richard Henderson
2022-10-25 13:00   ` Claudio Fontana
2022-10-24 13:24 ` [PATCH 29/29] accel/tcg: Remove reset_icount argument from cpu_restore_state_from_tb Richard Henderson
2022-10-25 13:09   ` Claudio Fontana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).