[Top][All Lists]

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

Re: [PATCH v4] tcg: Toggle page execution for Apple Silicon

From: Alexander Graf
Subject: Re: [PATCH v4] tcg: Toggle page execution for Apple Silicon
Date: Thu, 21 Jan 2021 21:06:48 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

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>


reply via email to

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