Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Joelle van Dyne
The MTTCG issue is known and I’ve only used multiple core emulation with single core. I haven’t tried your patch yet but I plan to when I get time next week. I’m surprised because it’s (your v1 patchset) exactly what I had originally before hitting crashes and having to add the calls to more place

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Roman Bolshakov
On Sun, Jan 03, 2021 at 08:46:27AM -0800, Joelle van Dyne wrote: > Can you test with a low memory (-m 512) and also with single threaded > SMP (-smp 4)? Wondering if you're hitting all the edge cases because > there's oddities with cache flushing (can be done both in code gen and > code exec) and i

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Joelle van Dyne
Can you test with a low memory (-m 512) and also with single threaded SMP (-smp 4)? Wondering if you're hitting all the edge cases because there's oddities with cache flushing (can be done both in code gen and code exec) and interrupt handling that caused issues for me. -j On Sun, Jan 3, 2021 at

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Roman Bolshakov
On Sat, Jan 02, 2021 at 11:55:29AM -0800, Joelle van Dyne wrote: > I see you didn't touch cpu_loop_exit() and I'm curious how async > interrupts are handled. Have you tested this and it works i.e. booting > Windows 7 or Ubuntu 20.04? Also I've seen do_tb_phys_invalidate() > called both from code ge

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-02 Thread Joelle van Dyne
I see you didn't touch cpu_loop_exit() and I'm curious how async interrupts are handled. Have you tested this and it works i.e. booting Windows 7 or Ubuntu 20.04? Also I've seen do_tb_phys_invalidate() called both from code generation context (write unlocked) and execution context (write locked), h

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-02 Thread Roman Bolshakov
On Sat, Jan 02, 2021 at 03:21:02PM +0300, Roman Bolshakov wrote: > 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_sili

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210102122101.39617-1-r.bolsha...@yadro.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210102122101.39617-1-r.bolsha...@yadro.com Subject: [PATCH] tcg: Fix execution on

[PATCH] tcg: Fix execution on Apple Silicon

2021-01-02 Thread Roman Bolshakov
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 Bol