tests/tcg/x86_64: Add cross-modifying code test
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 23 Oct 2024 11:33:55 +0000 (12:33 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Thu, 24 Oct 2024 08:56:21 +0000 (09:56 +0100)
commitb6a48d2a4b9341f46061a59a94cd402e03381177
tree6ff281c48e22a0a131196b575d12590cab1fe5a0
parent7f117cbb464b2e25f3de25e7487e495c29a4ea03
tests/tcg/x86_64: Add cross-modifying code test

commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before translation")
fixed cross-modifying code handling, but did not add a test. The
changed code was further improved recently [1], and I was not sure
whether these modifications were safe (spoiler: they were fine).

Add a test to make sure there are no regressions.

[1] https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg00034.html

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20241001150617.9977-1-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20241023113406.1284676-8-alex.bennee@linaro.org>
tests/tcg/x86_64/Makefile.target
tests/tcg/x86_64/cross-modifying-code.c [new file with mode: 0644]