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 v3 0/7] iOS and Apple Silicon host support
Date: Tue, 27 Oct 2020 20:06:54 -0700	[thread overview]
Message-ID: <20201028030701.14086-1-j@getutm.app> (raw)

Based-on: 20201026191540.12434-1-j@getutm.app
([PATCH RESEND 0/4] Mirror map JIT memory for TCG)

These set of changes brings QEMU TCG to iOS devices and future Apple Silicon
devices. They were originally developed last year and have been working in the
UTM app. Recently, we ported the changes to master, re-wrote a lot of the build
script changes for meson, and broke up the patches into more distinct units.

A summary of the changes:

* `CONFIG_IOS` defined when building for iOS and iOS specific changes (as well
  as unsupported code) are gated behind it.
* A new dependency, libucontext is added since iOS does not have native ucontext
  and broken support for sigaltstack. libucontext is available as a new option
  for coroutine backend.
* On stock iOS devices, there is a workaround for running JIT code without
  any special entitlement. It requires the JIT region to be mirror mapped with
  one region RW and another one RX. To support this style of JIT, TCG is changed
  to support writing to a different code_ptr. This change is submitted in a
  different patch set and this one depends on it.
* For (recent) jailbroken iOS devices as well as upcoming Apple Silicon devices,
  there are new rules for applications supporting JIT (with the proper
  entitlement). These rules are implemented as well.

Since v3:

* Moved mirror JIT support to a different patch set.
* Removed dependency on `pthread_jit_write_protect_np` because it was redundent
  and also crashes if called on a non-jailbroken iOS device.
* Removed `--enable-cross-compile` option
* Fixed checkpatch errors
* Fixed iOS build on master due to new test recently added which calls system()

Since v2:

* Changed getting mirror pointer from a macro to inline functions
* Split constification of TCG code pointers to separate patch
* Removed slirp updates (will send future patch once slirp changes are in)
* Removed shared library patch (will send future patch)

-j

Joelle van Dyne (7):
  configure: option to disable host block devices
  configure: cross-compiling with empty cross_prefix
  qemu: add support for iOS host
  coroutine: add libucontext as external library
  slirp: update build flags for iOS resolv fix
  tcg: implement JIT for iOS and Apple Silicon
  block: check availablity for preadv/pwritev on mac

 docs/devel/index.rst           |   1 +
 docs/devel/ios.rst             |  39 ++++++++++++
 configure                      |  77 ++++++++++++++++++++++--
 meson.build                    |  34 ++++++++++-
 include/exec/exec-all.h        |   2 +
 include/tcg/tcg-apple-jit.h    | 106 +++++++++++++++++++++++++++++++++
 include/tcg/tcg.h              |   3 +
 tcg/aarch64/tcg-target.h       |   7 +++
 accel/tcg/cpu-exec-common.c    |   2 +
 accel/tcg/cpu-exec.c           |   2 +
 accel/tcg/translate-all.c      |  87 ++++++++++++++++++++++++++-
 block.c                        |   2 +-
 block/file-posix.c             |  51 ++++++++++++----
 net/slirp.c                    |  16 ++---
 qga/commands-posix.c           |   6 ++
 target/arm/arm-semi.c          |   2 +
 target/m68k/m68k-semi.c        |   2 +
 target/nios2/nios2-semi.c      |   2 +
 tcg/tcg.c                      |   4 ++
 tests/qtest/libqos/virtio-9p.c |   8 +++
 util/coroutine-ucontext.c      |   9 +++
 .gitmodules                    |   3 +
 libucontext                    |   1 +
 meson_options.txt              |   2 +
 tests/qtest/meson.build        |   7 +--
 25 files changed, 440 insertions(+), 35 deletions(-)
 create mode 100644 docs/devel/ios.rst
 create mode 100644 include/tcg/tcg-apple-jit.h
 create mode 160000 libucontext

-- 
2.28.0



             reply	other threads:[~2020-10-28  3:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  3:06 Joelle van Dyne [this message]
2020-10-28  3:06 ` [PATCH v3 1/7] configure: option to disable host block devices Joelle van Dyne
2020-10-28 11:22   ` Stefan Hajnoczi
2020-10-29  0:51     ` Joelle van Dyne
2020-10-28  3:06 ` [PATCH v3 2/7] configure: cross-compiling with empty cross_prefix Joelle van Dyne
2020-10-28  3:06 ` [PATCH v3 3/7] qemu: add support for iOS host Joelle van Dyne
2020-10-28 11:39   ` Stefan Hajnoczi
2020-10-29  0:55     ` Joelle van Dyne
2020-10-29  7:47       ` Stefan Hajnoczi
2020-10-28  3:06 ` [PATCH v3 4/7] coroutine: add libucontext as external library Joelle van Dyne
2020-10-28 11:47   ` Stefan Hajnoczi
2020-10-29  0:59     ` Joelle van Dyne
2020-10-29  7:08       ` Stefan Hajnoczi
2020-10-28  3:06 ` [PATCH v3 5/7] slirp: update build flags for iOS resolv fix Joelle van Dyne
2020-10-28 11:48   ` Stefan Hajnoczi
2020-10-28  3:07 ` [PATCH v3 6/7] tcg: implement JIT for iOS and Apple Silicon Joelle van Dyne
2020-10-28 11:53   ` Stefan Hajnoczi
2020-10-29  1:04     ` Joelle van Dyne
2020-10-29  8:13       ` Stefan Hajnoczi
2020-10-28  3:07 ` [PATCH v3 7/7] block: check availablity for preadv/pwritev on mac Joelle van Dyne
2020-10-28 11:59   ` Stefan Hajnoczi
2020-10-29  1:07     ` Joelle van Dyne
2020-10-29  7:53       ` Stefan Hajnoczi
2020-10-29  8:33         ` Joelle van Dyne
2020-10-28 12:05 ` [PATCH v3 0/7] iOS and Apple Silicon host support Stefan Hajnoczi

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