All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu
@ 2021-09-02 15:16 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 152+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-02 15:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Bin Meng, Mark Cave-Ayland,
	Philippe Mathieu-Daudé,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Warner Losh,
	Marek Vasut, Yoshinori Sato, qemu-ppc, Artyom Tarasenko,
	Aleksandar Rikalo, Eduardo Habkost, Kyle Evans,
	Richard Henderson, Greg Kurz, qemu-arm, Michael Rolnik,
	Stafford Horne, David Gibson, qemu-riscv, Chris Wulff,
	Laurent Vivier, Palmer Dabbelt, Paolo Bonzini, Aurelien Jarno

Hi,

The TCGCPUOps::cpu_exec_interrupt() handler is specific to system
emulation. This series remove it from user-mode.
To do so we have to deal with a x86-hack first, then we restrict
each target handler (one target at a time) and finally we restrict
the prototype, simplifying cpu_handle_interrupt().

As a bonus we can remove the cpu_get_pic_interrupt() stubs from
bsd/linux-user.

Please review,

Phil.

Philippe Mathieu-Daudé (24):
  target/xtensa: Restrict do_transaction_failed() to sysemu
  target/i386: Restrict sysemu-only fpu_helper helpers
  target/i386: Simplify TARGET_X86_64 #ifdef'ry
  accel/tcg: Rename user-mode do_interrupt hack as fake_user_exception
  accel/tcg: Assert most of cpu_handle_interrupt() is sysemu-specific
  target/alpha: Restrict cpu_exec_interrupt() handler to sysemu
  target/arm: Restrict cpu_exec_interrupt() handler to sysemu
  target/avr: Restrict cpu_exec_interrupt() handler to sysemu
  target/cris: Restrict cpu_exec_interrupt() handler to sysemu
  target/hppa: Restrict cpu_exec_interrupt() handler to sysemu
  target/i386: Restrict cpu_exec_interrupt() handler to sysemu
  target/m68k: Restrict cpu_exec_interrupt() handler to sysemu
  target/microblaze: Restrict cpu_exec_interrupt() handler to sysemu
  target/mips: Restrict cpu_exec_interrupt() handler to sysemu
  target/nios2: Restrict cpu_exec_interrupt() handler to sysemu
  target/openrisc: Restrict cpu_exec_interrupt() handler to sysemu
  target/ppc: Restrict cpu_exec_interrupt() handler to sysemu
  target/riscv: Restrict cpu_exec_interrupt() handler to sysemu
  target/sh4: Restrict cpu_exec_interrupt() handler to sysemu
  target/sparc: Restrict cpu_exec_interrupt() handler to sysemu
  target/rx: Restrict cpu_exec_interrupt() handler to sysemu
  target/xtensa: Restrict cpu_exec_interrupt() handler to sysemu
  accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu
  user: Remove cpu_get_pic_interrupt() stubs

 include/hw/core/tcg-cpu-ops.h       | 26 ++++++++++++++++----------
 target/alpha/cpu.h                  |  2 +-
 target/arm/cpu.h                    |  3 +--
 target/avr/cpu.h                    |  2 ++
 target/cris/cpu.h                   |  2 +-
 target/hppa/cpu.h                   |  4 ++--
 target/i386/cpu.h                   |  3 +++
 target/i386/tcg/helper-tcg.h        |  2 ++
 target/m68k/cpu.h                   |  2 ++
 target/microblaze/cpu.h             |  2 ++
 target/mips/tcg/tcg-internal.h      |  5 +++--
 target/openrisc/cpu.h               |  5 +++--
 target/ppc/cpu.h                    |  4 ++--
 target/riscv/cpu.h                  |  2 +-
 target/rx/cpu.h                     |  2 ++
 target/sh4/cpu.h                    |  4 ++--
 target/xtensa/cpu.h                 |  2 ++
 accel/tcg/cpu-exec.c                | 14 +++++++++-----
 bsd-user/main.c                     |  7 -------
 linux-user/main.c                   |  7 -------
 target/alpha/cpu.c                  |  2 +-
 target/alpha/helper.c               |  5 ++---
 target/arm/cpu.c                    |  7 +++++--
 target/arm/cpu_tcg.c                |  6 +++---
 target/avr/cpu.c                    |  2 +-
 target/avr/helper.c                 |  2 ++
 target/cris/cpu.c                   |  4 ++--
 target/cris/helper.c                | 17 ++---------------
 target/hppa/cpu.c                   |  2 +-
 target/hppa/int_helper.c            |  7 ++-----
 target/i386/tcg/seg_helper.c        | 14 +++-----------
 target/i386/tcg/tcg-cpu.c           |  8 +++++---
 target/m68k/cpu.c                   |  2 +-
 target/m68k/op_helper.c             | 16 +++-------------
 target/microblaze/cpu.c             |  2 +-
 target/microblaze/helper.c          | 13 ++-----------
 target/mips/cpu.c                   |  2 +-
 target/mips/tcg/exception.c         | 18 ------------------
 target/mips/tcg/sysemu/tlb_helper.c | 18 ++++++++++++++++++
 target/mips/tcg/user/tlb_helper.c   |  5 -----
 target/nios2/cpu.c                  |  5 +++--
 target/openrisc/cpu.c               |  2 +-
 target/openrisc/interrupt.c         |  2 --
 target/ppc/cpu_init.c               |  2 +-
 target/ppc/excp_helper.c            | 21 +++------------------
 target/riscv/cpu.c                  |  2 +-
 target/riscv/cpu_helper.c           |  5 -----
 target/rx/cpu.c                     |  2 +-
 target/rx/helper.c                  |  4 ++++
 target/sh4/cpu.c                    |  2 +-
 target/sh4/helper.c                 |  9 ++-------
 target/sparc/cpu.c                  |  4 +++-
 target/xtensa/cpu.c                 |  2 +-
 target/xtensa/exc_helper.c          |  7 ++-----
 target/openrisc/meson.build         |  6 ++++--
 55 files changed, 138 insertions(+), 189 deletions(-)

