qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/10] tcg: support JIT on Apple Silicon


From: Peter Maydell
Subject: Re: [PATCH 09/10] tcg: support JIT on Apple Silicon
Date: Tue, 13 Oct 2020 15:09:44 +0100

On Tue, 13 Oct 2020 at 14:58, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 13/10/20 01:29, Joelle van Dyne wrote:
> > From: osy <osy86@users.noreply.github.com>
> >
> > https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon
> >
> > For < iOS 14, reverse engineered functions from libsystem_pthread.dylib is
> > implemented to handle APRR supported SoCs.
> >
> > The following rules apply for JIT write protect:
> >   * JIT write-protect is enabled before tcg_qemu_tb_exec()
> >   * JIT write-protect is disabled after tcg_qemu_tb_exec() returns
> >   * JIT write-protect is disabled inside do_tb_phys_invalidate() but if it
> >     is called inside of tcg_qemu_tb_exec() then write-protect will be
> >     enabled again before returning.
> >   * JIT write-protect is disabled by cpu_loop_exit() for interrupt handling.
> >   * JIT write-protect is disabled everywhere else.
> >
> > Signed-off-by: Joelle van Dyne <j@getutm.app>
>
> Can this be emulated somehow on other platforms (such as Linux) so that
> it does not bitrot?

Some of it is write^execute, which we could test via OpenBSD
I think if we updated our VM image not to mount the disk
with that protection disabled. Having "generically support
w^x" be separate from "iOS specifics" might be useful.

The apple.com webpage linked above suggests also that we could
test some at least of these APIs on our OSX builds if we
enable the "hardened runtime" on x86 (though that might also
enable other stuff we don't want to deal with? no idea)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]