On 21.01.21 21:01, Alexander Graf wrote: > On 21.01.21 19:47, Richard Henderson wrote: >> From: Roman Bolshakov <r.bolsha...@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.bolsha...@yadro.com> >> Message-Id: <20210113032806.18220-1-r.bolsha...@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.hender...@linaro.org> >> --- >> >> Supercedes: <20210113032806.18220-1-r.bolsha...@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 <ag...@csgraf.de> Alex