qemu/target
Ard Biesheuvel aa291cc292 target/arm: Avoid target_ulong for physical address lookups
target_ulong is typedef'ed as a 32-bit integer when building the
qemu-system-arm target, and this is smaller than the size of an
intermediate physical address when LPAE is being used.

Given that Linux may place leaf level user page tables in high memory
when built for LPAE, the kernel will crash with an external abort as
soon as it enters user space when running with more than ~3 GiB of
system RAM.

So replace target_ulong with vaddr in places where it may carry an
address value that is not representable in 32 bits.

Fixes: f3639a64f6 ("target/arm: Use softmmu tlbs for page table walking")
Cc: qemu-stable@nongnu.org
Reported-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Message-id: 20240927071051.1444768-1-ardb+git@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 67d762e716)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-10-02 15:44:12 +03:00
..
alpha target/alpha: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 11:46:16 +01:00
arm target/arm: Avoid target_ulong for physical address lookups 2024-10-02 15:44:12 +03:00
avr target/avr: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 11:46:17 +01:00
cris target/cris: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 11:46:17 +01:00
hexagon target/hexagon: don't look for static glib 2024-08-28 08:37:29 +03:00
hppa target/hppa: Fix PSW V-bit packaging in cpu_hppa_get for hppa64 2024-09-05 22:59:09 +03:00
i386 target/i386: Do not apply REX to MMX operands 2024-08-28 08:37:29 +03:00
loongarch target/loongarch: Fix helper_lddir() a CID INTEGER_OVERFLOW issue 2024-07-26 13:12:12 +03:00
m68k target/m68k: Map FPU exceptions to FPSR register 2024-04-09 07:43:31 -10:00
microblaze target/microblaze: Use insn_start from DisasContextBase 2024-04-09 07:45:09 -10:00
mips target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
nios2 target/nios2: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
openrisc target/openrisc: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
ppc target/ppc: Fix lxvx/stxvx facility check 2024-09-28 07:25:17 +03:00
riscv riscv, gdbstub.c: fix reg_width in ricsv_gen_dynamic_vector_feature() 2024-06-05 13:07:02 +03:00
rx target/rx: Use target_ulong for address in LI 2024-08-28 08:37:28 +03:00
s390x target/s390x: Use insn_start from DisasContextBase 2024-04-09 07:45:09 -10:00
sh4 target/sh4: Update DisasContextBase.insn_start 2024-05-09 16:48:26 +03:00
sparc target/sparc: Restrict STQF to sparcv9 2024-08-28 08:37:29 +03:00
tricore target/tricore/helper: Use correct string format in cpu_tlb_fill() 2024-03-26 14:24:06 +01:00
xtensa target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:25 +01:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target: Make qemu_target_page_mask() available for *-user 2024-01-29 21:04:10 +10:00
target-common.c target: Make qemu_target_page_mask() available for *-user 2024-01-29 21:04:10 +10:00