unicorn/qemu
Aurelien Jarno 11cfddad05
tcg/i386: use softmmu fast path for unaligned accesses
Softmmu unaligned load/stores currently goes through through the slow
path for two reasons:
  - to support unaligned access on host with strict alignement
  - to correctly handle accesses crossing pages

x86 is only concerned by the second reason. Unaligned accesses are
avoided by compilers, but are not uncommon. We therefore would like
to see them going through the fast path, if they don't cross pages.

For that we can use the fact that two adjacent TLB entries can't contain
the same page. Therefore accessing the TLB entry corresponding to the
first byte, but comparing its content to page address of the last byte
ensures that we don't cross pages. We can do this check without adding
more instructions in the TLB code (but increasing its length by one
byte) by using the LEA instruction to combine the existing move with the
size addition.

On an x86-64 host, this gives a 3% boot time improvement for a powerpc
guest and 4% for an x86-64 guest.

Backports commit 8cc580f6a0d8c0e2f590c1472cf5cd8e51761760 from qemu
2018-02-17 15:23:33 -05:00
..
crypto crypto: move built-in AES implementation into crypto/ 2018-02-17 15:23:17 -05:00
default-configs
docs docs: clarify memory region lifecycle 2018-02-12 15:11:21 -05:00
fpu softfloat: expand out STATUS macro 2018-02-12 13:43:13 -05:00
hw osdep.h: Move some compiler-specific things to compiler.h 2018-02-17 15:23:28 -05:00
include cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
qapi qerror: Clean up QERR_ macros to expand into a single string 2018-02-17 15:23:09 -05:00
qobject qerror: Finally unused, clean up 2018-02-17 15:23:10 -05:00
qom qom: Fix invalid error check in property_get_str() 2018-02-17 15:23:24 -05:00
scripts
target-arm target-arm: Implement AArch64 TLBI operations on IPAs 2018-02-17 15:23:32 -05:00
target-i386 target-i386: Remove x86_cpu_compat_set_features() 2018-02-17 15:23:26 -05:00
target-m68k cpu-exec: Purge all uses of ENV_GET_CPU() 2018-02-17 15:23:18 -05:00
target-mips target-mips: simplify LWL/LDL mask generation 2018-02-17 15:23:27 -05:00
target-sparc cpu-exec: Purge all uses of ENV_GET_CPU() 2018-02-17 15:23:18 -05:00
tcg tcg/i386: use softmmu fast path for unaligned accesses 2018-02-17 15:23:33 -05:00
util qemu-common: Add missing string util functions 2018-02-17 15:23:28 -05:00
aarch64.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
aarch64eb.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
accel.c
arm.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
armeb.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
CODING_STYLE
configure
COPYING
COPYING.LIB
cpu-exec.c cpu-exec: Purge all uses of ENV_GET_CPU() 2018-02-17 15:23:18 -05:00
cpus.c cpu-exec: Purge all uses of ENV_GET_CPU() 2018-02-17 15:23:18 -05:00
cputlb.c cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
exec.c cpu: Change cpu_exec_init() arg to cpu, not env 2018-02-17 15:23:18 -05:00
gen_all_header.sh
glib_compat.c crypto: introduce new module for computing hash digests 2018-02-17 15:23:17 -05:00
HACKING
header_gen.py cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
ioport.c memory: Define API for MemoryRegionOps to take attrs and return status 2018-02-12 17:17:27 -05:00
LICENSE
m68k.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
Makefile
Makefile.objs crypto: introduce new module for computing hash digests 2018-02-17 15:23:17 -05:00
Makefile.target
memory_mapping.c memory_mapping: Rework cpu related includes 2018-02-17 15:23:15 -05:00
memory.c osdep.h: Move some compiler-specific things to compiler.h 2018-02-17 15:23:28 -05:00
mips64.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
mips64el.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
mips.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
mipsel.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
powerpc.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
qapi-schema.json
qemu-log.c
qemu-timer.c
rules.mak
softmmu_template.h Add MemTxAttrs to the IOTLB 2018-02-12 18:38:38 -05:00
sparc64.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
sparc.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00
tcg-runtime.c
translate-all.c translate-all: Change tb_flush() env argument to cpu 2018-02-17 15:23:18 -05:00
translate-all.h translate-all: remove unnecessary argument to tb_invalidate_phys_range 2018-02-13 09:04:51 -05:00
unicorn_common.h
VERSION
vl.c crypto: introduce new module for computing hash digests 2018-02-17 15:23:17 -05:00
vl.h
x86_64.h cputlb: Add functions for flushing TLB for a single MMU index 2018-02-17 15:23:31 -05:00