qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, Joelle van Dyne <j@getutm.app>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"open list:Block layer core" <qemu-block@nongnu.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Roman Bolshakov" <r.bolshakov@yadro.com>,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v6 3/7] qemu: add support for iOS host
Date: Tue, 28 Nov 2023 16:12:14 +0100	[thread overview]
Message-ID: <edc0e1a9-604a-4d05-bf27-ad701ed14829@linaro.org> (raw)
In-Reply-To: <CAFEAcA-GArVcXbL6-r7jOsOzQ9SOiVByztzTpj+SUp0XahtNNw@mail.gmail.com>

(Cc'ing Ariadne, libucontext maintainer)

On 21/1/21 19:53, Peter Maydell wrote:
> On Tue, 5 Jan 2021 at 02:25, Joelle van Dyne <j@getutm.app> wrote:
>>
>> This introduces support for building for iOS hosts. When the correct Xcode
>> toolchain is used, iOS host will be detected automatically.
>>
>> * block: disable features not supported by iOS sandbox
>> * slirp: disable SMB features for iOS
>> * osdep: disable system() calls for iOS
> 
>> +``ucontext`` support is broken on iOS. The implementation from ``libucontext``
>> +is used instead.
> 
> Just a note since it came up in another thread today, but
> looking at libucontext its aarch64 backend doesn't handle
> the floating point registers. I think if the *context
> routines don't save/restore the callee-saves fp regs
> (v8-v15, FPCR) then it's liable to result in tricky-to-track
> down bugs where some kept-in-a-callee-saves-fp-register data
> from a function further up the callstack gets corrupted, depending
> on what the compiler happens to do. It would be good to work with
> the libucontext maintainers to add that functionality.

Per https://github.com/kaniini/libucontext/blob/master/README.md#caveats
this is a design choice:

   Only basic GPR registers are saved and restored when context swapping.
   The glibc implementation uses hardware capability detection to
   save/restore other register groups, such as the FPU registers or
   vector processing (AltiVec/AVX/NEON) registers. Adding this capability
   detection would significantly increase the complexity of the project
   and thus is not implemented. Support for compiling in code to
   save/restore FPU registers or vector registers may be added in a later
   release as a build-time setting -- for now, we assume a soft-float ABI
   with no optional processor features.

Minor update in 2022:
https://github.com/kaniini/libucontext/commit/5244775fb93ab9

   This is a work in progress, as newer compilers will spill even
   non-floating-point state through floating point registers when allowed
   to do so.

Regards,

Phil.


  reply	other threads:[~2023-11-28 15:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05  2:20 [PATCH v6 0/7] iOS and Apple Silicon host support Joelle van Dyne
2021-01-05  2:20 ` [PATCH v6 1/7] configure: option to disable host block devices Joelle van Dyne
2021-01-05  2:20 ` [PATCH v6 2/7] configure: cross-compiling with empty cross_prefix Joelle van Dyne
2021-01-05  2:20 ` [PATCH v6 3/7] qemu: add support for iOS host Joelle van Dyne
2021-01-12 11:56   ` Philippe Mathieu-Daudé
2021-01-12 22:18     ` Joelle van Dyne
2021-01-12 15:03   ` Peter Maydell
2021-01-12 22:37     ` Joelle van Dyne
2021-01-21 18:53   ` Peter Maydell
2023-11-28 15:12     ` Philippe Mathieu-Daudé [this message]
2021-01-05  2:20 ` [PATCH v6 4/7] coroutine: add libucontext as external library Joelle van Dyne
2021-01-21 16:17   ` Daniel P. Berrangé
2021-01-21 17:11     ` Joelle van Dyne
2021-01-05  2:20 ` [PATCH v6 5/7] configure: cross compile should use x86_64 cpu_family Joelle van Dyne
2021-01-12 11:46   ` Philippe Mathieu-Daudé
2021-01-05  2:20 ` [PATCH v6 6/7] slirp: update build flags for iOS resolv fix Joelle van Dyne
2021-01-12 11:52   ` Philippe Mathieu-Daudé
2021-01-14 11:07     ` [Slirp] " Marc-André Lureau
2021-01-05  2:20 ` [PATCH v6 7/7] block: check availablity for preadv/pwritev on mac Joelle van Dyne
2021-01-12 11:01 ` [PATCH v6 0/7] iOS and Apple Silicon host support Peter Maydell
2021-01-12 22:05   ` 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=edc0e1a9-604a-4d05-bf27-ad701ed14829@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=j@getutm.app \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /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).