qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v14 00/34] Generic translation framework
@ 2017-07-15  9:42 Richard Henderson
  2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 01/34] Pass generic CPUState to gen_intermediate_code() Richard Henderson
                   ` (34 more replies)
  0 siblings, 35 replies; 67+ messages in thread
From: Richard Henderson @ 2017-07-15  9:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: vilanova, cota, alex.bennee, crosthwaite.peter, pbonzini

This is my take on Lluis' v13.  I've also written patches for
Alpha, SH4, and HPPA as examples of more complicated cases.
I have not included them here, but for the record:

  git://github.com/rth7680/qemu.git tgt-axp-2 tgt-sh4-2 tgt-pa

have the patches.  In the case of Alpha and SH4, there were
other dependencies not in tree.

Changes to the generic loop include

  * Move adjustment of max_insns from tb_start to init_disas_context.

  * Removed pc_next return from translate_insn.
    Just assign to that field from within the hook.

  * Removed tcg_check_temp_count from generic loop.

    It turns out that HPPA is not ameanable to this at all.
    There is in fact a temp that may be live between
    tb_start -> translate_insn and translate_insn -> tb_stop.

    I've added the check back to arm specifically, added a
    common function that can log the error, and use qem_log
    instead of error_report.

  * Moved gen_io_end to exactly match gen_io_start.
    I'm pretty sure this is what we always intended anyway.
    
  * Moved TB size/icount assignments before disas_log.

Changes to the ARM and i386 targets include

  * Tidy DisasJumpType usage wrt DISAS_NORETURN.

Changes to the ARM target include

  * Move the kernel magic page check after breakpoint checks.
    There's no reason why gdb couldn't attach in the magic page.
    This movement allows the insn_start hook to not be so weird
    generically.

  * Split out a separate thum translate_insn hook.
    There's a lot that T32 needs to do that A32 doesn't.

  * Reduce the number of end-of-TB checks in translate_insn.
    For A64 and A32, this means page crossing checks moved to
    init_disas_context.  Even T32 can have its single-step
    check moved.


r~


Lluís Vilanova (25):
  Pass generic CPUState to gen_intermediate_code()
  target: [tcg] Use a generic enum for DISAS_ values
  tcg: Add generic translation framework
  target/i386: [tcg] Port to DisasContextBase
  target/i386: [tcg] Port to init_disas_context
  target/i386: [tcg] Port to insn_start
  target/i386: [tcg] Port to breakpoint_check
  target/i386: [tcg] Port to translate_insn
  target/i386: [tcg] Port to tb_stop
  target/i386: [tcg] Port to disas_log
  target/i386: [tcg] Port to generic translation framework
  target/arm: [tcg] Port to DisasContextBase
  target/arm: [tcg] Port to init_disas_context
  target/arm: [tcg,a64] Port to init_disas_context
  target/arm: [tcg] Port to tb_start
  target/arm: [tcg] Port to insn_start
  target/arm: [tcg,a64] Port to insn_start
  target/arm: [tcg,a64] Port to breakpoint_check
  target/arm: [tcg] Port to translate_insn
  target/arm: [tcg,a64] Port to translate_insn
  target/arm: [tcg] Port to tb_stop
  target/arm: [tcg,a64] Port to tb_stop
  target/arm: [tcg] Port to disas_log
  target/arm: [tcg,a64] Port to disas_log
  target/arm: [tcg] Port to generic translation framework

Richard Henderson (9):
  tcg: Add generic DISAS_NORETURN
  target/i386: Use generic DISAS_* enumerators
  target/arm: Use DISAS_NORETURN
  target/arm: Delay check for magic kernel page
  target/arm: Set is_jmp properly after single-stepping
  target/arm: [a64] Move page and ss checks to init_disas_context
  target/arm: Move ss check to init_disas_context
  target/arm: Split out thumb_tr_translate_insn
  target/arm: Perform per-insn cross-page check only for Thumb

 include/exec/exec-all.h       |   8 +-
 include/exec/translator.h     | 141 +++++++++++++
 target/arm/translate.h        |  39 ++--
 accel/tcg/translate-all.c     |   2 +-
 accel/tcg/translator.c        | 133 ++++++++++++
 target/alpha/translate.c      |   5 +-
 target/arm/translate-a64.c    | 288 +++++++++++++------------
 target/arm/translate.c        | 481 +++++++++++++++++++++++-------------------
 target/cris/translate.c       |  14 +-
 target/hppa/translate.c       |   5 +-
 target/i386/translate.c       | 299 +++++++++++++-------------
 target/lm32/translate.c       |  10 +-
 target/m68k/translate.c       |  12 +-
 target/microblaze/translate.c |  10 +-
 target/mips/translate.c       |   5 +-
 target/moxie/translate.c      |   4 +-
 target/nios2/translate.c      |  11 +-
 target/openrisc/translate.c   |  10 +-
 target/ppc/translate.c        |   5 +-
 target/s390x/translate.c      |   8 +-
 target/sh4/translate.c        |   5 +-
 target/sparc/translate.c      |   5 +-
 target/tilegx/translate.c     |   5 +-
 target/tricore/translate.c    |   5 +-
 target/unicore32/translate.c  |  12 +-
 target/xtensa/translate.c     |   9 +-
 accel/tcg/Makefile.objs       |   1 +
 27 files changed, 936 insertions(+), 596 deletions(-)
 create mode 100644 include/exec/translator.h
 create mode 100644 accel/tcg/translator.c

-- 
2.9.4

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

end of thread, other threads:[~2017-07-22 11:00 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-15  9:42 [Qemu-devel] [PATCH v14 00/34] Generic translation framework Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 01/34] Pass generic CPUState to gen_intermediate_code() Richard Henderson
2017-07-17 22:56   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 02/34] tcg: Add generic DISAS_NORETURN Richard Henderson
2017-07-21 21:25   ` Emilio G. Cota
2017-07-21 22:32   ` Lluís Vilanova
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 03/34] target/i386: Use generic DISAS_* enumerators Richard Henderson
2017-07-21 21:25   ` Emilio G. Cota
2017-07-21 22:35   ` Lluís Vilanova
2017-07-22 10:31     ` Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 04/34] target/arm: Use DISAS_NORETURN Richard Henderson
2017-07-21 21:25   ` Emilio G. Cota
2017-07-21 22:38   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 05/34] target: [tcg] Use a generic enum for DISAS_ values Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 06/34] target/arm: Delay check for magic kernel page Richard Henderson
2017-07-21 21:27   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 07/34] target/arm: Set is_jmp properly after single-stepping Richard Henderson
2017-07-21 21:37   ` Emilio G. Cota
2017-07-22 10:39     ` Richard Henderson
2017-07-21 22:39   ` Lluís Vilanova
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 08/34] tcg: Add generic translation framework Richard Henderson
2017-07-21 22:49   ` Lluís Vilanova
2017-07-21 23:38   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 09/34] target/i386: [tcg] Port to DisasContextBase Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 10/34] target/i386: [tcg] Port to init_disas_context Richard Henderson
2017-07-21 21:54   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 11/34] target/i386: [tcg] Port to insn_start Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 12/34] target/i386: [tcg] Port to breakpoint_check Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 13/34] target/i386: [tcg] Port to translate_insn Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 14/34] target/i386: [tcg] Port to tb_stop Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 15/34] target/i386: [tcg] Port to disas_log Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 16/34] target/i386: [tcg] Port to generic translation framework Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 17/34] target/arm: [tcg] Port to DisasContextBase Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 18/34] target/arm: [tcg] Port to init_disas_context Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 19/34] target/arm: [tcg, a64] " Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 20/34] target/arm: [tcg] Port to tb_start Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 21/34] target/arm: [tcg] Port to insn_start Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 22/34] target/arm: [tcg, a64] " Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 23/34] target/arm: [tcg, a64] Port to breakpoint_check Richard Henderson
2017-07-21 22:12   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 24/34] target/arm: [tcg] Port to translate_insn Richard Henderson
2017-07-21 22:24   ` Emilio G. Cota
2017-07-21 23:20   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 25/34] target/arm: [tcg, a64] " Richard Henderson
2017-07-21 22:28   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 26/34] target/arm: [tcg] Port to tb_stop Richard Henderson
2017-07-21 22:41   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 27/34] target/arm: [tcg, a64] " Richard Henderson
2017-07-21 22:47   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 28/34] target/arm: [tcg] Port to disas_log Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 29/34] target/arm: [tcg, a64] " Richard Henderson
2017-07-21 22:50   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 30/34] target/arm: [tcg] Port to generic translation framework Richard Henderson
2017-07-21 23:02   ` Emilio G. Cota
2017-07-22  0:05     ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 31/34] target/arm: [a64] Move page and ss checks to init_disas_context Richard Henderson
2017-07-21 23:14   ` Emilio G. Cota
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 32/34] target/arm: Move ss check " Richard Henderson
2017-07-21 23:17   ` Emilio G. Cota
2017-07-22  9:07   ` Lluís Vilanova
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 33/34] target/arm: Split out thumb_tr_translate_insn Richard Henderson
2017-07-21 23:24   ` Emilio G. Cota
2017-07-22  0:35   ` Emilio G. Cota
2017-07-22 11:00     ` Richard Henderson
2017-07-15  9:42 ` [Qemu-devel] [PATCH v14 34/34] target/arm: Perform per-insn cross-page check only for Thumb Richard Henderson
2017-07-21 23:29   ` Emilio G. Cota
2017-07-15 10:15 ` [Qemu-devel] [PATCH v14 00/34] Generic translation framework no-reply

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).