qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v3 00/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu
Date: Sat, 11 Sep 2021 18:54:10 +0200	[thread overview]
Message-ID: <20210911165434.531552-1-f4bug@amsat.org> (raw)

[Series fully reviewed]

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.

Since v2:
- Rebased due to bsd-user conflict (merge 99c44988d5b)
- Added R-b

Since v1:
- Addressed Richard comments (drop AVR patch, remove assert)
- Added R-b

Philippe Mathieu-Daudé (24):
  target/avr: Remove pointless use of CONFIG_USER_ONLY definition
  target/i386: Restrict sysemu-only fpu_helper helpers
  target/i386: Simplify TARGET_X86_64 #ifdef'ry
  target/xtensa: Restrict do_transaction_failed() to sysemu
  accel/tcg: Rename user-mode do_interrupt hack as fake_user_interrupt
  target/alpha: Restrict cpu_exec_interrupt() handler to sysemu
  target/arm: 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/i386: Move x86_cpu_exec_interrupt() under sysemu/ folder
  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/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/i386/target_arch_cpu.c     |  5 --
 bsd-user/x86_64/target_arch_cpu.c   |  5 --
 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                    |  3 --
 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        | 74 +----------------------------
 target/i386/tcg/sysemu/seg_helper.c | 65 +++++++++++++++++++++++++
 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, 196 insertions(+), 256 deletions(-)

-- 
2.31.1



             reply	other threads:[~2021-09-11 16:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11 16:54 Philippe Mathieu-Daudé [this message]
2021-09-11 16:54 ` [PATCH v3 01/24] target/avr: Remove pointless use of CONFIG_USER_ONLY definition Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 02/24] target/i386: Restrict sysemu-only fpu_helper helpers Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 03/24] target/i386: Simplify TARGET_X86_64 #ifdef'ry Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 04/24] target/xtensa: Restrict do_transaction_failed() to sysemu Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 05/24] accel/tcg: Rename user-mode do_interrupt hack as fake_user_interrupt Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 06/24] target/alpha: Restrict cpu_exec_interrupt() handler to sysemu Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 07/24] target/arm: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 08/24] target/cris: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 09/24] target/hppa: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 10/24] target/i386: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 11/24] target/i386: Move x86_cpu_exec_interrupt() under sysemu/ folder Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 12/24] target/m68k: Restrict cpu_exec_interrupt() handler to sysemu Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 13/24] target/microblaze: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 14/24] target/mips: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 15/24] target/nios2: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 16/24] target/openrisc: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 17/24] target/ppc: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 18/24] target/riscv: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 19/24] target/sh4: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 20/24] target/sparc: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 21/24] target/rx: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 22/24] target/xtensa: " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 23/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() " Philippe Mathieu-Daudé
2021-09-11 16:54 ` [PATCH v3 24/24] user: Remove cpu_get_pic_interrupt() stubs Philippe Mathieu-Daudé
2021-09-12 19:50 ` [PATCH v3 00/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210911165434.531552-1-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).