All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Joelle van Dyne <j@getutm.app>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH] coroutine: add libucontext as external library
Date: Tue, 9 Mar 2021 15:38:50 +0000	[thread overview]
Message-ID: <YEeWimKd1QVd176N@stefanha-x1.localdomain> (raw)
In-Reply-To: <20210309032637.41778-1-j@getutm.app>

[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]

On Mon, Mar 08, 2021 at 07:26:36PM -0800, Joelle van Dyne wrote:
> iOS does not support ucontext natively for aarch64 and the sigaltstack is
> also unsupported (even worse, it fails silently, see:
> https://openradar.appspot.com/13002712 )
> 
> As a workaround we include a library implementation of ucontext and add it
> as a build option.
> 
> Signed-off-by: Joelle van Dyne <j@getutm.app>
> ---
>  configure                 | 21 ++++++++++++++++++---
>  meson.build               | 12 +++++++++++-
>  util/coroutine-ucontext.c |  9 +++++++++
>  .gitmodules               |  3 +++
>  MAINTAINERS               |  6 ++++++
>  meson_options.txt         |  2 ++
>  subprojects/libucontext   |  1 +
>  7 files changed, 50 insertions(+), 4 deletions(-)
>  create mode 160000 subprojects/libucontext
> 
> diff --git a/configure b/configure
> index 34fccaa2ba..5f225894a9 100755
> --- a/configure
> +++ b/configure
> @@ -1773,7 +1773,7 @@ Advanced options (experts only):
>    --oss-lib                path to OSS library
>    --cpu=CPU                Build for host CPU [$cpu]
>    --with-coroutine=BACKEND coroutine backend. Supported options:
> -                           ucontext, sigaltstack, windows
> +                           ucontext, libucontext, sigaltstack, windows

This approach mixes the concept of the coroutine backend (ucontext,
sigaltstack, etc) with the optional libucontext library dependency.

libucontext is not a coroutine backend. The patch had to introduce
$coroutine_impl in addition to $coroutine in order to work around this.
Let's avoid combining these two independent concepts into
--with-coroutine=.

I suggest treating libucontext as an optional library dependency in
./configure with explicit --enable-libucontext/--disable-libucontext
options. Most of the time neither option will be provided by the user
and ./configure should automatically decide whether libucontext is
needed or not.

> +case $coroutine in
> +libucontext)
> +  git_submodules="${git_submodules} subprojects/libucontext"
> +  mkdir -p libucontext

Why is this mkdir necessary?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2021-03-09 15:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09  3:26 [PATCH] coroutine: add libucontext as external library Joelle van Dyne
2021-03-09  9:35 ` Daniel P. Berrangé
2021-03-09  9:59   ` Joelle van Dyne
2021-03-09 10:20     ` Peter Maydell
2021-03-09 10:32       ` Daniel P. Berrangé
2021-03-09 10:24     ` Paolo Bonzini
2021-03-09 10:29       ` Daniel P. Berrangé
2021-03-09 10:42         ` Marc-André Lureau
2021-03-09 10:48           ` Paolo Bonzini
2021-03-09 15:38 ` Stefan Hajnoczi [this message]
2021-03-09 18:24   ` Joelle van Dyne
2021-03-09 21:21     ` Joelle van Dyne
2021-03-10  9:29       ` Daniel P. Berrangé
2021-03-10 16:32         ` 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=YEeWimKd1QVd176N@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=j@getutm.app \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 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.