-- 
2.31.1



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

end of thread, other threads:[~2021-09-04 23:42 UTC | newest]

Thread overview: 152+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02 15:16 [PATCH 00/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu Philippe Mathieu-Daudé
2021-09-02 15:16 ` Philippe Mathieu-Daudé
2021-09-02 15:16 ` [PATCH 01/24] target/xtensa: Restrict do_transaction_failed() " Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-02 20:09   ` Warner Losh
2021-09-02 20:09     ` Warner Losh
2021-09-03 18:54   ` Richard Henderson
2021-09-03 18:54     ` Richard Henderson
2021-09-02 15:16 ` [PATCH 02/24] target/i386: Restrict sysemu-only fpu_helper helpers Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-02 20:10   ` Warner Losh
2021-09-02 20:10     ` Warner Losh
2021-09-03 18:58   ` Richard Henderson
2021-09-03 18:58     ` Richard Henderson
2021-09-02 15:16 ` [PATCH 03/24] target/i386: Simplify TARGET_X86_64 #ifdef'ry Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-02 20:10   ` Warner Losh
2021-09-02 20:10     ` Warner Losh
2021-09-03 19:00   ` Richard Henderson
2021-09-03 19:00     ` Richard Henderson
2021-09-02 15:16 ` [RFC PATCH 04/24] accel/tcg: Rename user-mode do_interrupt hack as fake_user_exception Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-02 20:14   ` Warner Losh
2021-09-02 20:14     ` Warner Losh
2021-09-03 19:07   ` Richard Henderson
2021-09-03 19:07     ` Richard Henderson
2021-09-04 23:26     ` Philippe Mathieu-Daudé
2021-09-04 23:26       ` Philippe Mathieu-Daudé
2021-09-02 15:16 ` [PATCH 05/24] accel/tcg: Assert most of cpu_handle_interrupt() is sysemu-specific Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-03 19:08   ` Richard Henderson
2021-09-03 19:08     ` Richard Henderson
2021-09-02 15:16 ` [PATCH 06/24] target/alpha: Restrict cpu_exec_interrupt() handler to sysemu Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-02 20:15   ` Warner Losh
2021-09-02 20:15     ` Warner Losh
2021-09-03 19:09   ` Richard Henderson
2021-09-03 19:09     ` Richard Henderson
2021-09-02 15:16 ` [PATCH 07/24] target/arm: " Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-02 20:16   ` Warner Losh
2021-09-02 20:16     ` Warner Losh
2021-09-03 19:10   ` Richard Henderson
2021-09-03 19:10     ` Richard Henderson
2021-09-02 15:16 ` [PATCH 08/24] target/avr: " Philippe Mathieu-Daudé
2021-09-02 15:16   ` Philippe Mathieu-Daudé
2021-09-02 20:16   ` Warner Losh
2021-09-02 20:16     ` Warner Losh
2021-09-03 19:12   ` Richard Henderson
2021-09-03 19:12     ` Richard Henderson
2021-09-03 20:47     ` Philippe Mathieu-Daudé
2021-09-03 20:47       ` Philippe Mathieu-Daudé
2021-09-03 20:50       ` Richard Henderson
2021-09-03 20:50         ` Richard Henderson
2021-09-02 15:17 ` [PATCH 09/24] target/cris: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:17   ` Warner Losh
2021-09-02 20:17     ` Warner Losh
2021-09-03 19:12   ` Richard Henderson
2021-09-03 19:12     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 10/24] target/hppa: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:17   ` Warner Losh
2021-09-02 20:17     ` Warner Losh
2021-09-03 19:14   ` Richard Henderson
2021-09-03 19:14     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 11/24] target/i386: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:18   ` Warner Losh
2021-09-02 20:18     ` Warner Losh
2021-09-03 19:15   ` Richard Henderson
2021-09-03 19:15     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 12/24] target/m68k: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:19   ` Warner Losh
2021-09-02 20:19     ` Warner Losh
2021-09-03 19:16   ` Richard Henderson
2021-09-03 19:16     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 13/24] target/microblaze: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:20   ` Warner Losh
2021-09-02 20:20     ` Warner Losh
2021-09-03 19:16   ` Richard Henderson
2021-09-03 19:16     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 14/24] target/mips: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:21   ` Warner Losh
2021-09-02 20:21     ` Warner Losh
2021-09-03 19:17   ` Richard Henderson
2021-09-03 19:17     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 15/24] target/nios2: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:22   ` Warner Losh
2021-09-02 20:22     ` Warner Losh
2021-09-03 19:17   ` Richard Henderson
2021-09-03 19:17     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 16/24] target/openrisc: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:24   ` Warner Losh
2021-09-02 20:24     ` Warner Losh
2021-09-04 23:40     ` Philippe Mathieu-Daudé
2021-09-04 23:40       ` Philippe Mathieu-Daudé
2021-09-03 19:18   ` Richard Henderson
2021-09-03 19:18     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 17/24] target/ppc: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:24   ` Warner Losh
2021-09-02 20:24     ` Warner Losh
2021-09-03  0:48   ` David Gibson
2021-09-03  0:48     ` David Gibson
2021-09-03 19:19   ` Richard Henderson
2021-09-03 19:19     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 18/24] target/riscv: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:25   ` Warner Losh
2021-09-02 20:25     ` Warner Losh
2021-09-03 19:21   ` Richard Henderson
2021-09-03 19:21     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 19/24] target/sh4: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:25   ` Warner Losh
2021-09-02 20:25     ` Warner Losh
2021-09-03 19:22   ` Richard Henderson
2021-09-03 19:22     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 20/24] target/sparc: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:26   ` Warner Losh
2021-09-02 20:26     ` Warner Losh
2021-09-03 19:22   ` Richard Henderson
2021-09-03 19:22     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 21/24] target/rx: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:26   ` Warner Losh
2021-09-02 20:26     ` Warner Losh
2021-09-03 19:23   ` Richard Henderson
2021-09-03 19:23     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 22/24] target/xtensa: " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:26   ` Warner Losh
2021-09-02 20:26     ` Warner Losh
2021-09-03 19:24   ` Richard Henderson
2021-09-03 19:24     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 23/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() " Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-03 19:26   ` Richard Henderson
2021-09-03 19:26     ` Richard Henderson
2021-09-02 15:17 ` [PATCH 24/24] user: Remove cpu_get_pic_interrupt() stubs Philippe Mathieu-Daudé
2021-09-02 15:17   ` Philippe Mathieu-Daudé
2021-09-02 20:27   ` Warner Losh
2021-09-02 20:27     ` Warner Losh
2021-09-03 19:27   ` Richard Henderson
2021-09-03 19:27     ` Richard Henderson

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.