qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Joelle van Dyne <j@getutm.app>
To: qemu-devel@nongnu.org
Subject: [PATCH 0/4] Mirror map JIT memory for TCG
Date: Mon, 26 Oct 2020 10:25:31 -0700	[thread overview]
Message-ID: <20201026172535.10419-1-j@getutm.app> (raw)

To aid in debugging TCG, we enable a "mirror map" feature that, when enabled,
will use memfd_create() to create two mappings of the same memory for RW and RX.
The feature is only built when targeting system emulation on Linux and
configured with --enable-debug-tcg. It can be disabled with the runtime argument
`-accel tcg,mirror-jit=off`.

Although this patch only enables this feature for Linux, the main goal of this
is to enable, through a future patch, iOS JIT on older devices which require
strict W^X separation.

-j

Joelle van Dyne (4):
  tcg: add const hints for code pointers
  tcg: implement mirror mapped JIT for Linux
  tcg: use mirror map JIT in code generation
  tcg: make mirror mapped JIT optional

 configure                    |  13 +++++
 meson.build                  |   1 +
 include/exec/exec-all.h      |   8 +++
 include/sysemu/tcg.h         |   2 +-
 include/tcg/tcg.h            |  26 +++++++--
 tcg/aarch64/tcg-target.h     |  18 +++++-
 tcg/arm/tcg-target.h         |  15 ++++-
 tcg/i386/tcg-target.h        |  26 ++++++++-
 tcg/mips/tcg-target.h        |  12 +++-
 tcg/ppc/tcg-target.h         |  12 +++-
 tcg/riscv/tcg-target.h       |  13 ++++-
 tcg/s390/tcg-target.h        |  17 +++++-
 tcg/sparc/tcg-target.h       |  12 +++-
 tcg/tci/tcg-target.h         |   9 ++-
 accel/tcg/cpu-exec.c         |   7 ++-
 accel/tcg/tcg-all.c          |  31 +++++++++-
 accel/tcg/translate-all.c    | 106 +++++++++++++++++++++++++++++------
 bsd-user/main.c              |   2 +-
 linux-user/main.c            |   2 +-
 tcg/tcg.c                    |  60 +++++++++++++-------
 qemu-options.hx              |  11 ++++
 tcg/aarch64/tcg-target.c.inc |  48 +++++++++-------
 tcg/arm/tcg-target.c.inc     |  33 ++++++-----
 tcg/i386/tcg-target.c.inc    |  28 ++++-----
 tcg/mips/tcg-target.c.inc    |  64 ++++++++++++---------
 tcg/ppc/tcg-target.c.inc     |  57 ++++++++++++-------
 tcg/riscv/tcg-target.c.inc   |  51 +++++++++--------
 tcg/s390/tcg-target.c.inc    |  25 +++++----
 tcg/sparc/tcg-target.c.inc   |  33 ++++++-----
 tcg/tcg-ldst.c.inc           |   2 +-
 tcg/tcg-pool.c.inc           |   9 +--
 tcg/tci/tcg-target.c.inc     |   8 +--
 32 files changed, 555 insertions(+), 206 deletions(-)

-- 
2.28.0



             reply	other threads:[~2020-10-26 17:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 17:25 Joelle van Dyne [this message]
2020-10-26 17:25 ` [PATCH 1/4] tcg: add const hints for code pointers Joelle van Dyne
2020-10-26 17:25 ` [PATCH 2/4] tcg: implement mirror mapped JIT for Linux Joelle van Dyne
2020-10-26 17:25 ` [PATCH 3/4] tcg: use mirror map JIT in code generation Joelle van Dyne
2020-10-26 17:25 ` [PATCH 4/4] tcg: make mirror mapped JIT optional Joelle van Dyne

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=20201026172535.10419-1-j@getutm.app \
    --to=j@getutm.app \
    --cc=qemu-devel@nongnu.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).