qemu-cr16/target/s390x
Ilya Leoshkevich fc976a67de target/s390x: Use address generation for register branch targets
Indirect branches to addresses taken from registers go through address
generation, e.g., for BRANCH ON CONDITION Principles of Operation says:

    In the RR format, the contents of general register R2 are used to
    generate the branch address

QEMU uses r2_nz handler for the respective register operands. Currently
it does not zero out extra bits in 24- and 31-bit addressing modes as
required by address generation. The very frequently used
s390x_tr_init_disas_context() function has a workaround for this,
but the code for saving an old PSW during an interrupt does not.

Add the missing masking to r2_nz. Enforce PSW validity by replacing the
workaround with an assertion.

Reported-by: Thomas Weißschuh <linux@weissschuh.net>
Reported-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/lkml/ab3131a2-c42a-47ff-bf03-e9f68ac053c0@t-8ch.de/
Cc: qemu-stable@nongnu.org
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Thomas Weißschuh <linux@weissschuh.net>
Message-ID: <20251016175954.41153-4-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-11-03 08:27:59 +01:00
..
kvm accel/kvm: Introduce KvmPutState enum 2025-10-14 11:03:59 +02:00
tcg target/s390x: Use address generation for register branch targets 2025-11-03 08:27:59 +01:00
arch_dump.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
cpu-dump.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
cpu-param.h tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally 2025-04-23 15:07:32 -07:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu-system.c add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide 2025-08-29 12:48:14 +02:00
cpu.c target/s390x: Fill in TCGCPUOps.pointer_wrap 2025-05-28 08:08:48 +01:00
cpu.h accel/tcg: Hoist cpu_get_tb_cpu_state decl to accl/tcg/cpu-ops.h 2025-04-30 12:45:05 -07:00
cpu_features.c s390x/cpumodel: Add PLO-extension facility 2024-12-11 09:18:38 +01:00
cpu_features.h s390x/cpumodel: add Concurrent-functions facility support 2024-12-11 09:18:38 +01:00
cpu_features_def.h meson: rename .inc.h files to .h.inc 2020-08-21 06:18:35 -04:00
cpu_features_def.h.inc target/s390x: A fix for the trouble with tribles 2025-07-02 18:29:57 +02:00
cpu_models.c target/s390x: Fix type conflict of GLib function pointers 2025-05-06 16:02:04 +02:00
cpu_models.h target/s390x: Register CPUClass:list_cpus 2025-04-25 12:59:09 +02:00
cpu_models_system.c target/s390x: set has_deprecated_props flag 2025-07-02 18:26:27 +02:00
cpu_models_user.c target/s390x: split sysemu part of cpu models 2021-07-07 14:01:59 +02:00
diag.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
gdbstub.c exec: Declare tlb_flush*() in 'exec/cputlb.h' 2025-03-08 07:56:14 -08:00
gen-features.c hw/s390x/s390-virtio-ccw: Remove the deprecated 4.1 machine type 2025-06-11 12:17:17 +02:00
helper.c target/s390x: Reduce s390_store_status() scope 2025-10-10 10:02:51 +02:00
helper.h target/s390x: Simplify per_ifetch, per_check_exception 2024-05-29 12:41:15 +02:00
interrupt.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
ioinst.c s390: implementing CHSC SEI for AP config change 2025-06-11 14:01:58 +02:00
Kconfig target/s390x: Add a CONFIG switch to disable legacy CPUs 2024-06-24 08:22:30 +02:00
machine.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
meson.build include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
mmu_helper.c target/s390x/mmu_helper: Do not ignore address_space_rw() errors 2025-10-16 18:19:23 +02:00
s390x-internal.h target/s390x: Reduce s390_store_status() scope 2025-10-10 10:02:51 +02:00
sigp.c target/s390x: Replace legacy cpu_physical_memory_[un]map() calls (3/3) 2025-10-10 10:02:51 +02:00
trace-events include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00