unicorn/qemu
Leon Alrae df67716ed5
target/mips: compare virtual addresses in LL/SC sequence
Do only virtual addresses comaprisons in LL/SC sequence emulations.

Until this patch, physical addresses had been compared in SC part of
LL/SC sequence, even though such comparisons could be avoided. Getting
rid of them allows throwing away SC helpers and having common SC
implementations in user and system mode, avoiding the need for two
separate implementations selected by #ifdef CONFIG_USER_ONLY.

Correct guest software should not rely on LL/SC if they accesses the
same physical address via different virtual addresses or if page
mapping gets changed between LL/SC due to manipulating TLB entries.
MIPS Instruction Set Manual clearly says that an RMW sequence must
use the same address in the LL and SC (virtual address, physical
address, cacheability and coherency attributes must be identical).
Otherwise, the result of the SC is not predictable. This patch takes
advantage of this fact and removes the virtual->physical address
translation from SC helper.

lladdr served as Coprocessor 0 LLAddr register which captures physical
address of the most recent LL instruction, and also lladdr was used
for comparison with following SC physical address. This patch changes
the meaning of lladdr - now it will only keep the virtual address of
the most recent LL. Additionally, CP0_LLAddr field is introduced which
is the actual Coperocessor 0 LLAddr register that guest can access.

Backports commit c7c7e1e9a5e3f0a8a1dbff6e4ccfd21c2dc9f845 from qemu
2019-02-15 16:59:40 -05:00
..
accel cputlb: update TLB entry/index after tlb_fill 2019-02-12 11:48:48 -05:00
crypto
default-configs
docs
fpu include/fpu/softfloat: Fix compilation with Clang on s390x 2019-01-24 18:37:51 -05:00
hw
include exec-all: document that tlb_fill can trigger a TLB resize 2019-02-12 11:38:28 -05:00
qapi qapi: Rewrite string-input-visitor's integer and list parsing 2018-12-18 04:57:25 -05:00
qobject
qom qom/cpu: Add cluster_index to CPUState 2019-01-30 12:59:59 -05:00
scripts decodetree: re.fullmatch was added in 3.4 2019-01-25 13:47:47 -05:00
target target/mips: compare virtual addresses in LL/SC sequence 2019-02-15 16:59:40 -05:00
tcg tcg/i386: fix unsigned vector saturating arithmetic 2019-02-12 11:37:12 -05:00
util mmap-alloc: fix hugetlbfs misaligned length in ppc64 2019-02-05 16:52:39 -05:00
aarch64.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
aarch64eb.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
accel.c
arm.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
armeb.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
CODING_STYLE
configure configure: Force the C standard to gnu99 2019-01-22 20:18:58 -05:00
COPYING
COPYING.LIB
cpus.c
exec.c exec.c: Use correct attrs in cpu_memory_rw_debug() 2019-01-29 17:05:50 -05:00
gen_all_header.sh
glib_compat.c
HACKING
header_gen.py header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
ioport.c
LICENSE
m68k.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
Makefile
Makefile.objs
Makefile.target configure: Remove old -fno-gcse workaround for GCC 4.6.x and 4.7.[012] 2018-12-18 03:52:36 -05:00
memory_ldst.inc.c
memory_mapping.c
memory.c memory: learn about non-volatile memory region 2018-11-11 08:50:39 -05:00
mips64.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
mips64el.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
mips.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
mipsel.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
powerpc.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
qemu-timer.c
riscv32.h
riscv64.h
rules.mak
sparc64.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
sparc.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00
unicorn_common.h
VERSION Open 4.0 development tree 2018-12-11 20:33:45 -05:00
vl.c
vl.h
x86_64.h header_gen: Remove deposit32/64 from the list 2019-01-30 14:05:52 -05:00