[PATCH v6 0/7] iOS and Apple Silicon host support

Joelle van Dyne posted 7 patches 3 years, 4 months ago
Test checkpatch passed
Failed in applying to current master (apply log)
There is a newer version of this series
docs/devel/index.rst      |  1 +
docs/devel/ios.rst        | 28 ++++++++++++++
configure                 | 81 +++++++++++++++++++++++++++++++++++----
meson.build               | 16 +++++++-
qapi/block-core.json      | 10 +++--
include/qemu/osdep.h      | 11 ++++++
block.c                   |  2 +-
block/file-posix.c        | 74 ++++++++++++++++++++++++++++-------
net/slirp.c               | 16 ++++----
qga/commands-posix.c      |  6 +++
util/coroutine-ucontext.c |  9 +++++
.gitmodules               |  3 ++
MAINTAINERS               |  7 ++++
meson_options.txt         |  2 +
subprojects/libucontext   |  1 +
tests/qtest/meson.build   |  7 ++--
16 files changed, 236 insertions(+), 38 deletions(-)
create mode 100644 docs/devel/ios.rst
create mode 160000 subprojects/libucontext
[PATCH v6 0/7] iOS and Apple Silicon host support
Posted by Joelle van Dyne 3 years, 4 months ago
Based-on: 20201214140314.18544-1-richard.henderson@linaro.org
([PATCH v4 00/43] 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.

Since v6:

* Dropped the Apple Silicon JIT support patch (superseded by another patchset)
* Changed libucontext to be a Meson subproject
* Cache availablity check for preadv/pwritev on macOS 11 and iOS 14

Since v5:

* Fixed some more instances of QAPI define of CONFIG_HOST_BLOCK_DEVICE
* Fixed libucontext build on newer version of GCC

Since v4:

* Updated QAPI schema for CONFIG_HOST_BLOCK_DEVICE
* Updated maintainers file for iOS host support
* Moved system() changes to osdep.h
* Fixed typo in libucontext meson.build change

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
  configure: cross compile should use x86_64 cpu_family
  slirp: update build flags for iOS resolv fix
  block: check availablity for preadv/pwritev on mac

 docs/devel/index.rst      |  1 +
 docs/devel/ios.rst        | 28 ++++++++++++++
 configure                 | 81 +++++++++++++++++++++++++++++++++++----
 meson.build               | 16 +++++++-
 qapi/block-core.json      | 10 +++--
 include/qemu/osdep.h      | 11 ++++++
 block.c                   |  2 +-
 block/file-posix.c        | 74 ++++++++++++++++++++++++++++-------
 net/slirp.c               | 16 ++++----
 qga/commands-posix.c      |  6 +++
 util/coroutine-ucontext.c |  9 +++++
 .gitmodules               |  3 ++
 MAINTAINERS               |  7 ++++
 meson_options.txt         |  2 +
 subprojects/libucontext   |  1 +
 tests/qtest/meson.build   |  7 ++--
 16 files changed, 236 insertions(+), 38 deletions(-)
 create mode 100644 docs/devel/ios.rst
 create mode 160000 subprojects/libucontext

-- 
2.28.0


Re: [PATCH v6 0/7] iOS and Apple Silicon host support
Posted by Peter Maydell 3 years, 4 months ago
On Tue, 5 Jan 2021 at 02:23, Joelle van Dyne <j@getutm.app> wrote:
>
> Based-on: 20201214140314.18544-1-richard.henderson@linaro.org
> ([PATCH v4 00/43] 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.
>
> Since v6:
>
> * Dropped the Apple Silicon JIT support patch (superseded by another patchset)
> * Changed libucontext to be a Meson subproject
> * Cache availablity check for preadv/pwritev on macOS 11 and iOS 14

So is this series now purely iOS support, or are there still
some pieces of it that are needed for Mac systems with Apple silicon ?

thanks
-- PMM

Re: [PATCH v6 0/7] iOS and Apple Silicon host support
Posted by Joelle van Dyne 3 years, 4 months ago
After decoupling the MAP_JIT and APRR patches, this should only be for
iOS support. I didn't change the title because I didn't know if
patchew would be smart enough to group it with the older patches.

-j

On Tue, Jan 12, 2021 at 3:01 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 5 Jan 2021 at 02:23, Joelle van Dyne <j@getutm.app> wrote:
> >
> > Based-on: 20201214140314.18544-1-richard.henderson@linaro.org
> > ([PATCH v4 00/43] 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.
> >
> > Since v6:
> >
> > * Dropped the Apple Silicon JIT support patch (superseded by another patchset)
> > * Changed libucontext to be a Meson subproject
> > * Cache availablity check for preadv/pwritev on macOS 11 and iOS 14
>
> So is this series now purely iOS support, or are there still
> some pieces of it that are needed for Mac systems with Apple silicon ?
>
> thanks
> -- PMM