qemu/target
Pierrick Bouvier e1781b38af target/arm/ptw: fix arm_cpu_get_phys_page_attrs_debug
It was reported that QEMU monitor command gva2gpa was reporting unmapped
memory for a valid access (qemu-system-aarch64), during a copy from
kernel to user space (__arch_copy_to_user symbol in Linux) [1].
This was affecting cpu_memory_rw_debug also, which
is used in numerous places in our codebase. After investigating, the
problem was specific to arm_cpu_get_phys_page_attrs_debug.

When performing user access from a privileged space, we need to do a
second lookup for user mmu idx, following what get_a64_user_mem_index is
doing at translation time.

[1] https://lists.nongnu.org/archive/html/qemu-discuss/2025-04/msg00013.html

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-id: 20250414153027.1486719-5-pierrick.bouvier@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-05-06 15:01:22 +01:00
..
alpha qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
arm target/arm/ptw: fix arm_cpu_get_phys_page_attrs_debug 2025-05-06 15:01:22 +01:00
avr qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hexagon target/hexagon: Include missing 'accel/tcg/getpc.h' 2025-04-25 17:09:58 +02:00
hppa target/hppa: Use tcg_gen_addcio_i64 2025-04-28 13:40:17 -07:00
i386 target/i386: do not block singlestep for STI 2025-05-02 17:38:24 +02:00
loongarch qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
m68k qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
microblaze target/microblaze: Use tcg_gen_addcio_i32 2025-04-28 13:40:17 -07:00
mips target/mips: Check CPU endianness at runtime using env_is_bigendian() 2025-04-25 17:09:58 +02:00
openrisc target/openrisc: Use tcg_gen_addcio_* for ADDC 2025-04-28 13:40:17 -07:00
ppc target/ppc: Use tcg_gen_addcio_tl for ADD and SUBF 2025-04-28 13:40:17 -07:00
riscv qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
rx qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
s390x * Extend s390x diagnose call 308 subcode 10 to return more information 2025-05-05 11:26:28 -04:00
sh4 target/sh4: Use tcg_gen_addcio_i32 for addc 2025-04-28 13:40:17 -07:00
sparc target/sparc: Use tcg_gen_addcio_tl for gen_op_addcc_int 2025-04-28 13:40:17 -07:00
tricore target/tricore: Use tcg_gen_addcio_i32 for gen_addc_CC 2025-04-28 13:40:17 -07:00
xtensa target/xtensa: Evaluate TARGET_BIG_ENDIAN at compile time 2025-04-25 17:09:58 +02:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00