]> git.proxmox.com Git - mirror_qemu.git/commit - bsd-user/mmap.c
exec: Use cpu_untagged_addr in g2h; split out g2h_untagged
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 12 Feb 2021 18:48:43 +0000 (10:48 -0800)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 16 Feb 2021 11:04:53 +0000 (11:04 +0000)
commit3e8f1628e864201692aa28996f8f64f9761555af
tree9ab5b2b6687bac3398e021b610fa728c2081dc28
parent141a56d844e0b57d46026c2913179c5ac05e6010
exec: Use cpu_untagged_addr in g2h; split out g2h_untagged

Use g2h_untagged in contexts that have no cpu, e.g. the binary
loaders that operate before the primary cpu is created.  As a
colollary, target_mmap and friends must use untagged addresses,
since they are used by the loaders.

Use g2h_untagged on values returned from target_mmap, as the
kernel never applies a tag itself.

Use g2h_untagged on all pc values.  The only current user of
tags, aarch64, removes tags from code addresses upon branch,
so "pc" is always untagged.

Use g2h with the cpu context on hand wherever possible.

Use g2h_untagged in lock_user, which will be updated soon.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210212184902.1251044-13-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
20 files changed:
accel/tcg/translate-all.c
accel/tcg/user-exec.c
bsd-user/elfload.c
bsd-user/main.c
bsd-user/mmap.c
bsd-user/qemu.h
include/exec/cpu_ldst.h
include/exec/exec-all.h
linux-user/elfload.c
linux-user/flatload.c
linux-user/hppa/cpu_loop.c
linux-user/i386/cpu_loop.c
linux-user/mmap.c
linux-user/ppc/signal.c
linux-user/qemu.h
linux-user/syscall.c
target/arm/helper-a64.c
target/hppa/op_helper.c
target/i386/tcg/mem_helper.c
target/s390x/mem_helper.c