unicorn/qemu
Sergey Fedorov 73c59faad5
tcg: Clean up direct block chaining safety checks
We don't take care of direct jumps when address mapping changes. Thus we
must be sure to generate direct jumps so that they always keep valid
even if address mapping changes. Luckily, we can only allow to execute a
TB if it was generated from the pages which match with current mapping.

Document tcg_gen_goto_tb() declaration and note the reason for
destination PC limitations.

Some targets with variable length instructions allow TB to straddle a
page boundary. However, we make sure that both of TB pages match the
current address mapping when looking up TBs. So it is safe to do direct
jumps into the both pages. Correct the checks for some of those targets.

Given that, we can safely patch a TB which spans two pages. Remove the
unnecessary check in cpu_exec() and allow such TBs to be patched.

Backports commit 5b053a4a28278bca606eeff7d1c0730df1b047e9 from qemu
2018-02-23 22:26:00 -05:00
..
crypto
default-configs
docs
fpu fpu: silence warnings 2018-02-22 09:52:28 -05:00
hw util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
include tcg: Clarify thread safety check in tb_add_jump() 2018-02-23 21:32:47 -05:00
qapi qapi: Change visit_type_FOO() to no longer return partial objects 2018-02-23 19:53:17 -05:00
qobject util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
qom qapi: Use strict QMP input visitor in more places 2018-02-23 15:11:35 -05:00
scripts qapi: Change visit_type_FOO() to no longer return partial objects 2018-02-23 19:53:17 -05:00
target-arm tcg: Clean up direct block chaining safety checks 2018-02-23 22:26:00 -05:00
target-i386 tcg: Clean up direct block chaining safety checks 2018-02-23 22:26:00 -05:00
target-m68k tcg: Clean up direct block chaining safety checks 2018-02-23 22:26:00 -05:00
target-mips tb: consistently use uint32_t for tb->flags 2018-02-23 21:28:11 -05:00
target-sparc tb: consistently use uint32_t for tb->flags 2018-02-23 21:28:11 -05:00
tcg tcg: Clean up direct block chaining safety checks 2018-02-23 22:26:00 -05:00
util util: align memory allocations to 2M on AArch64 2018-02-23 13:56:59 -05:00
aarch64.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
aarch64eb.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
accel.c
arm.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
armeb.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
CODING_STYLE
configure config.status: Pass extra parameters 2018-02-22 10:12:54 -05:00
COPYING
COPYING.LIB
cpu-exec-common.c
cpu-exec.c tcg: Clean up direct block chaining safety checks 2018-02-23 22:26:00 -05:00
cpus.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cputlb.c cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
exec.c include/exec: Move cputlb exec.c defs out 2018-02-23 10:52:25 -05:00
gen_all_header.sh
glib_compat.c glib_compat: backport hashtable iterator interfaces 2018-02-21 13:18:44 -05:00
HACKING
header_gen.py cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
ioport.c
LICENSE
m68k.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
Makefile
Makefile.objs
Makefile.target tcg: split tcg_op_defs to -common 2018-02-17 15:23:51 -05:00
memory_mapping.c include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
memory.c include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
mips64.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
mips64el.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
mips.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
mipsel.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
powerpc.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
qapi-schema.json
qemu-log.c log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
qemu-timer.c
rules.mak
softmmu_template.h
sparc64.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
sparc.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00
tcg-runtime.c
translate-all.c tcg: Clean up tb_jmp_unlink() 2018-02-23 21:40:07 -05:00
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
vl.h
x86_64.h cputlb: move CPU_LOOP() for tlb_reset() to exec.c 2018-02-23 10:46:31 -05:00