qemu/tests/tcg/x86_64
Ilya Leoshkevich 950936681f target/i386: Make translator stop before the end of a page
Right now translator stops right *after* the end of a page, which
breaks reporting of fault locations when the last instruction of a
multi-insn translation block crosses a page boundary.

An implementation, like the one arm and s390x have, would require an
i386 length disassembler, which is burdensome to maintain. Another
alternative would be to single-step at the end of a guest page, but
this may come with a performance impact.

Fix by snapshotting disassembly state and restoring it after we figure
out we crossed a page boundary. This includes rolling back cc_op
updates and emitted ops.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1143
Message-Id: <20220817150506.592862-4-iii@linux.ibm.com>
[rth: Simplify end-of-insn cross-page checks.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-09-06 08:04:26 +01:00
..
system Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
float_convd.ref tests/tcg: add float_convd test 2022-04-20 16:04:20 +01:00
float_convs.ref tests/tcg: add missing reference files for float_convs 2022-04-20 16:04:20 +01:00
Makefile.softmmu-target tests/plugins/insn: made arg inline not positional and parse it as bool 2021-09-02 11:29:34 +01:00
Makefile.target target/i386: Make translator stop before the end of a page 2022-09-06 08:04:26 +01:00
noexec.c target/i386: Make translator stop before the end of a page 2022-09-06 08:04:26 +01:00
vsyscall.c tests/tcg/x86_64: add vsyscall smoke test 2021-05-20 14:19:30 +02:00