Re: [PATCH RFC 1/1] accel/tcg: Clear PAGE_WRITE before translation

2021-08-05 Thread Ilya Leoshkevich
On Thu, 2021-08-05 at 06:59 -1000, Richard Henderson wrote: > On 8/5/21 12:56 AM, Ilya Leoshkevich wrote: > > On Wed, 2021-08-04 at 14:30 -1000, Richard Henderson wrote: > > > I think that the translator_ld*_swap functions should be moved > > > out of > > > include/exec/translator.h into accel/tcg/

Re: [PATCH RFC 1/1] accel/tcg: Clear PAGE_WRITE before translation

2021-08-05 Thread Richard Henderson
On 8/5/21 12:56 AM, Ilya Leoshkevich wrote: On Wed, 2021-08-04 at 14:30 -1000, Richard Henderson wrote: I think that the translator_ld*_swap functions should be moved out of include/exec/translator.h into accel/tcg/translator.c. Do we really need this? In the end, the added code is not that la

Re: [PATCH RFC 1/1] accel/tcg: Clear PAGE_WRITE before translation

2021-08-05 Thread Ilya Leoshkevich
On Wed, 2021-08-04 at 14:30 -1000, Richard Henderson wrote: > On 8/4/21 12:46 PM, Ilya Leoshkevich wrote: > > translate_insn() implementations fetch instruction bytes piecemeal, > > which can cause qemu-user to generate inconsistent translations if > > another thread modifies them concurrently [1].

Re: [PATCH RFC 1/1] accel/tcg: Clear PAGE_WRITE before translation

2021-08-04 Thread Richard Henderson
On 8/4/21 12:46 PM, Ilya Leoshkevich wrote: translate_insn() implementations fetch instruction bytes piecemeal, which can cause qemu-user to generate inconsistent translations if another thread modifies them concurrently [1]. Fix by marking translation block pages non-writable earlier. [1] http

[PATCH RFC 1/1] accel/tcg: Clear PAGE_WRITE before translation

2021-08-04 Thread Ilya Leoshkevich
translate_insn() implementations fetch instruction bytes piecemeal, which can cause qemu-user to generate inconsistent translations if another thread modifies them concurrently [1]. Fix by marking translation block pages non-writable earlier. [1] https://lists.nongnu.org/archive/html/qemu-devel/2