unicorn/qemu/target-i386
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
..
arch_memory_mapping.c x86: Clean up includes 2018-02-19 01:00:09 -05:00
bpt_helper.c x86: Clean up includes 2018-02-19 01:00:09 -05:00
cc_helper_template.h
cc_helper.c target-i386: Perform set/reset_inhibit_irq inline 2018-02-20 13:34:47 -05:00
cpu-qom.h
cpu.c target-i386: implement PKE for TCG 2018-02-22 10:18:55 -05:00
cpu.h tb: consistently use uint32_t for tb->flags 2018-02-23 21:28:11 -05:00
excp_helper.c x86: Clean up includes 2018-02-19 01:00:09 -05:00
fpu_helper.c target-i386: implement PKE for TCG 2018-02-22 10:18:55 -05:00
helper.c target-i386: check for PKU even for non-writable pages 2018-02-23 13:23:37 -05:00
helper.h target-i386: implement PKE for TCG 2018-02-22 10:18:55 -05:00
int_helper.c target-i386: Implement FSGSBASE 2018-02-20 14:45:58 -05:00
Makefile.objs target-i386: Enable control registers for MPX 2018-02-20 13:27:46 -05:00
mem_helper.c target-i386: Update BNDSTATUS for exceptions raised by BOUND 2018-02-20 14:24:07 -05:00
misc_helper.c target-i386: implement PKE for TCG 2018-02-22 10:18:55 -05:00
mpx_helper.c target-i386: fix confusion in xcr0 bit position vs. mask 2018-02-20 21:00:41 -05:00
ops_sse_header.h target-i386: Rename struct XMMReg to ZMMReg 2018-02-18 23:46:30 -05:00
ops_sse.h target-i386: Rename XMM_[BWLSDQ] helpers to ZMM_* 2018-02-18 23:53:16 -05:00
seg_helper.c target-i386: Rewrite gen_enter inline 2018-02-20 10:13:43 -05:00
shift_helper_template.h
smm_helper.c target-i386: Enable control registers for MPX 2018-02-20 13:27:46 -05:00
svm_helper.c x86: Clean up includes 2018-02-19 01:00:09 -05:00
svm.h
TODO
topology.h cpu: Introduce X86CPUTopoInfo structure for argument simplification 2018-02-23 10:58:43 -05:00
translate.c tcg: Clean up direct block chaining safety checks 2018-02-23 22:26:00 -05:00
unicorn.c tcg: Make cpu_tmp1 and cpu_tmp4 a TCGv 2018-02-21 00:07:23 -05:00
unicorn.h