qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@csgraf.de>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: Roman Bolshakov <r.bolshakov@yadro.com>, j@getutm.app
Subject: Re: [PATCH v4] tcg: Toggle page execution for Apple Silicon
Date: Thu, 21 Jan 2021 21:06:48 +0100	[thread overview]
Message-ID: <c3913168-874a-cf6c-801f-5f61ff8d685f@csgraf.de> (raw)
In-Reply-To: <6d5d9d93-30b6-2f71-e71b-94bd8f18198a@csgraf.de>


On 21.01.21 21:01, Alexander Graf wrote:
> On 21.01.21 19:47, Richard Henderson wrote:
>> From: Roman Bolshakov <r.bolshakov@yadro.com>
>>
>> Pages can't be both write and executable at the same time on Apple
>> Silicon. macOS provides public API to switch write protection [1] for
>> JIT applications, like TCG.
>>
>> 1. https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon
>>
>> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
>> Message-Id: <20210113032806.18220-1-r.bolshakov@yadro.com>
>> [rth: Inline the qemu_thread_jit_* functions;
>>  drop the MAP_JIT change for a follow-on patch.]
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>
>> Supercedes: <20210113032806.18220-1-r.bolshakov@yadro.com>
>>
>> This is the version of Roman's patch that I'm queuing to tcg-next.
>> What's missing from the full "Fix execution" patch is setting MAP_JIT
>> for !splitwx in alloc_code_gen_buffer().
>
> This patch segfaults in tcg_out32() for me if I add the MAP_JIT flag
> manually to the mmap call:


I take it all back. I forgot to actually git am the patch :(. It works
just fine.

Tested-by: Alexander Graf <agraf@csgraf.de>


Alex




  reply	other threads:[~2021-01-21 20:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 18:47 [PATCH v4] tcg: Toggle page execution for Apple Silicon Richard Henderson
2021-01-21 20:01 ` Alexander Graf
2021-01-21 20:06   ` Alexander Graf [this message]
2021-01-23 11:53 ` Roman Bolshakov
2021-01-23 18:04   ` Roman Bolshakov
2021-01-23 18:33     ` BALATON Zoltan
2021-01-23 18:49       ` Roman Bolshakov

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=c3913168-874a-cf6c-801f-5f61ff8d685f@csgraf.de \
    --to=agraf@csgraf.de \
    --cc=j@getutm.app \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --cc=richard.henderson@linaro.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).