accel/tcg/user-exec: Fix read-modify-write of code on s390 hosts
commitdb17d2cdb1a10e6fa8aa02de167546c17c893c3c
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 3 Aug 2021 22:16:06 +0000 (4 00:16 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 14 Sep 2021 19:00:21 +0000 (14 12:00 -0700)
tree44f4083e1a27650814c359fd07506363338399b4
parent76d0042bb2a7601e7a343fd2ff02902658f8a97a
accel/tcg/user-exec: Fix read-modify-write of code on s390 hosts

x86_64 dotnet/runtime uses cmpxchg for code patching. When running it
under s390x qemu-linux user, cpu_signal_handler() does not recognize
this as a write and does not restore PAGE_WRITE cleared by
tb_page_add(), incorrectly forwarding the signal to the guest code.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210803221606.150103-1-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/user-exec.c